0
$\begingroup$

Rosanswers logo

I'm trying to calibrate a stereo-pair. Both cameras are working and I am using the approximate synchronization feature. I'm using the following launch file to start the stereo pair:

<launch>
<group ns="/stereo" >
<node pkg="camera1394" type="camera1394_node" name="left" args="_guid:=00b09d017643567 >
     <param name="video_mode" value="640x480_mono8" />
 <param name="use_ros_time" value="True" />
 <param name="frame_id" value="camera" />
<param name="camera_info_url" value="file:///home/gabe/.ros/camera_left_mono_test.yaml" />
<remap from="camera" to="left" />
 </node>
 <node pkg="camera1394" type="camera1394_node" name="right" args="_guid:=00b09d0100a74587e"  >
  <param name="video_mode" value="640x480_mono8" />
      <param name="use_ros_time" value="True" />
<param name="frame_id" value="camera" />
<param name="camera_info_url" value="file:///home/gabe/.ros/camera_right_mono_test.yaml" />
     <remap from="camera" to="right" />
  </node>
  </group>

then I'm trying to run the camera calibrator and I get the following error

rosrun camera_calibration cameracalibrator.py --approximate=0.1 --size  7x6 --square 0.034 right:=/stereo/right/image_raw left:=/stereo/left/image_raw right_camera:=/stereo/right left_camera:=/stereo/left
Waiting for service /stereo/left/set_camera_info ...
OK
Waiting for service /stereo/right/set_camera_info ...
OK
[ERROR] [WallTime: 1335196035.835285] bad callback: <bound method    Subscriber.callback of <message_filters.Subscriber instance at 0x2c8ed88>>
 Traceback (most recent call last):
 File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/topics.py", line 581, in _invoke_callback
cb(msg)
 File "/opt/ros/electric/stacks/ros_comm/utilities/message_filters/src/message_filters/__init__.py", line 72, in callback
self.signalMessage(msg)
File "/opt/ros/electric/stacks/ros_comm/utilities/message_filters/src/message_filters/__init__.py", line 55, in signalMessage
cb(*(msg + args))
File "/opt/ros/electric/stacks/image_pipeline/camera_calibration/src/camera_calibration/approxsync.py", line 70, in add
  msgs = [q[t] for q,t in zip(self.queues, vv)]
  KeyError: rostime.Time[1335196035830033922]

Running the calibrator in mono version for each camera seem to work ok but I want to calibrate the pair. I feel that the error is somehow related to the approximate synchronization, but I don't know exactly where to start.

Could anyone share some insight on this issue? Many Thanks!


Originally posted by gabe on ROS Answers with karma: 1 on 2012-04-23

Post score: 0


Original comments

Comment by gabe on 2012-04-25:
Joq, thanks for the info. As you suspected, the camera ID issue is just a copying error. The launch file for the drivers works for both camera and I can use the calibrator for each individual camera as monocular.

Comment by gabe on 2012-04-25:
However, running the calibrator as stereo gives me that same error. I need the projection and the rectification matrix for the stareopair.

Comment by gabe on 2012-04-25:
Thanks Marti, as well. I've tried lowering the parameter value, I believe it deals with the time interval between left and right messages. Lowering the value gets to some point where the program waits because there are no messages with such close timestamps. But I still get that error.

Comment by benjaminabruzzo on 2013-08-22:
I've had a similar error. Without changing anything it occasionally "just works." I have also tried fixing this with an external metronome to sync my cameras to within 2ms, though it is no more or less effective.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi Gabe,

can you try with a lower --approximate parameter?

It worked for me with

--approximate=0.01

Originally posted by martimorta with karma: 843 on 2012-04-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by benjaminabruzzo on 2013-08-22:
This fixed it for me as well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.