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

stereo_image_proc : Assertion `left_.fx() == right_.fx()'

asked 2011-08-24 20:52:52 -0600

Daniel Eberli gravatar image

updated 2011-08-24 22:45:27 -0600

I am trying to get stereo_image_proc running.

I have two externally triggered Prosilica GC655C cameras. The camera drivers are working, so I can retrieve single image views without any problem. However trying to view the disparity image with disparity viewer or stereo view with stereo viewer fails.

rosrun image_view disparity_view image:=prosilica/disparity

fails with the error:

stereo_image_proc: /tmp/buildd/ros-diamondback-vision-opencv-1.4.3/debian/ros-diamondback-vision-opencv/opt/ros/diamondback/stacks/vision_opencv/image_geometry/src/stereo_camera_model.cpp:29: bool image_geometry::StereoCameraModel::fromCameraInfo(const sensor_msgs::CameraInfo&, const sensor_msgs::CameraInfo&): Assertion `left_.fx() == right_.fx()' failed.

for me it's very strange why the camera parameters left_.fx() and right_.fx() must be equal?! Since I use two cameras, (each camera calibrated as mono camera was working) the two parameters differ slightly.

Does someone has an idea why the parameters have to be equal?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2011-08-25 18:41:31 -0600

Daniel Eberli gravatar image

found the solution by myself.

i did not read properly the comments about camera calibration. in

rosrun camera_calibration cameracalibrator.py [..]

i used _approximate_sync:=True instead of --approximate 0.01. Doing calibration properly will also make the stereo_image_proc work properly.

edit flag offensive delete link more
0

answered 2012-05-10 08:16:55 -0600

Talhada gravatar image

Hello! I have the same error:

stereo_image_proc: /tmp/buildd/ros-electric-vision-opencv-1.6.13/debian/ros-electric-vision-opencv/opt/ros/electric/stacks/vision_opencv/image_geometry/src/stereo_camera_model.cpp:30: bool image_geometry::StereoCameraModel::fromCameraInfo(const sensor_msgs::CameraInfo&, const sensor_msgs::CameraInfo&): Assertion `left_.fy() == right_.fy()' failed. Aborted

Here is my node launch file:

<group ns="xb3_short"> <node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" args="_approximate_sync:=True _prefilter_size:=255 _prefilter_cap:=63 _correlation_window_size:=31 _min_disparity:=0 _disparity_range:=32 _uniqueness_ratio:=10 _texture_threshold:=100a _speckle_size:=400 _speckle_range:=15 __name:=xb3_short_stereo_proc"/> </group>

I checked the timestamps for left and right camera info topics and they match. Any idea? Thanks.

edit flag offensive delete link more
0

answered 2015-01-10 13:51:36 -0600

SHV gravatar image

I hope following helps in case of usb_cam driver: in the launch file for each node publishing left and right images respectively, set camera_frame_id same for each node (say "usb_cam"), e.g. create a launch file named usb_cam_stereo.launch :

<launch>
  <group ns="stereo">
    <node name="left" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="video_device" value="/dev/video1" />
        <param name="image_width" value="320" />
        <param name="image_height" value="240" />
        <param name="pixel_format" value="mjpeg" />
        <param name="camera_frame_id" value="usb_cam" />
        <param name="io_method" value="userptr"/>      
    </node>
    <node name="right" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="video_device" value="/dev/video2" />
        <param name="image_width" value="320" />
        <param name="image_height" value="240" />
        <param name="pixel_format" value="mjpeg" />
        <param name="camera_frame_id" value="usb_cam" />
        <param name="io_method" value="userptr"/>      
    </node>  
  </group>  
</launch>

and run following on terminal:

$roslaunch usb_cam_stereo.launch

ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc _approximate_sync:=True _queue_size:=4

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-08-24 20:52:52 -0600

Seen: 726 times

Last updated: May 10 '12