Ask Your Question
1

Camera Pose Calibration: problem with multicam_capture_exec.py

asked 2012-06-06 23:20:58 -0500

oleo80 gravatar image

updated 2012-06-07 05:48:11 -0500

Hi all! I'm trying to calibrate 2 home-made stereo cameras (4 total cameras) with the camera_pose toolkit and I've problems with the multicam_capture_exec.py.

I receive the following error:

Waiting for Server
Traceback (most recent call last):
  File "/opt/ros/fuerte/stacks/camera_pose/camera_pose_calibration/src/camera_pose_calibration/multicam_capture_exec.py", line 43, in <module>
    from camera_pose_calibration.robot_measurement_cache import RobotMeasurementCache
  File "/opt/ros/fuerte/stacks/camera_pose/camera_pose_calibration/src/camera_pose_calibration/robot_measurement_cache.py", line 34, in <module>
    import roslib; roslib.load_manifest('pr2_calibration_executive')
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
    sys.path = _generate_python_path(package_name, _rospack) + sys.path
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
    m = rospack.get_manifest(pkg)
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 167, in get_manifest
    return self._load_manifest(name)
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 210, in _load_manifest
    retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 202, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: pr2_calibration_executive


[capture_exec-24] process has died [pid 12415, exit code 1, cmd /opt/ros/fuerte/stacks/camera_pose/camera_pose_calibration/src/camera_pose_calibration/multicam_capture_exec.py baseline12/left baseline12/right baseline6/left baseline6/right/ request_interval:=interval_filtered __name:=capture_exec __log:=/home/fabio/.ros/log/ad23e236-b07d-11e1-afbb-14dae9c3e9c0/capture_exec-24.log].
log file: /home/fabio/.ros/log/ad23e236-b07d-11e1-afbb-14dae9c3e9c0/capture_exec-24*.log

Any idea?

My launch file:

<launch>

<!-- MACHINES -->
  <machine name="rosboromir" address="rosboromir" user="fabio" env-loader="/opt/ros/fuerte/env.sh">
  </machine>

  <machine name="rosfaramir" address="rosfaramir" user="fabio" env-loader="/opt/ros/fuerte/env.sh">
  </machine>

<!-- LAUNCH BASELINE6 ON ROSBOROMIR -->
  <!-- Driver nodelet -->
  <node machine="rosboromir" ns="baseline6" name="stereo_image_proc_bsl6" pkg="stereo_image_proc" type="stereo_image_proc"></node>
  <node machine="rosboromir" ns="baseline6" name="uvc_camera_bsl6" pkg="uvc_camera" type="stereo_node">
    <param name="left/device" value="/dev/video1" />
    <param name="right/device" value="/dev/video2" />
    <param name="fps" value="30" />
    <param name="skip_frames" value="3" />
    <param name="width" value="320" />
    <param name="height" value="240" />
    <param name="frame_id" value="baseline6" />
  </node>

<!-- LAUNCH BASELINE12 ON ROSFARAMIR -->
  <!-- Driver nodelet -->
  <node machine="rosfaramir" ns="baseline12" name="stereo_image_proc_bsl12" pkg="stereo_image_proc" type="stereo_image_proc"></node>
  <node machine="rosfaramir" ns="baseline12" name="uvc_camera" pkg="uvc_camera" type="stereo_node">
    <param name="left/device" value="/dev/video1" />
    <param name="right/device" value="/dev/video2" />
    <param name="fps" value="15" />
    <param name="skip_frames" value="1" />
    <param name="width" value="640" />
    <param name="height" value="480" />
    <param name="frame_id" value="baseline12" />
  </node>

</launch>

Command line for calibration:

roslaunch camera_pose_calibration calibrate_4_camera.launch camera1_ns:=baseline12/left camera2_ns:=baseline12/right camera3_ns:=baseline6/left camera4_ns:=baseline6/right/ checker_rows:=10 checker_cols:=5 checker_size:=0.0015

EDIT: In the file calibrate_4_cameras.launch, the lines that give me the error are the following:

  <!-- generate robot measurements -->
  <node pkg="camera_pose_calibration" type="multicam_capture_exec.py" name="capture_exec" 
        args="$(arg camera1_ns) $(arg camera2_ns) $(arg camera3_ns) $(arg camera4_ns)" output="screen">
    <param name="cam_info_topic" value="camera_info" />
    <remap from="request_interval" to="interval_filtered" />
  </node>

Do I need that lines to have camera calibrated? What does they do?

EDIT2: I've followed the ... (more)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-06-11 23:51:11 -0500

fergs gravatar image

In Fuerte, pr2_calibration has been split into two (slightly refactored) stacks: calibration and pr2_calibration. The pr2_calibration package always had its API marked "unstable", but it appears that this code was developed against the pr2_calibration_executive (which has gone away). You can find a (possibly updated) robot_measurement_cache.py in calibration_launch/src/calibration_executive.

edit flag offensive delete link more

Comments

Did they ever solve this problem? I'm trying to use camera_pose_calibration in Hydro with 3 Kinects and it's not going well.

Athoesen gravatar image Athoesen  ( 2014-01-08 09:42:44 -0500 )edit

I'm not aware of anyone maintaining the camera_pose_calibration stack, so I very much doubt that it has been fixed.

fergs gravatar image fergs  ( 2014-01-14 18:06:40 -0500 )edit

In that case, what method are people using for multiple Kinects to combine them in RViz? I've looked all over and I can't find anything on the wiki or just by Googling. And asking on here has been unresponsive.

Athoesen gravatar image Athoesen  ( 2014-01-15 05:00:45 -0500 )edit
1

answered 2012-08-29 09:29:09 -0500

jbohren gravatar image

updated 2012-08-29 10:21:15 -0500

In addition to the incorrect roslib.load_manifest, I found numerous \t's in the source that were basically keeping the pipeline from working, as well as several topics that didn't appear to be mapped properly.

My modifications can be found here: https://bitbucket.org/jbohren/camera_pose

I could get it to "work" with a couple kinects, but not with a calibrated stereo rig that I have. The resulting frame wasn't as good as I could do just by playing around with an interactive transform publisher.

edit flag offensive delete link more
0

answered 2012-07-25 00:08:56 -0500

oleo80 gravatar image

updated 2012-07-26 00:19:16 -0500

Solution to the ".py script not found" error:

cd /opt/ros/fuerte/stacks/camera_pose/camera_pose_calibration/src/camera_pose_calibration
sudo mv robot_measurement_cache.py robot_measurement_cache.py.org
sudo cp /opt/ros/fuerte/stacks/calibration/calibration_launch/src/capture_executive/robot_measurement_cache.py .

By the way, I'm still not able to have something published to /tf.

EDIT: I'll describe the workflow and the final problem of camera_pose_calibration.

launch file for cameras

<launch>
  <group ns="baseline12">
    <node name="stereo_image_proc_bsl12" pkg="stereo_image_proc" type="stereo_image_proc"></node>    
    <node name="uvc_camera_bsl12" pkg="uvc_camera" type="stereo_node">
      <param name="left/device" value="/dev/video1" />
      <param name="right/device" value="/dev/video2" />
      <param name="fps" value="15" />
      <param name="skip_frames" value="1" />
      <param name="width" value="640" />
      <param name="height" value="480" />
      <param name="frame_id" value="baseline12" />
    </node>

  <include file="$(find camera_pose_calibration)/blocks/calibration_tf_publisher.launch">
    <arg name="cache_file" value="/tmp/camera_pose_calibration_cache.bag" />
  </include>
</group>
</launch>

command line for camera_pose_calibration

roslaunch camera_pose_calibration calibrate_2_camera.launch camera1_ns:=/baseline12/left camera2_ns:=/baseline12/right checker_rows:=6 checker_cols:=8 checker_size:=0.028

Then I can see the /aggregated_image and the checkerboard corners are correctly identified. The problem is that I can't go on after this point. You can see the screenshot: camera_pose_calibration end point

rostopic list output

fabio@faramir:~$ rostopic list
/aggregated_image
/baseline12/camera_calibration
/baseline12/disparity
/baseline12/left/camera_info
/baseline12/left/cb_detector_config/cancel
/baseline12/left/cb_detector_config/feedback
/baseline12/left/cb_detector_config/goal
/baseline12/left/cb_detector_config/result
/baseline12/left/cb_detector_config/status
/baseline12/left/features
/baseline12/left/image_color
/baseline12/left/image_color/compressed
/baseline12/left/image_color/compressed/parameter_descriptions
/baseline12/left/image_color/compressed/parameter_updates
/baseline12/left/image_color/theora
/baseline12/left/image_color/theora/parameter_descriptions
/baseline12/left/image_color/theora/parameter_updates
/baseline12/left/image_mono
/baseline12/left/image_mono/compressed
/baseline12/left/image_mono/compressed/parameter_descriptions
/baseline12/left/image_mono/compressed/parameter_updates
/baseline12/left/image_mono/theora
/baseline12/left/image_mono/theora/parameter_descriptions
/baseline12/left/image_mono/theora/parameter_updates
/baseline12/left/image_raw
/baseline12/left/image_raw/compressed
/baseline12/left/image_raw/compressed/parameter_descriptions
/baseline12/left/image_raw/compressed/parameter_updates
/baseline12/left/image_raw/theora
/baseline12/left/image_raw/theora/parameter_descriptions
/baseline12/left/image_raw/theora/parameter_updates
/baseline12/left/image_rect
/baseline12/left/image_rect/compressed
/baseline12/left/image_rect/compressed/parameter_descriptions
/baseline12/left/image_rect/compressed/parameter_updates
/baseline12/left/image_rect/theora
/baseline12/left/image_rect/theora/parameter_descriptions
/baseline12/left/image_rect/theora/parameter_updates
/baseline12/left/image_rect_color
/baseline12/left/image_rect_color/compressed
/baseline12/left/image_rect_color/compressed/parameter_descriptions
/baseline12/left/image_rect_color/compressed/parameter_updates
/baseline12/left/image_rect_color/theora
/baseline12/left/image_rect_color/theora/parameter_descriptions
/baseline12/left/image_rect_color/theora/parameter_updates
/baseline12/left/image_throttle
/baseline12/left/monocam_settler_config/cancel
/baseline12/left/monocam_settler_config/feedback
/baseline12/left/monocam_settler_config/goal
/baseline12/left/monocam_settler_config/result
/baseline12/left/monocam_settler_config/status
/baseline12/left/settled_interval
/baseline12/points
/baseline12/points2
/baseline12/right/camera_info
/baseline12/right/cb_detector_config/cancel
/baseline12/right/cb_detector_config/feedback
/baseline12/right/cb_detector_config/goal
/baseline12/right/cb_detector_config/result
/baseline12/right/cb_detector_config/status
/baseline12/right/features
/baseline12/right/image_color
/baseline12/right/image_color/compressed
/baseline12/right/image_color/compressed/parameter_descriptions
/baseline12/right/image_color/compressed/parameter_updates
/baseline12/right/image_color/theora
/baseline12/right/image_color/theora/parameter_descriptions
/baseline12/right/image_color/theora/parameter_updates
/baseline12/right/image_mono
/baseline12/right/image_mono/compressed
/baseline12/right/image_mono/compressed/parameter_descriptions
/baseline12/right/image_mono/compressed/parameter_updates
/baseline12/right/image_mono/theora
/baseline12/right/image_mono/theora/parameter_descriptions
/baseline12 ...
(more)
edit flag offensive delete link more

Comments

Is this an answer to the original question?

joq gravatar image joq  ( 2012-07-26 04:39:46 -0500 )edit

I think that camera_pose_calibration has some problems and after a lot of tries I'm still not able to make it work. My intention was to condense all problems and possible solutions here. If this is wrong I can re-arrange questions opening a new one.

oleo80 gravatar image oleo80  ( 2012-07-26 06:37:35 -0500 )edit

Separate questions, each with their own answers, generally work better for those with similar problems.

joq gravatar image joq  ( 2012-07-26 07:06:08 -0500 )edit

Could you please tell me if you have found solution ? Because I am not also able to save .bag file after process is done.

CHz gravatar image CHz  ( 2013-04-09 03:23:13 -0500 )edit

I'm sorry, I haven't found the solution.

oleo80 gravatar image oleo80  ( 2013-05-19 21:48:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-06-06 23:20:58 -0500

Seen: 898 times

Last updated: Aug 29 '12