# Revision history [back]

### Gazebo image topic encoding

I'm having problems with the image topics published by Gazebo. A simple check with rviz or image_view yields that somethings wrong with the "encoding" field of the Image message.

I tried to modify this line in the robot urdf I'm using but it turned out after a bit of checking the logs that it does not really do anything with the field no matter if it's set to rgb8 or bgr8.

<xacro:stereo_camera_v0 parent="head_2_link" name="stereo" focal_length="3    57.95" hfov="85" image_format="rgb8" image_width="656" image_height="492" >

Error parsing image format (bgr8), using default Ogre::PF_BYTE_RGB


It is publishing images with encoding field set to sensor_msgs::image_encodings::BGR8 no matter what, while the actual encoding is BGR8.

How can I fix this? I would like to use the same node in Gazebo and on the robot without additional workaround.