-
Notifications
You must be signed in to change notification settings - Fork 74
Notes
- Platform versions: ROS Melodic, Ubuntu 18, Gazebo 9
- Bosch UUV Simulator, https://roscon.ros.org/2018/presentations/ROSCon2018_uuvsimulator.pdf
- plume tracking
- Gazebo plugins and ROS modules
-
If installed from package for ros-kinetic,
roslaunch --files uuv_descriptions upload_rexrov.launch
shows:/opt/ros/melodic/share/uuv_assistants/launch/message_to_tf.launch /opt/ros/melodic/share/uuv_descriptions/launch/upload_rexrov_default.launch /opt/ros/melodic/share/uuv_descriptions/launch/upload_rexrov.launch
Rather than installing and using this package, build it from source under workspace
uuv_ws
. -
When installed from our
uuv_ws
workspace,roslaunch --files uuv_descriptions upload_rexrov.launch
shows:/home/bdallen/uuv_ws/src/uuv_simulator/uuv_descriptions/launch/upload_rexrov.launch /home/bdallen/uuv_ws/src/uuv_simulator/uuv_descriptions/launch/upload_rexrov_default.launch /home/bdallen/uuv_ws/src/uuv_simulator/uuv_assistants/launch/message_to_tf.launch
and
roslaunch --files uuv_gazebo_worlds ocean_waves.launch
shows:/opt/ros/melodic/share/gazebo_ros/launch/empty_world.launch /home/bdallen/uuv_ws/src/uuv_simulator/uuv_gazebo_worlds/launch/ocean_waves.launch /home/bdallen/uuv_ws/src/uuv_simulator/uuv_assistants/launch/publish_world_ned_frame.launch
In page uuv_simulator reference we launched the ocean waves world and spawned a UUV at coordinate(0,0,-20). Here we examine the .launch
files, .world
files, and other code that makes this happen. Later we explore additions to this to provide a target capability: Grasp a ceramic cup.
Launch file ocean_waves.launch
does this:
- Include Gazebo's
empty_world.launch
. - Include
uuv_assistants
filepublish_world_ned_frame.launch
. - Start node
publish_world_models
runningpublish_world_models.py
. - Optionally launch
uuv_assistants
fileset_simulation_timer.launch
.
On default, starts upload_rexrov_default.launch
with initial x,y,z,roll,pitch,yaw values.
This launch file, https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_ros/launch/empty_world.launch, starts Gazebo, defining default parameters and opening /usr/share/gazebo-9/empty.world
:
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<!-- A ground plane -->
<include>
<uri>model://ground_plane</uri>
</include>
</world>
</sdf>
which defines world "default" with light and ground.
For launch file syntax, see http://wiki.ros.org/roslaunch.
File ~/uuv_ws/src/uuv_simulator/uuv_assistants/templates/robot_model/urdf/sensors.xacro.template
identifies example sensors: GPS, Pose 3D sensor, forward-looking sonar, DVL, RPT, Pressure, IMU, camera. See ~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins/uuv_sensor_ros_plugins/urdf/*.xacro
for more.
File ~/uuv_ws/src/uuv_simulator/uuv_descriptions/robots/rexrov_sonar.xacro
has xacro:forward_multibeam_sonar_m450_130
. It uses plugin name uuv_plugin
filename libuuv_underwater_object_ros_plugin.so
built from ~/uuv_ws/src/uuv_simulator/uuv_gazebo_plugins/uuv_gazebo_ros_plugins/src/UnderwaterObjectROSPlugin.cc
. It connects services for modeling underwater properties.
File ~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins
has plugins, for example ~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins/uuv_sensor_ros_plugins/include/uuv_sensor_ros_plugins/gazebo_ros_image_sonar.hh
, .cpp
. From CMakeLists.txt
this makes image_sonar_ros_plugin.so
. File image_sonar_ros_plugin.so
is referenced in ~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins/uuv_sensor_ros_plugins/urdf/sonar_snippets.xacro
. File sonar_snippets.xacro
is referenced in ~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins/uuv_sensor_ros_plugins/urdf/sensor_snippets.xacro
. File sensor_snippets.xacro
is included from the following:
~/uuv_ws/src/uuv_simulator/uuv_assistants/templates/robot_model/urdf/base.xacro.template
~/uuv_ws/src/uuv_simulator/uuv_descriptions/urdf/rexrov_base.xacro
~/uuv_ws/src/uuv_simulator/uuv_sensor_plugins/uuv_sensor_ros_plugins/urdf/sensor_snippets.xacro
~/uuv_ws/src/uuv_simulator/uuv_tutorials/uuv_tutorial_rov_model/urdf/rov_example_base.xacro
File rexrov_base.xacro
is included in several rexrov_*
files, including ~/uuv_ws/src/uuv_simulator/uuv_descriptions/robots/rexrov_oberon7.xacro
, which is included in the ~/uuv_ws/src/uuv_simulator/uuv_descriptions/launch/upload_rexrov_oberon7.launch
file which we are using, meaning that the image_sonar_ros_plugin
plugin is available in Gazebo.