ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Gazebo image topic encoding

asked 2012-04-23 23:16:05 -0500

Bence Magyar gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-04-25 22:32:00 -0500

hsu gravatar image

The available image_format values for gazebo are R8G8B8, B8G8R8, BAYER_RGGB8, BAYER_BGGR8, BAYER_GBRG8 and BAYER_GRBG8.

edit flag offensive delete link more
1

answered 2016-06-23 15:53:52 -0500

shaviland3 gravatar image

http://docs.ros.org/jade/api/gazebo_p...

there is also "L8" for monochrome images

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-23 23:16:05 -0500

Seen: 1,836 times

Last updated: Apr 25 '12