This repository contains the robot description and necessary launch files to describe and simulate the BlueROV2 (unmanned underwater vehicle) with Gazebo and its hydrodynamics plugins under ROS 2.
- Xacro , installable through
apt install ros-${ROS_DISTRO}-xacro
- simple_launch, installable through
apt install ros-${ROS_DISTRO}-simple-launch
- ROS 2 with Gazebo Fortress or newer with
ros_gz_bridge
- Look out for your ROS 2 / Gazebo versions combination
- pose_to_tf, to get the ground truth from Gazebo if needed.
- slider_publisher, installable through
apt install ros-${ROS_DISTRO}-slider-publisher
- auv_control for basic control laws, from source
sudo apt install -y ros-humble-ros-gz ros-humble-slider-publisher ros-humble-ros-ign-gazebo \
ros-humble-ros-ign-bridge ros-humble-ros-ign-image
Clone the package and its dependencies (if from source) in your ROS 2 workspace src
and compile with colcon
mkdir -p ros2_ws/src
cd ros2_ws/src
git clone https://github.com/RobInLabUJI/bluerov2
git clone https://github.com/oKermorgant/simple_launch
git clone https://github.com/oKermorgant/pose_to_tf
git clone https://github.com/CentraleNantesROV/auv_control
git clone https://github.com/CentraleNantesROV/thruster_manager
cd ..
source /opt/ros/humble/setup.bash
colcon build
To run a demonstration with the vehicle, you can run a Gazebo scenario, such as an empty world with buoyancy and sensors setup:
source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash
ros2 launch bluerov2_description world_launch.py
and then spawn the robot with a GUI to control the thrusters:
source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash
export GZ_VERSION=fortress
ros2 launch bluerov2_description upload_bluerov2_launch.py sliders:=true
Gazebo will:
- Subscribe to
/bluerov2/cmd_thruster[1..6]
and expectstd_msgs/Float64
messages, being the thrust in Newton - Publish sensor data to various topics (image, mpu+lsm for IMU, cloud for the sonar, odom)
- Publish the ground truth on
/bluerov2/pose_gt
. This pose is forwarded to/tf
ifpose_to_tf
is used.
Basic control is available in the auv_control package
In this case spawn the robot without manual sliders:
source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash
export GZ_VERSION=fortress
ros2 launch bluerov2_description upload_bluerov2_launch.py
and run e.g. a cascaded PID controller:
source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash
ros2 launch bluerov2_control cascaded_pids_launch.py sliders:=true
BlueROV2 package is open-sourced under the Apache-2.0 license. See the LICENSE file for details.