User Tools


Thruster Plugin

The thruster plugin runs the thrusters for our simulated sub. It is responsible for:

  • Running a ROS node that receives thruster messages and then adds forces as appropriate.
  • Visualizing the thruster output graphically by sending visual messages to the gazebo server. These are distinct from ROS messages and will covered in the next section.
  • Add buoyancy to the submarine. We do this manually in the thruster plugin instead of utilizing the built-in buoyancy plugin because we found the buoyancy plugin to behave weirdly.

Thruster Visualizer

When gazebo is run it starts both a server (gzserver) and a client (gzclient). Since model plugins are run on the server but visuals are run on the client gazebo messages must be sent from the thruster plugin (which is a model plugin) to the client in order to add visuals to the simulator.

To visualize each thruster a very narrow cylinder is defined for each. This cylinder is then scaled and positioned each time a new thruster message is recieved. To see how the visual messages are defined see here.

To see the actual scaling and resizing steps see UpdateVisualizers.