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

Minoru 3D webcam calibration ros indigo

asked 2014-10-16 11:42:56 -0500

radisc gravatar image

updated 2014-10-22 10:56:46 -0500

Hi everyone,

i just bought a minoru 3d webcam to try using it as a low cost RGBD sensor, i'm working in ros indigo, i tried calibrationg the camera with the cameracalibrator.py util, the problem is that no matter how much frames i take the extrinsic calibration always fail because with the driver i was using there is too much lag between the frames of the two channels ( the camera is not synchronized ).

I tried several other drivers and the best so far ( the one that gives the best visual results in terms of lag ) seems the "usb_cam" driver. But if i use this driver the cameracalibrator.py node can't start i think this problem is related to the "set_camera_info" service as described in this link:

http://www.iheartrobotics.com/2010/05...

The fix they suggest in the python code is already present in my version but still it doesn't work. I don't need that service, since i just need to get calibration matrices i can set manually the calibration files. What can i do? Thank you all in advance!

EDIT: Here is my launch file:

<launch>

<node name="left_camera" 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="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>

</node>

<node name="right_camera" 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="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>

</node>

</launch>

And this is the command i use to launch the camera calibrator:

    rosrun camera_calibration cameracalibrator.py --size 9x6 --square 0.011 right:=/right_camera/image_raw left:=/left_camera/image_raw right_camera:=/right_camera left_camera:=/left_camera --no-service-check

And when i do so, simply nothing happens, no errors, no crashes. Maybe it keeps waiting for something?

This is the output of the rostopic list command:

/left_camera/camera_info
/left_camera/image_raw
/left_camera/image_raw/compressed
/left_camera/image_raw/compressed/parameter_descriptions
/left_camera/image_raw/compressed/parameter_updates
/left_camera/image_raw/compressedDepth
/left_camera/image_raw/compressedDepth/parameter_descriptions
/left_camera/image_raw/compressedDepth/parameter_updates
/left_camera/image_raw/theora
/left_camera/image_raw/theora/parameter_descriptions
/left_camera/image_raw/theora/parameter_updates
/right_camera/camera_info
/right_camera/image_raw
/right_camera/image_raw/compressed
/right_camera/image_raw/compressed/parameter_descriptions
/right_camera/image_raw/compressed/parameter_updates
/right_camera/image_raw/compressedDepth
/right_camera/image_raw/compressedDepth/parameter_descriptions
/right_camera/image_raw/compressedDepth/parameter_updates
/right_camera/image_raw/theora
/right_camera/image_raw/theora/parameter_descriptions
/right_camera/image_raw/theora/parameter_updates
/rosout
/rosout_agg

EDIT2:

I've edited my launch file to use uvc_camera:

<launch>
<node pkg="uvc_camera" type="uvc_stereo_node" name="uvc_camera_stereo">

    <param name="width" type="int" value="640" />
    <param name="height" type="int" value="480" />
    <param name="fps" type="int" value="20" />
    <param name="frame" type="string" value="minoru" />

    <!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->

    <param name="left/device" type="string" value="/dev/video1" />
    <param name="right/device" type="string" value="/dev/video2" />
    <param name="left/camera_info_url" type="string" value="file://$(find uvc_camera)/example-left.yaml" />
    <param name="right/camera_info_url" type="string" value ...
(more)
edit retag flag offensive close merge delete

Comments

Please edit your question to include a copy and paste of the exact command and the exact error message you get when starting the camera calibration.

ahendrix gravatar image ahendrix  ( 2014-10-16 11:54:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-10-19 12:18:25 -0500

ahendrix gravatar image

updated 2014-10-22 12:50:51 -0500

Two things to try:

  • Add the --approximate=0.01 flag to the cameracalibrator to compensate for the timestamp mismatch between cameras. You can try slowly increasing the value until it works, but if you increase the value to something above the inter-frame period for your camera, it probably isn't working.(documented here)
  • Try the stereo_node from the uvc_camera package. The docs indicate that it will publish synchronized image pairs from a pair of unsynchronized cameras.

EDIT:

You have cheap cameras that are not synchronized in hardware. These techniques will help match up the most closely captured images, but they won't fix the underlying synchronization problem.

edit flag offensive delete link more

Comments

I can confirm that uvc_camera works well for stereo with independent usb webcams.

andreasBihlmaier gravatar image andreasBihlmaier  ( 2014-10-21 01:42:28 -0500 )edit

Thank you very much, the "--approximate" flag worked! (Sorry for the ale answer)

radisc gravatar image radisc  ( 2016-11-02 04:27:10 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-16 11:42:56 -0500

Seen: 844 times

Last updated: Oct 22 '14