koide3 / direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
https://koide3.github.io/direct_visual_lidar_calibration/
637 stars 83 forks source link

Camera Info version bug #90

Open khuechuong opened 6 days ago

khuechuong commented 6 days ago

after I did the calibration. I wanted to view it on rviz, however it keeps giving me this:

Client [/rviz_1719927911041927541] wants topic /camera_info to have datatype/md5sum [sensor_msgs/CameraInfo/c9a58c1b0b154e0e6da7578cb991d214], but our version has [sensor_msgs/CameraInfo/b5aff04250fbf270b71bef9d82c2132e]. Dropping connection.

when I did rosbag check, it also said

 * From: sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
   To:   sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
 * From: sensor_msgs/CameraInfo [b5aff04250fbf270b71bef9d82c2132e]
   To:   sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
    1 rules missing:
     * From: sensor_msgs/CameraInfo [b5aff04250fbf270b71bef9d82c2132e]
       To:   sensor_msgs/CameraInfo [a48ffa77e74ab6901331e50745dff353]
 * From: sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
   To:   sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]

I tried running

rosbag fix 

but it gave me error

Bag could not be migrated.  The following migrations could not be performed:
 * From: sensor_msgs/CameraInfo [b5aff04250fbf270b71bef9d82c2132e]
   To:   sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
    1 rules missing:
     * From: sensor_msgs/CameraInfo [b5aff04250fbf270b71bef9d82c2132e]
       To:   sensor_msgs/CameraInfo [a48ffa77e74ab6901331e50745dff353]

it didn't work even when I tried --force. what's going on with your rosbag's camera_info? Is there another way to view it? because the view from ur gui didn't look good so i wanted to check with rviz

koide3 commented 6 days ago

This is a known issue related to ROS2-ROS1 bag conversion. See the following:

https://koide3.github.io/direct_visual_lidar_calibration/example/

CameraInfo messages in the example ROS1 bag files exhibit an MD5 checksum that is different from that of the standard sensor_msgs/CameraInfo msg due to ROS2-ROS1 bag conversion issues. Because this affects the automatic camera info extraction, you need to manually specify camera parameters for preprocessing.