User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cs:simulator:thrusterplugin:start [2016/12/12 16:13]
Dustin Crossman
cs:simulator:thrusterplugin:start [2016/12/16 12:42] (current)
Dustin Crossman
Line 1: Line 1:
 ====== Thruster Plugin ====== ====== Thruster Plugin ======
-The thruster plugin is a gazebo ​plugin used to do a number ​of things.+The thruster plugin ​runs the thrusters for our simulated sub. It is responsible for: 
 +  * Running ​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 [[https://​github.com/​PalouseRobosub/​robosub_simulator/​blob/​master/​src/​thruster.cpp#​L88|here]]. 
 + 
 +To see the actual scaling and resizing steps see [[https://​github.com/​PalouseRobosub/​robosub_simulator/​blob/​master/​src/​thruster.cpp#​L145|UpdateVisualizers]].