-
Notifications
You must be signed in to change notification settings - Fork 197
tutorials PropulsionConfiguration
The effect of thrusters on the WAM-V is simulated by the usv_gazebo_thrust_plugin Gazebo model plugin. The plugin is configured using "thruster" tags within the SDF description. For this example, we are using the default configuration - the differential thrust with two thrusters. The propulsion configuration takes place in the wamv_aft_thrusters.xacro definition file which makes use of the general purpose xacro macro defined in wamv_gazebo_thruster_config.xacro. Within each thruster definition the "cmdTopic" tag specifies the ROS topic to which the plugin is subscribed. Messages of type std_msgs/Float32 are used to describe each thruster input. Each command is a normalized value between -1.0 to 1.0, where 1.0 is maximum forward force and -1.0 is maximum reverse force. The mapping between this normalized thruster command and the actual force applied to the model is discussed in Theory of Operation document.
The image below illustrates a few possible thruster configurations. Note that all the thrusters support variable stern.
The topics below illustrate how to run three of the four configurations.
The default configuration is the "H" configuration with two aft-mounted thrusters.
If you run the example simulation without any command line options
roslaunch vrx_gazebo sydneyregatta.launch
The thruster configuration should like similar to the image below.
To add a single lateral thruster requires the following changes:
- Set the "T" thruster configuration of the WAM-V in wamv_gazebo.urdf.xacro.
- This WAM-V xacro file includes a propulsion layout definition. For this example, the new thruster layout is defined in wamv_t_thruster.xacro
This example is already available in the repository and can be specified using the thrust_config
command line option of the launch file ...
roslaunch vrx_gazebo sydneyregatta.launch thrust_config:=T
To generate a WAM-V propulsion/thruster configuration that looks like the image below.
Using the same process describe above, we can add a new set of URDF descriptions (visual and plugin) to define the holonomic configuration. As an example, we can call this new setup by specifying the "X" thrust configuration...
roslaunch vrx_gazebo sydneyregatta.launch thrust_config:=X
For the purposes of illustration, we can spawn all three possible propulsion variants in a single world with the following:
roslaunch vrx_gazebo demo_thrusterconfigs.launch
Which should spawn three WAM-V models with the corresponding propulsion configurations shown in the image below.