-
Notifications
You must be signed in to change notification settings - Fork 361
Home
If you are using this simulator for your publication, please cite:
@inproceedings{Marcusso_2016,
author = {Musa Morena Marcusso Manh{\~{a}}es and Sebastian Scherer and Martin Voss and Luiz Ricardo Douat and Thomas Rauschenbach},
title = {{UUV} Simulator: A Gazebo-based Package for Underwater Intervention and Multi-Robot Simulation},
year = {2016},
pages = {1-8},
month = {September},
booktitle = {OCEANS'16 MTS/IEEE Monterey}
}
This simulation package is a set of plugins for Gazebo for underwater robotics and ROS modules. The plugins allow the simulation of vehicles, thrusters, fins and a series of sensors. The Gazebo plugins are kept ROS-free so that they can extended to other middlewares, if desired.
We assume you are using at least Ubuntu 14.04.4 LTS and ROS Indigo, even though the simulator package should also work with later versions (minor adjustments may be required). Please refer to the instructions for the ROS Indigo installation here.
After the installation of ROS Indigo, the following packages are also needed:
sudo apt-get install gazebo7 libgazebo7-dev protobuf-compiler protobuf-c-compiler ros-indigo-gazebo7-msgs ros-indigo-gazebo7-plugins ros-indigo-gazebo7-ros ros-indigo-gazebo7-ros-control ros-indigo-gazebo7-ros-pkgs ros-indigo-effort-controllers ros-indigo-image-pipeline ros-indigo-image-common ros-indigo-perception ros-indigo-perception-pcl ros-indigo-robot-state-publisher ros-indigo-ros-base ros-indigo-viz python-wstool python-catkin-tools python-catkin-lint ros-indigo-hector-localization ros-indigo-joy ros-indigo-joy-teleop libopencv-dev
If you installed ROS Kinetic, then install the following packages:
sudo apt-get install ros-kinetic-gazebo-msgs ros-kinetic-gazebo-plugins ros-kinetic-gazebo-ros ros-kinetic-gazebo-ros-control ros-kinetic-gazebo-ros-pkgs ros-kinetic-effort-controllers ros-kinetic-image-pipeline ros-kinetic-image-common ros-kinetic-perception ros-kinetic-perception-pcl ros-kinetic-robot-state-publisher ros-kinetic-ros-base ros-kinetic-viz python-wstool python-catkin-tools python-catkin-lint ros-kinetic-hector-localization ros-kinetic-joy ros-kinetic-joy-teleop libopencv-dev
If you don't have the ROS workspace yet, you should run the following:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
wstool init
Configure the environment variables by adding the following lines in ~/.bashrc
:
source /usr/share/gazebo-7/setup.sh
source /opt/ros/indigo/setup.bash
source $HOME/catkin_ws/devel/setup.sh
export GAZEBO_PREFIX=$HOME/catkin_ws/install
export GAZEBO_RESOURCE_PATH=${GAZEBO_PREFIX}/share/gazebo-7.3:${GAZEBO_RESOURCE_PATH}
export GAZEBO_MODEL_PATH=${GAZEBO_PREFIX}/share/gazebo-7.3/models:${GAZEBO_MODEL_PATH}
export GAZEBO_PLUGIN_PATH=${GAZEBO_PREFIX}/lib:${GAZEBO_PREFIX}/lib/x86_64-linux-gnu:${GAZEBO_PLUGIN_PATH}
Note: If you install a version of Gazebo newer than 7.3, you might need to adjust
gazebo-7.3
above.
Start an empty underwater environment:
roslaunch uuv_descriptions empty_underwater_world.launch
Spawn the remotely operated vehicle RexROV (find the robot description files under uuv_descriptions/models/rexrov
) as follows:
roslaunch uuv_descriptions upload_rexrov.launch mode:=default x:=0 y:=0 z:=-20 namespace:=rexrov
for which mode
stands for the configuration of the vehicle to be used. It is important to create the vehicles under a unique namespace
to allow simulation of multiple vehicles in the same scenario.
You can start a velocity controller with a joystick teleoperation node as:
roslaunch uuv_control_cascaded_pid joy_velocity.launch uuv_name:=rexrov model_name:=rexrov joy_id:=0
In this case model_name
refers to the vehicle model, which can be different from the namespace
. It is a necessary parameter to load the correct controller and thruster allocation matrix coefficients. The joystick ID is already set zero as default. To find the correct joystick index, you can install and run jstest-gtk
.
The mapping of the joystick teleoperation node is set as default for the XBox 360 controller. Remapping is possible by passing the correct indexes of the desired axes in the launch file located in the
uuv_vehicle_teleop
.