-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation kinect in gazebo, Calibration validator error: TypeError: Conversion is only valid for arrays with 1 or 2 dimensions. Argument has 3 dimensions #391
Comments
in this case you use Calibration validator, you should modify kalibr_camera_validator.py instead of mageDatasetReader.py : |
you can try to use a grayscale image |
Can you provide a bag where this fails? |
See PR #15 |
Ran into a similar issue with the validator. It appears the only color encodings the validator special cases in this 'if' are "rgb8" and "bgra8" (https://github.com/ethz-asl/kalibr/blob/master/aslam_offline_calibration/kalibr/python/kalibr_camera_validator#L137). However ROS supports many more color encodings (https://docs.ros.org/en/noetic/api/sensor_msgs/html/image__encodings_8h_source.html). In my case my images are "bgr8" as well. Perhaps, in this section it might be better to use cv_bridge's "passthrough" encoding and then use opencv to convert to 8-bit grayscale? Or just use My workaround was to add the "bgr8" encoding to the special cases. |
Actually after reading the CvBridge docs, it might be simpler to just convert all uncompressed message types to mono8:
|
Hello,
I calibrate the simulation kinect in gazebo with Kalibr, and the result is approximate to the true value. Then I want to try the Calibration validator, but an error occurred, all the output is below:
I try to modify the ImageDatasetReader.py according to this issue, the raw version code is here, and the modified version is below:
However, the error still exists, Could you please provide some advice to fix this issue, thanks a lot.
The text was updated successfully, but these errors were encountered: