Incorrect camera extrinsics for simulated Gazebo cameras
I am simulating several cameras in Gazebo using the gazebo_ros_camera
plugin in the gazebo_plugins
package. All of the cameras are defined in the robot's URDF and the corresponding coordinate frames are published by the joint_state_publisher
and robot_state_publisher
nodes.
When I view frames captured from the simulated cameras, it is clear that they are pointing in roughly the correct direction. If I view the simulated world in RViz, the visualized world renders correctly for horizontal cameras (left), but not for cameras with a non-zero pitch (right):
It appears that the images captured in Gazebo have approximately twice the pitch that is specified in the URDF (note how the ground plane projected by RViz is too high in the right image). Has anyone else run into a similar problem?