When we run the submarine in Gazebo we already know its perfect position because the physics engine calculates them every tick. We want to get the exact position of the submarine to compare to the data given by the sensors. You will want to add code in simulation/subjugator_gazebo There is good documentation about how to add a plugin into the CMakeList.txt file in the actual CMakeList.txt file in simulation/subjugator_gazebo. I would also look at how the depth sensor plugin works since that uses gazebos absolute value aswell. https://classic.gazebosim.org/tutorials?tut=ros_gzplugins