This repository contains scenario files and models for simulation of the Vortex NTNU drones.
Dependencies
sudo apt update && sudo apt install -y libglm-dev libsdl2-dev libfreetype6-dev
Clone Stonefish
cd /opt
sudo git clone https://github.com/vortexntnu/stonefish.git
sudo sed -i '30i#include <cstdint>' stonefish/Library/include/sensors/Sample.h
Build
cd stonefish
sudo mkdir build
cd build
sudo cmake ..
sudo make -j4
sudo make install
Ensure correct path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
These are the relevant ROS 2 packages for simulation.
- Stonefish ROS 2 package (Required)
- Vortex Stonefish Sim package (Required)
- Stonefish Interface package (Optional)
Launch a scenario:
ros2 launch stonefish_sim simulation.launch.py scenario:=tacc
Available scenarios are tacc, docking, pipeline, structure, orca_demo, freya_demo, orca_freya_demo.
If you have a less capable computer, other options are to use low rendering quality or turn off rendering completely. For low rendering quality use
ros2 launch stonefish_sim simulation.launch.py rendering_quality:=low
and for no rendering use
ros2 launch stonefish_sim simulation.launch.py rendering:=false
To create your own scenario file, follow these steps:
-
Define the Scenario File:
- Create a new
.scn
file under thescenario
folder. - This file will define the specific scenario you want to simulate.
- Create a new
-
Import Objects:
- Use objects defined in
.scn
files located in theobjects
folder. - These objects can represent various elements of the simulation, such as obstacles or environmental features.
- Use objects defined in
-
Include Data Files:
- The object files in the
objects
folder can import data from files located in thedata/object_files
directory. - Typical files in
data/object_files
are.png
textures and.obj
files.
- The object files in the
-
Define the Scenario Config
- Additionaly you have to create a config file in the
config
directory that defines transformations for components. - This step allows easy configuration of scenario parameters that will be useful for testing purposes.
- Additionaly you have to create a config file in the