Ask Your Question
0

camera_calibration "ImportError" for stereo setup

asked 2016-07-04 04:51:01 -0600

altella gravatar image

updated 2016-07-04 04:52:48 -0600

Hi all;

I am using camera_calibration node ( http://wiki.ros.org/camera_calibration ) to calibrate a stereo system based on a VRMagic D3 camera. To access the images of the smartcam I am using vrmagic_ros_bridge_server node. I am running ROS INDIGO in an Ubuntu 64 bit machine. After remapping images to a common workspace, I have the following topics:

/img_pub1
/img_pub1_camera_info
/img_pub2
/img_pub2_camera_info
/object_image/left/camera_info
/object_image/left/image_raw
/object_image/left/image_raw/compressed
/object_image/left/image_raw/compressed/parameter_descriptions
/object_image/left/image_raw/compressed/parameter_updates
/object_image/left/image_raw/compressedDepth
/object_image/left/image_raw/compressedDepth/parameter_descriptions
/object_image/left/image_raw/compressedDepth/parameter_updates
/object_image/left/image_raw/theora
/object_image/left/image_raw/theora/parameter_descriptions
/object_image/left/image_raw/theora/parameter_updates
/object_image/right/camera_info
/object_image/right/image_raw
/object_image/right/image_raw/compressed
/object_image/right/image_raw/compressed/parameter_descriptions
/object_image/right/image_raw/compressed/parameter_updates
/object_image/right/image_raw/compressedDepth
/object_image/right/image_raw/compressedDepth/parameter_descriptions
/object_image/right/image_raw/compressedDepth/parameter_updates
/object_image/right/image_raw/theora
/object_image/right/image_raw/theora/parameter_descriptions
/object_image/right/image_raw/theora/parameter_updates
/rosout
/rosout_agg

Following the StereoCalibration tutorial step by step, I call the stereo calibration procedure:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.024 right:=/object_image/right/image_raw left:=/object_image/left/image_raw right_camera:=/object_image/right left_camera:=/object_image/left

And I obtain the following error, seems some kind of dependency, but I have installed everything (I think) correctly:

Traceback (most recent call last):
  File "/opt/ros/indigo/lib/camera_calibration/cameracalibrator.py", line 50, in <module>
    from camera_calibration.calibrator import MonoCalibrator, StereoCalibrator, ChessboardInfo, Patterns
ImportError: No module named calibrator

I would appreciate any clue to solve this, I need to obtain the camera_info information of both cameras asap !!

Thnak you all in advance,

Alberto

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-07-04 07:36:56 -0600

altella gravatar image

The problem comes because python can not find modules in different paths. In my instalation "cameracalibrator.py" is on /opt/ros/indigo/lib/camera_calibration/ , while "calibrator.py" is on /opt/ros/indigo/lib/python2.7/dist-packages/camera_calibration/

One fast way to solve the problem is to copy "calibrator.py" to a directory camera_calibrator, so that the imports in python find what they are expected to find:

/opt/ros/indigo/lib/camera_calibration/cameracalibrator.py
/opt/ros/indigo/lib/camera_calibration/camera_calibration/calibrator.py
/opt/ros/indigo/lib/camera_calibration/camera_calibration/calibrator.pyc
/opt/ros/indigo/lib/python2.7/dist-packages/camera_calibration/calibrator.py
/opt/ros/indigo/lib/python2.7/dist-packages/camera_calibration/calibrator.pyc
/usr/share/app-install/desktop/xinput-calibrator:xinput_calibrator.desktop
/usr/share/app-install/icons/xinput_calibrator.svg
/usr/share/apport/package-hooks/source_xinput-calibrator.py
edit flag offensive delete link more

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: 2016-07-04 04:51:01 -0600

Seen: 227 times

Last updated: Jul 04 '16