Skip to content

Hberto/SmarcSim

Repository files navigation

SmarcSim

Description

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)**

Installation

  1. Clone it
git clone --recurse-submodules https://github.com/Hberto/SmarcSim.git
  1. 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
  1. 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!**

Prerequisites (Linux/Ubuntu only)

  • Unity downloaded and import of SmarcUnity as project
  • Installation of Smarc repos and dependencies done
  • Built ROS2 workspace
  • Tmux installed

Usage

Do you want to use only the simulation or the combined package (simulation and ROS2)?

Option: Only Unity simulation

  1. Open up UnityHub
  2. Open cloned or downloaded SmarcSim project.

Option: Usage with ROS2

Fresh starter with lolo auv and ROS2

  1. Open up UnityHub
  2. Open Unity project with the imported packages for unity according to smaarcsim docs
  3. Source smarc_ws
source ./install/setup.bash
  1. Change directory to /src/smarc2/scripts/
# Open ROS2 Connection (local)
bash ./unity_ros_bridge.sh
  1. Startup Lolo AUV and change directory to /src/smarc2/scripts/smarc_bringups/scripts
# Open Lolo_auv launch scripts of bringup
bash ./lolo_bringup.sh
Controls for manual driving

Click 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
Activate tf tree publisher

Click on lolo_auv_v1 and activate C# script ROS Transform Tree Publisher

Image Publisher

Click lolo_auv_v1 then on Camera and activate the scripts on the inspector channel

High Definition Render Pipeline Package (HDRP)

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

UC underwater localization: Subtask landmark-based feature extraction

For feature extraction/matching experiments and ground truth comparison under different environmental conditions, these setting changes are part of the experiment setup:

Control the underwater visibility

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.
Floating ship object

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.

Data retrieval log

log: 23.11 - first start up and data retrieval

description:

  • resolution: w1280xh720 and init: 640x480

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages