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

image_view stereo_view don't show image or disparity (ROS Kinetic)

asked 2016-06-09 15:24:42 -0600

uwleahcim gravatar image

updated 2016-06-10 06:49:41 -0600

I'm running ROS Kinetic Kame on Ubuntu 16.04. I have 2 320x240 gray-scale cameras with camera_info generated by running camera_calibration.

I have the following topics

/camera/front/left/image_raw
/camera/front/right/image_raw
/camera/front/left/camera_info
/camera/front/right/camera_info

I then generate the disparty map using

ROS_NAMESPACE=/camera/front rosrun stereo_image_proc stereo_image_proc

This generates a bunch of topics

/camera/front/disparity
/camera/front/left/image_color
/camera/front/left/image_color/compressed
/camera/front/left/image_color/compressed/parameter_descriptions
/camera/front/left/image_color/compressed/parameter_updates
/camera/front/left/image_color/compressedDepth
/camera/front/left/image_color/compressedDepth/parameter_descriptions
/camera/front/left/image_color/compressedDepth/parameter_updates
/camera/front/left/image_color/theora
/camera/front/left/image_color/theora/parameter_descriptions
/camera/front/left/image_color/theora/parameter_updates
/camera/front/left/image_mono
/camera/front/left/image_mono/compressed
/camera/front/left/image_mono/compressed/parameter_descriptions
/camera/front/left/image_mono/compressed/parameter_updates
/camera/front/left/image_mono/compressedDepth
/camera/front/left/image_mono/compressedDepth/parameter_descriptions
/camera/front/left/image_mono/compressedDepth/parameter_updates
/camera/front/left/image_mono/theora
/camera/front/left/image_mono/theora/parameter_descriptions
/camera/front/left/image_mono/theora/parameter_updates
/camera/front/left/image_rect
/camera/front/left/image_rect/compressed
/camera/front/left/image_rect/compressed/parameter_descriptions
/camera/front/left/image_rect/compressed/parameter_updates
/camera/front/left/image_rect/compressedDepth
/camera/front/left/image_rect/compressedDepth/parameter_descriptions
/camera/front/left/image_rect/compressedDepth/parameter_updates
/camera/front/left/image_rect/theora
/camera/front/left/image_rect/theora/parameter_descriptions
/camera/front/left/image_rect/theora/parameter_updates
/camera/front/left/image_rect_color
/camera/front/left/image_rect_color/compressed
/camera/front/left/image_rect_color/compressed/parameter_descriptions
/camera/front/left/image_rect_color/compressed/parameter_updates
/camera/front/left/image_rect_color/compressedDepth
/camera/front/left/image_rect_color/compressedDepth/parameter_descriptions
/camera/front/left/image_rect_color/compressedDepth/parameter_updates
/camera/front/left/image_rect_color/theora
/camera/front/left/image_rect_color/theora/parameter_descriptions
/camera/front/left/image_rect_color/theora/parameter_updates
/camera/front/points2
/camera/front/right/image_color
/camera/front/right/image_color/compressed
/camera/front/right/image_color/compressed/parameter_descriptions
/camera/front/right/image_color/compressed/parameter_updates
/camera/front/right/image_color/compressedDepth
/camera/front/right/image_color/compressedDepth/parameter_descriptions
/camera/front/right/image_color/compressedDepth/parameter_updates
/camera/front/right/image_color/theora
/camera/front/right/image_color/theora/parameter_descriptions
/camera/front/right/image_color/theora/parameter_updates
/camera/front/right/image_mono
/camera/front/right/image_mono/compressed
/camera/front/right/image_mono/compressed/parameter_descriptions
/camera/front/right/image_mono/compressed/parameter_updates
/camera/front/right/image_mono/compressedDepth
/camera/front/right/image_mono/compressedDepth/parameter_descriptions
/camera/front/right/image_mono/compressedDepth/parameter_updates
/camera/front/right/image_mono/theora
/camera/front/right/image_mono/theora/parameter_descriptions
/camera/front/right/image_mono/theora/parameter_updates
/camera/front/right/image_rect
/camera/front/right/image_rect/compressed
/camera/front/right/image_rect/compressed/parameter_descriptions
/camera/front/right/image_rect/compressed/parameter_updates
/camera/front/right/image_rect/compressedDepth
/camera/front/right/image_rect/compressedDepth/parameter_descriptions
/camera/front/right/image_rect/compressedDepth/parameter_updates
/camera/front/right/image_rect/theora
/camera/front/right/image_rect/theora/parameter_descriptions
/camera/front/right/image_rect/theora/parameter_updates
/camera/front/right/image_rect_color
/camera/front/right/image_rect_color/compressed
/camera/front/right/image_rect_color/compressed/parameter_descriptions
/camera/front/right/image_rect_color/compressed/parameter_updates
/camera/front/right/image_rect_color/compressedDepth
/camera/front/right/image_rect_color/compressedDepth/parameter_descriptions
/camera/front/right/image_rect_color/compressedDepth/parameter_updates
/camera/front/right/image_rect_color/theora
/camera/front/right/image_rect_color ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-06-09 16:25:01 -0600

uwleahcim gravatar image

updated 2016-06-09 16:25:48 -0600

Well, I tried running my code on a machine with ROS Inidigo and Ubuntu 14.04, and I had no issue displaying the displarity image with image_view stereo_view. Thus, I'm thinking this might be an issue with either ROS Kinetic Kame.

edit flag offensive delete link more

Comments

Dis you manage to resolve this?

glagla gravatar image glagla  ( 2016-07-21 06:45:22 -0600 )edit

I haven't tried displaying the disparity topic with image_view stereo_view. I did convert the disparity topics into depth map using camera_info from the right camera (it has the baseline in the projection matrix). From there I was able to display the depth map via rqt_image_view.

uwleahcim gravatar image uwleahcim  ( 2016-07-21 07:43:16 -0600 )edit

Could you please post the steps to convert the disparity topic into a depth map by using camera_info from the right camera. Not sure I follow what you did there and I would like to repeat

apetersen gravatar image apetersen  ( 2016-08-02 14:27:55 -0600 )edit

the disparity image generate by stereo_image_proc is a floating point image following the ROS guidelines. Thus it is very simple and straight forward to convert it into a depth map. This math is simply just

depth = baseline * focallength / disparity

(don't have space to post full code).

uwleahcim gravatar image uwleahcim  ( 2016-08-02 15:00:30 -0600 )edit

Could you send me the code you tried by mail? @ svendxs@gmail.com please?

glagla gravatar image glagla  ( 2016-08-03 06:48:24 -0600 )edit
0

answered 2016-08-04 14:44:29 -0600

It does seem like something might be up with the kinetic disparity view. When I "rostopic echo /stereo/disparity" I see the data flowing but is seems like something wrong with the valid_window data height and width numbers (see below):

rostopic echo /stereo/disparity

...... 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191] f: 739.351379395 T: 0.323849737644 valid_window: x_offset: 70 y_offset: 7 height: 4294967281 width: 4294967218 do_rectify: False min_disparity: 0.0 max_disparity: 63.0 delta_d: 0.0625

Is there a setting earlier in the chain that would screw up these numbers?
The images being fed into the system are 640x480

edit flag offensive delete link more

Comments

I'm having a similar outputs, though this seems to be an issue with Kinetic stereo_image_proc than disparity_view. Edit - Testing on Indigo revealed the same output as Kinetic, with the disparity being able to be displayed by disparity_view. This does suggest the something has broken the viewer.

cavusa gravatar image cavusa  ( 2016-09-07 10:58:09 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2016-06-09 15:24:42 -0600

Seen: 1,102 times

Last updated: Aug 04 '16