Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

Solution by barcelosandre works like a charm. You have to change the transform between the camera and the robot. You can do so by writing a TF publisher node, but in most cases the ROBOT_STATE_PUBLISHER node will publish your tf for you according to your URDF. So you can modify the URDF, create a dummy link(kinect_optical_link) wrt the camera link rotated by RPY(-pi/2, 0, -pi/2) wrt the camera link and set this as your camera plugins frameName. Note: Don't change the <gazebo "reference"=""> tag. The code can be found here for better explanation: https://paste.ubuntu.com/p/bFJPHVDNVQ/

Solution by barcelosandre works like a charm. You have to change the transform between the camera and the robot. You can do so by writing a TF publisher node, but in most cases the ROBOT_STATE_PUBLISHER node will publish your tf for you according to your URDF. So you can modify the URDF, create a dummy link(kinect_optical_link) wrt the camera link rotated by RPY(-pi/2, 0, -pi/2) wrt the camera link and set this as your camera plugins frameName. Note: Don't change the <gazebo "reference"=""> gazebo "reference" tag. The code can be found here for better explanation: https://paste.ubuntu.com/p/bFJPHVDNVQ/

Solution by barcelosandre works like a charm. You have to change the transform between the camera and the robot. You can do so by writing a TF publisher node, but in most cases the ROBOT_STATE_PUBLISHER node will publish your tf for you according to your URDF. So you can modify the URDF, create a dummy link(kinect_optical_link) wrt the camera link rotated by RPY(-pi/2, 0, -pi/2) wrt the camera link and set this as your camera plugins frameName. Note: Don't change the gazebo "reference" tag. The code can be found here for better explanation: https://paste.ubuntu.com/p/bFJPHVDNVQ/