Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sailboat Simulator

The following repository provides the simulator of Sailboat RS750 in the GazeboSim simulator.
The simulator has been built based on the packages: asv_sim, asv_wave_sim and rs750.
The repository provides a consistent Docker environment with GazeboSim, Ardupilot (SITL). SITL allows you to simulate the vehicle hardware and firmware (ArduSub ) on your host directly.

image



Expected results,

sailboat


Prerequisites

  • Download and Install QGroundControl (optional).
  • Install NVIDIA Container Toolkit to support Docker to access GPU (required).
  • Repository has been tested on: Ubuntu 22.04, Ubuntu 24.04, ArchLinux (Kernel 6.8).

Build

git clone https://github.com/markusbuchholz/sailboat_simulator.git

cd sailboat_simulator/bluerov2_ardupilot_SITL/docker

sudo ./build.sh

Build in Docker

Adjust in run.sh.

local_gz_ws="/home/markus/sailboat_simulator/gz_ws"
local_SITL_Models="/home/markus/sailboat_simulator/SITL_Models"
sudo ./run.sh

colcon build

source install/setup.bash

cd ../gz_ws

colcon build --symlink-install --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=17

source install/setup.bash

source gazebo_exports.sh
 

Launch Sailboat

ros2 launch move_blueboat mission_rs750.launch.py

Start SITL (optional)

cd ../ardupilot
sim_vehicle.py -v Rover -f sailboat --model JSON --map --console -l 55.99541530863445,-3.3010225004910683,0,0

Navigate RS750

In ROS 2 use the following commands (from GazeboSim launch Wave Control plugin),

The following publishers provide the possibility to change the position of main sail, fore sail, and rudder.

ros2 topic pub /main_sail_joint/cmd_pos std_msgs/msg/Float64 "{data: -5.0}"
ros2 topic pub /fore_sail_joint/cmd_pos std_msgs/msg/Float64 "{data: 2.0}"
ros2 topic pub /rudder_joint/cmd_pos std_msgs/msg/Float64 "{data: 3.0}"

In GazeboSim, use the following commands,

gz topic -t /main_sail_joint/cmd_pos -m gz.msgs.Double --pub "data: 2.0"
gz topic -t /rudder_joint/cmd_pos -m gz.msgs.Double --pub "data: -2.0"
gz topic -t /fore_sail_joint/cmd_pos -m gz.msgs.Double --pub "data: 2.0"

Available topics,

/fore_sail_joint/cmd_pos
/main_sail_joint/cmd_pos
/rudder_joint/cmd_pos
/world/waves/model/rs750/link/base_link/sensor/anemometer/anemometer
/world/waves/model/rs750/link/base_link/sensor/imu_sensor/imu
/world/waves/model/rs750/link/base_link/sensor/navsat_sensor/navsat

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages