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

no disparity output of stereo_image_proc

asked 2012-03-08 08:37:22 -0500

Robo gravatar image

updated 2012-03-09 04:10:09 -0500

I'm running ROS Electric on Ubuntu 11.10 x86 with Linux kernel 3.0.0-16-generic-pae and I'm experiencing almost the same problem as in thread:No-disparity-on-output-of-stereo_image_proc. I'm using a pair of PointGrey Chameleon cameras, and I get both left and right rectified mono and color topic at 15Hz, verified with rostopic hz and image_view on the following topics:


I'm running stereo_image_proc with _approximate_sync:=True parameter but the problem is I'm getting no messages on /stereo/disparity topic. Can anyone help me solve this issue? I know there were a few facing almost the same problem, but I can't manage to find a correct solution to this problem, other than using __approximate_sync=true.

I'm using a launch file to run stereo_image_proc in the same namespace as the camera drivers, that look something like this:

<group ns="stereo" >
<!-- left camera -->
<node pkg="camera1394" type="camera1394_node" name="left" >
 <param name="guid" value="00b09d01009a2931" />
  <param name="video_mode" value="1280x960_mono8" />
  <param name="iso_speed" value="400" />
  <param name="frame_id" value="camera_left" />
  <param name="frame_rate" value="15" />
  <param name="bayer_pattern" value="gbrg" />
  <param name="bayer_method" value="" />
  <param name="camera_info_url" value="file:///home/robo/.ros/camera_info/00b09d01009a2931.yaml" />
  <remap from="camera" to="left" />
 <!-- right camera -->
 <node pkg="camera1394" type="camera1394_node" name="right">
<param name="guid" value="00b09d01009a290e" />
  <param name="video_mode" value="1280x960_mono8" />
  <param name="iso_speed" value="400" />
  <param name="frame_id" value="camera_right" />
  <param name="frame_rate" value="15" />
  <param name="bayer_pattern" value="gbrg" />
  <param name="bayer_method" value="" />
  <param name="camera_info_url" value="file:///home/robo/.ros/camera_info/00b09d01009a290e.yaml" />
   <remap from="camera" to="right" />
<node pkg="stereo_image_proc" type="stereo_image_proc" respawn="false" name="stereo_image_proc" args="_approximate_sync:=True">

</group> </launch>

The same thing happens if I don't run stereo_image_proc in the launch file, but instead I use the command: ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc __name:=proc __approximate_sync:=True

In both cases I'm getting rectified color images from both cameras (inspected with image_view)


edit retag flag offensive close merge delete


please also post the exact command you use to run stereo_image_proc

Bence Magyar gravatar image Bence Magyar  ( 2012-03-09 02:29:11 -0500 )edit

It seems that I cannot comment on your answer: I've tried that and a couple of other things. To me, the situation looks like this: stere_image_proc is conected (tested with rxgraph as well) to the right topics and is publising rectified images. The issue is with disparity and pointcloud topics

Robo gravatar image Robo  ( 2012-03-12 04:46:39 -0500 )edit

Robo -- which part of Bences solution worked for you? I'm having a similar problem. I can see the rectified output images, but not a disparity image.

Benjamin Blumer gravatar image Benjamin Blumer  ( 2015-09-22 22:50:02 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-12 00:17:55 -0500

Bence Magyar gravatar image

ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc /stereo/left/image_raw:=/stereo/left/image /stereo/right/image_raw:=/stereo/right/image

Sorry but based on these I don't have the direct solution. I used to run the command above because I only have that 2 image topics in my datasets.

Also there are some packages that sometimes won't get the topic namespace right if you put it like this: "ROS_NAMESPACE=stereo" but using this works: "ROS_NAMESPACE=/stereo" -- although as it can be seen it's working for me in this case

To check if the data flow is right I used to use rxgraph with all_topics checked. That's all the hints I could give you, good luck :)

edit flag offensive delete link more

answered 2017-01-18 11:07:29 -0500

Benjamin Blumer gravatar image

I stumbled upon this question again. The answer has a few parts:

A) There's a fix to the image_pipeline collection of packages that fixes issues with stereo_view. At the time of writing, it's been pulled into the repository, but it's not a part of the binary yet. So you have to build it from scratch. Just download the package and put it in your catkin workspace and catkin_make. As long as the workspace is sourced, this package will be used instead of the binary that comes with ROS.

B) To run the calibration, you might need to add the --approximate=0.1 flag. e.g. rosrun camera_calibration --size 8x6 --square 0.108 --approximate=0.1 right:=/stereo/right/image_raw left:=/stereo/left/image_raw left_camera:=/stereo/left right_camera:=/stereo/right

C) Make sure your cameras are loading their calibration files by adding <param name="camera_info_url" value="package://PATH_TO_YOUR_FILE/right_camera.yaml"/> to the launch file (where PATH_TO_YOUR_FILE can be a ros package and right_camera.yaml is the calibration file (.yaml) generated by the calibration code).

D) When running stereo_proc, include the approximate sync parameter. e.g.: ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc stereo:=stereo image:=image_rect _approximate_sync:=true

E) When running the viewer, include the approximate sync parameter. e.g.: rosrun image_view stereo_view stereo:=stereo image:=image_rect _approximate_sync:=True

edit flag offensive delete link more

Question Tools


Asked: 2012-03-08 08:37:22 -0500

Seen: 3,358 times

Last updated: Jan 18 '17