====== Simulator Bridge ====== The simulator bridge is ROS node which subscribes to the /gazebo/model_states message that gazebo publishes. The model states message ([[http://docs.ros.org/indigo/api/gazebo_msgs/html/msg/ModelStates.html|ModelStates]]) contains position, orientation, linear velocity, and angular velocity for each model in the simulator. This includes the sub, the top of the water, the start gate, the pinger, etc. The simulator bridge is responsible for taking the model states input and outputting the following information on the specified topics: ==== /position ==== Message: [[https://docs.ros2.org/foxy/api/geometry_msgs/msg/Vector3.html | geometry_msgs/Vector3 ]] \\ The true current position of the sub, given as x, y, z. ==== /orientation ==== Message: [[https://docs.ros2.org/foxy/api/geometry_msgs/msg/QuaternionStamped.html | geometry_msgs/QuaternionStamped ]] \\ The true current orientation of the sub, given as quaternion. ==== /orientation/pretty ==== Message: [[https://gitlab.com/PalouseRobosub/Software/robosub_msgs/-/blob/master/msg/Euler.msg | robosub_msgs/Euler ]] \\ The true current orientation of the sub, given as roll, pitch, yaw. This is for human readability only. Any nodes wishing to make use of this data should subscribe to the /orientation topic. ==== /depth ==== Message: [[https://gitlab.com/PalouseRobosub/Software/robosub_msgs/-/blob/master/msg/Float32Stamped.msg | robosub_msgs/Float32Stamped ]] \\ The true current depth of the sub, calculated by subtracting the z position of the sub from the z position of the top of the water. ==== /obstacles/positions ==== Message: [[https://gitlab.com/PalouseRobosub/Software/robosub_msgs/-/blob/master/msg/ObstaclePosArray.msg | robosub_msgs/ObstaclePosArray ]] \\ The true current position of a list of obstacles in the pool. This list is taken from the [[https://gitlab.com/PalouseRobosub/Software/robosub_simulator/-/blob/master/param/obstacles.yaml | robosub_simulator/obstacles.yaml ]]. ==== /hydrophone/30khz/delta ==== Message: [[https://gitlab.com/PalouseRobosub/Software/robosub_msgs/-/blob/master/msg/HydrophoneDeltas.msg | robosub_msgs/HydrophoneDeltas ]] \\ Simulated hydrophone system output. This is calculated based on the position of the subs hydrophones and the pinger.