-
Notifications
You must be signed in to change notification settings - Fork 73
New Underwater Vehicle
In this example we will integrate a new robot with the name smilodon
.
Assumes we start with visual/collision meshes and texture image files.
- Create a new ROS project:
smilodon_gazebo
, add ameshes
directory and copy the mesh files and image file. - May be necessary to edit the visual mesh file to link to the correct texture filename. Simply search for image in the .dae file and replace as necessary.
- Check the visual mesh by importing the mesh using blender and/or meshlab.
Create smilodon_gazebo/launch/smilodon.launch
to do the following...
- Start gazebo with an underwater world.
- Load the robot URDF (see next step) to the parameter server
- Spawn the robot in the world
- Start
robot_state_publisher
node
In smilodon_gazebo/urdf
create smilodon_gazebo.xacro
to do the following...
- Create
base_link
with the rigid-body parameters and the visual/collision meshes - Attach the
uuv_underwater_object_ros_plugin
and specify the hydrodynamic parameters. - Attach a
gazebo_ros_control
plugin. - Attache a custom
uuv_joint_state_publisher
Note: It is sometimes handy during testing to set <neutrally_buoyant>1</neutrally_buoyant>
within the parameters for the uuv_underwater_object_ros_plugin
.
roslaunch smilodon_gazebo smilodon.launch
/tutorials/images/smilodon1.png
Edit smilodon_gazebo/urdf/smilodon_gazebo.xacro
to add thruster definition macros.
- Define location of the propellors - can superimpose on vehicle mesh
- Set the motor constant to map the command (input) to thrust.
- User the thruster_snippets.xacro definitions which make use of the ThrusterROSPlugin
/tutorials/images/smilodon_props.png
Here is a video of spinning the props.
Illustrates publishing a thruster input
rostopic pub /smilodon/thrusters/0/input uuv_gazebo_ros_plugins_msgs/FloatStamped "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
data: -200.0"
and monitoring the resulting thrust
rostopic echo /smilodon/thrusters/0/thrust
The custom joy_thrusterop.py
has a hardcoded mapping from joystick axes to each thruster. This allows us to drive the vehicle in an open-loop configuration.
Run the telop with
roslaunch uuv_dave joy_thrusterop.launch
Here is another video showing what to expect.