The module errors of Kalibr are gone, but Kalibr can’t recognize the chessboard on RGB video. Maybe images should be grayscale?

The issues with Kalibr as described in the previous post were due to forgetting to source the devel/setup.bash file of Kalibr. My bash ros function now not only sources the required ROS .sh file and adds each module in ~/ros/repos/ to $ROS_PACKAGE_PATH, it also sources their setup files.


Now the program runs, but I get an IndexError with a red-highlighted [FATAL] [1410190209.710162]: No corners could be extracted for camera /logitech_camera/image_raw! Check the calibration target configuration and dataset. error.

Full output:

importing libraries
Initializing IMUs:
  Update rate: 100
  Accelerometer:
    Noise density: 0.004 
    Noise density (discrete): 0.04 
    Random walk: 0.02
  Gyroscope:
    Noise density: 0.1
    Noise density (discrete): 1.0 
    Random walk: 1.0
Initializing imu rosbag dataset reader:
	Dataset:          bags/2014-09-03_calibration_MTi_Logitech.bag
	Topic:            /MTi/imu/data
	Number of messages: 31462
Reading IMU data (/MTi/imu/data)
  Read 31462 imu readings over 314.6 seconds                         
Initializing calibration target:
  Type: checkerboard
  Rows
    Count: 9
    Distance: 0.0255 [m]
  Cols
    Count: 6
    Distance: 0.0255 [m]
Initializing camera chain:
Camera chain - cam0:
  Camera model: pinhole
  Focal length: [552.357544, 319.346027]
  Principal point: [553.012817, 242.821647]
  Distortion model: radtan
  Distortion coefficients: [-0.010014, -0.046626, 0.001439, -0.010307]
  baseline: no data available
Initializing camera rosbag dataset reader:
	Dataset:          bags/2014-09-03_calibration_MTi_Logitech.bag
	Topic:            /logitech_camera/image_raw
	Number of images: 1264
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/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_common/TargetExtractor.py", line 24, in multicoreExtractionWrapper
    success, obs = detector.findTarget(stamp, np.array(image))
TypeError: Conversion is only valid for arrays with 1 or 2 dimensions. Argument has 3 dimensions

[FATAL] [1410190209.710162]: No corners could be extracted for camera /logitech_camera/image_raw! Check the calibration target configuration and dataset.

Building the problem
	Spline order: 6
	Pose knots per second: 70
	Do pose motion regularization: False
		xddot translation variance: 1000000.000000
		xddot rotation variance: 100000.000000
	Bias knots per second: 50
	Do bias motion regularization: True
	Blake-Zisserman on reprojection errors -1
	Acceleration Huber width (m/s^2): -1.000000
	Gyroscope Huber width (rad/s): -1.000000
	Do time calibration: True
	Max iterations: 30
	Time offset padding: 0.020000
Estimating time shift camera to imu:
Traceback (most recent call last):
  File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 206, in <module>
    main()
  File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 172, in main
    verbose = parsed.verbose)
  File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccCalibrator.py", line 110, in buildProblem
    cam.findTimeshiftCameraImuPrior(self.ImuList[0], verbose)
  File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py", line 187, in findTimeshiftCameraImuPrior
    poseSpline = self.initPoseSplineFromCamera( timeOffsetPadding=0.0 )
  File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py", line 251, in initPoseSplineFromCamera
    times = np.hstack((times[0] - (timeOffsetPadding * 2.0), times, times[-1] + (timeOffsetPadding * 2.0)))
IndexError: index out of bounds

This apparently happens because the chessboard is not found, but why? I should check out the user forum.


I just saw that the (utility might not work with RGB images, they should be in grayscale](https://groups.google.com/d/msg/kalibr-users/dRoLkps0jWw/EgYxJ5_HnUsJ). I am looking up how to convert a sensor_msgs/Image topic to grayscale.