The following documentation describes the usage of the smarcsim package and adaption for its own experiments. Sepcial thanks to SMaRCSim maritime simulator team SMaRCSim: Maritime Robotics Simulation Modules Paper. The submodules are linked to the owners. This repo is a fork, which concludes all needed packages for your own experiments. You may use it for testing your USV, AUV or data ml generation etc., and many more use cases.
Following contents include this doc:
- startup of operation
- Floating script for sim ship objects
**Note: All downloads and experiments are done on a Ubuntu 22.04 machine (Linux)**
- Clone it
git clone --recurse-submodules https://github.com/Hberto/SmarcSim.git- Install UnityHub/Unity
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
sudo apt update
sudo apt-get install unityhub- Install SmarcRepos and its dependencies Open up this fresh install website and follow the instructions --> Instructions
**Note: Submodules are already here for Unity. Do not download them or execute the script!**
- Unity downloaded and import of SmarcUnity as project
- Installation of Smarc repos and dependencies done
- Built ROS2 workspace
- Tmux installed
Do you want to use only the simulation or the combined package (simulation and ROS2)?
- Open up UnityHub
- Open cloned or downloaded SmarcSim project.
- Open up UnityHub
- Open Unity project with the imported packages for unity according to smaarcsim docs
- Source
smarc_ws
source ./install/setup.bash- Change directory to
/src/smarc2/scripts/
# Open ROS2 Connection (local)
bash ./unity_ros_bridge.sh- Startup Lolo AUV and change directory to
/src/smarc2/scripts/smarc_bringups/scripts
# Open Lolo_auv launch scripts of bringup
bash ./lolo_bringup.shClick on the Game window and start it. The controls are:
- W forward (thrusters)
- S backwards (thrusters)
- C vertical down
- Space vertical up
- <- left rudder alignment
- -> right rudder alignment
Click on lolo_auv_v1 and activate C# script ROS Transform Tree Publisher
Click lolo_auv_v1 then on Camera and activate the scripts on the inspector channel
The environmental effects like water, sun, fog etc. are part of the High Definition Render Pipeline Package (HDRP). It's a high-fedility scriptable render pipeline built by Unity. The tools is used for games, technical demos, and animations to create high graphical applications. See here for more details -> HDRP docs
For feature extraction/matching experiments and ground truth comparison under different environmental conditions, these setting changes are part of the experiment setup:
Search for Ocean -> Appearance in Inspector -> Underwater option -> Change Absorption Distance
- Absorption Distance: It controls how quickly light is absorbed in the water, making the water appear clear or cloudy. A low value makes the water appear more opaque or “murky,” while a high value allows more light to pass through and makes it appear clearer.
Static ships in the sim are not realistic when collecting data or simulate scenarios. That's why i added a Floating.cs in the scripts folder.
description:
- resolution: w1280xh720 and init: 640x480