Kalibr and ROS needs some getting-used to. As a first test, I want to calibrate two cameras without an IMU.

To do this, be always sure to source the kalibr/devel/setup.bash file. If you don’t, errors of missing packages will occur (kept me busy for >1 day; while documented on their website, I forgot about it). I now set my bash environment such that thesis is an alias for cd‚ing to the right folder and sourcing this file and ROS’s file.

Next issue was that some files try to access the method imgmsg_to_cv of a cv_bridge.CvBridge object. Apparently, this needs to be imgmsg_to_cv2.

Now I’m stuck at the point that I get a RuntimeError:

$ ./kalibr_calibrate_cameras --bag ../../camera_calibration.bag --topics /cam0/image_raw /cam1/image_raw --models pinhole-radtan pinhole-radtan --target ../../config/calibration_target/aprilgrid.yaml 
importing libraries
Initializing cam0:
  Camera model:   pinhole-radtan
    Dataset:          ../../camera_calibration.bag
      Topic:            /cam0/image_raw
        Number of images: 146
        Extracting calibration target corners
        Process Process-3:
        Traceback (most recent call last):
            File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
                self.run()
              File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
                self._target(*self._args, **self._kwargs)
              File "/home/pkok/thesis/calibration_kits/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_common/TargetExtractor.py", line 22, in multicoreExtractionWrapper
                success, obs = detector.findTargetNoTransformation(stamp, np.array(image))
            TypeError: Conversion is only valid for arrays with 1 or 2 dimensions. Argument has 3 dimensions

                       [FATAL] [1408635055.125279]: No corners could be extracted for camera /cam0/image_raw! Check the calibration target configuration and dataset.
                       Traceback (most recent call last):
                           File "./kalibr_calibrate_cameras", line 5, in <module>
                               exec(fh.read())
                             File "<string>", line 444, in <module>
                             File "<string>", line 182, in main
                             File "/home/pkok/thesis/calibration_kits/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraCalibrator.py", line 56, in initGeometryFromObservations
                               success = self.geometry.initializeIntrinsics(observations)
                           RuntimeError: [Exception] /home/pkok/thesis/calibration_kits/kalibr/src/aslam_cv/aslam_cameras/include/aslam/cameras/implementation/PinholeProjection.hpp:713: initializeIntrinsics() assert(observations.size() != 0) failed: Need min. one observation