0
$\begingroup$

Rosanswers logo

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.


Originally posted by Bence Magyar on ROS Answers with karma: 358 on 2012-04-23

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by hsu with karma: 5780 on 2012-04-25

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

http://docs.ros.org/jade/api/gazebo_plugins/html/gazebo__ros__camera__utils_8cpp_source.html

there is also "L8" for monochrome images


Originally posted by shaviland3 with karma: 11 on 2016-06-23

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.