The project aims to create a digital twin of ASV using ROS2 Humble and Gazebo Fortress.
Currently we are testing our project on tutorial from Gazebo Fortress
P.s. These tutorials are not for Hull, but for robots and gazebo in gneral
P.s. For now our "FUTURE HULL" looks a bit silly (check the image below)
The tutorials made so far:
Current result looks like this:

- Computer running Linux Ubuntu 22.04 (jammy)
- Docker
1. Fork this repository https://github.com/sashakraeva/ASV_ROS2.git
cd path/to/foldergit clone your/shh/link/ASV_ROS2.git!!! If you dont have SHH key, follow tutorial Generating a new SSH key and adding it to the ssh-agent
This docker image contains ROS2 Humble, Gazebo Fortress and other required libraries
cd ~/ASV_ROS2
.docker/build_image.shcd ~/ASV_ROS2
.docker/run_image.shit will ask you to do following to own the workspace:
sudo chown -R $USER /hull_ws!!! From now on you will be working only in terminator, so run
terminatorHide the normal terminal, BUT DONT CLOSE IT.
- Open VS code
- if not installed, install docker extension for VS Code in Extension (Ctrl+Shift+X)
- Do to Docker extension, right click on the running image "Attach Visual Studio Code"
- File -> Open Folder -> type: /hull_ws/src
- Now you are working inside your working space
We are currently working only in hull_simulation/ folder (is is a ros package)
hull_simulation/:
- launch/ - package launching files (ros2 launch .....)
- worlds/ - .sdf world files that we see in Gazebo.
- currently we are working with building_robot.sdf (Gazebo Fortress tutorial)
- building_robot.sdf contains:
- world setting
- model (robot) setting with links between the wheels and physics
- plugins for model to make it move using keypad
To run only gazebo with our building_robot.sdf file we can do following:
- This starts the simulation
cd ~/hull_ws
ign gazebo building_robot.sdf- This Activates the keypad and movement
- Inside Gazebo click on the right top corner three dots and type Key Publisher
- Press play in left down corner
- Press arrow on your keypad
This will make our robot move
To do so, we fisrt need to build our hull_simulation package !!! Every time you change smth inside the codes on hull_simulation/ you need to do following steps:
- Building hull_simulation package
cd /hull_ws
colcon build --symlink-install
source install/setup.bash- Run the simulation
ros2 launch hull_simulation simulation_launch.py- Inside Gazebo click on the right top corner three dots and type Key Publisher
- Press play in left down corner
- Press up arrow on your keypad
This will make our robot move
sensor_tutorial.sdf /hull_ws/src/hull_simulation/worlds/sensor_tutorial.sdf
- In first terminal:
ign gazebo sensor_tutorial.sdf- Check IMU sensor values
In second terminal:
ign topic -e -t /imuInside gazebo window:
- Klick on the right top corner three dots and type Key Publisher
- Press play in left down corner
- Press arrow on your keypad
- check second terminal values
In second terminal you will recieve values like:
header {
stamp {
sec: 36
}
data {
key: "frame_id"
value: "vehicle_blue::chassis::imu_sensor"
}
data {
key: "seq"
value: "36"
}
}
entity_name: "vehicle_blue::chassis::imu_sensor"
orientation {
x: 7.9718030854165078e-07
y: 8.39381347583856e-07
z: 8.6009772919773909e-13
w: 0.99999999999933
}
- Check Contact sensor values
In second terminal:
ign topic -e -t /wall/touchedInside gazebo window:
- Klick on the right top corner three dots and type Key Publisher
- Press play in left down corner
- Press arrow on your keypad
- try to crash into the wall
- check second terminal values
In second terminal you will recieve values like:
"data: true" - meaning that you heated the wall
you may need to add some paths to:
code ~/.bashrcdocker system prune