ros_camera_info service not found for usb_cam
Hi!
I use 2 USB cameras for stereo vision with the usb_cam driver in ROS Groovy and I would like to calibrate them with the camera_calibration package. I start the cameras with the following launch file:
<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="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="left" />
<param name="io_method" value="mmap"/>
</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="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="right" />
<param name="io_method" value="mmap"/>
</node>
</group>
</launch>
they work nicely. Then I want to calibrate them with the following command:
rosrun camera_calibration cameracalibrator.py --size 9x7 --square 0.0053 right:=/stereo/right/image_raw left:=/stereo/left/image_raw left_camera:=/stereo/left right_camera:=/stereo/right --approximate=0.005
and it generates the following errors:
Waiting for service /stereo/left/set_camera_info ...
Service not found
Waiting for service /stereo/right/set_camera_info ...
Service not found
Why? How can I fix it?
I know I can use the the --no-service-check
parameter and it works afterwards, but it won't commit then the calibration parameters to cameras. What is the proper way to do camera calibration with the usb_cam driver?
Running the calibration with the --no-service-check
parameter works and results a /tmp/calibrationdata.tar.gz
file which contains the ost.txt
text file with the calibration parameters. But I don't know what to do with this data in order to use the stereo vision. Can anybody help me here?
Update 1:
the /stereo/left/camera_info do exists in my case and the rostopic echo /stereo/left/camera_info
streams messages like this:
---
header:
seq: 1383
stamp:
secs: 1368623369
nsecs: 14836818
frame_id: left
height: 480
width: 640
distortion_model: ''
D: []
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
---
Update 2:
the rosservice list
query results the following output:
/rosout/get_loggers
/rosout/set_logger_level
/stereo/left/get_loggers
/stereo/left/image_raw/compressed/set_parameters
/stereo/left/image_raw/compressedDepth/set_parameters
/stereo/left/image_raw/theora/set_parameters
/stereo/left/set_logger_level
/stereo/right/get_loggers
/stereo/right/image_raw/compressed/set_parameters
/stereo/right/image_raw/compressedDepth/set_parameters
/stereo/right/image_raw/theora/set_parameters
/stereo/right/set_logger_level
I don't see any code in that driver to publish the
set_camera_info
service. What doesrosservice list
print when the driver is running?I am at home now, and I have here different USB cameras but everything else is the same, same laptop, same setup. I made a query
rosservice list
and I got the stuff that I just included above in the original question.