If you have prepared your data in the following format:
timestamp x y z qw qx qy qz
Set your filenames and run pose2mat.m to get .mat files.
ELSE......
-
Drive the vehicle in a "$\infty$" shaped trajectory.
-
Record LiDAR, camera, INS and IMU topics.
rosbag record /velodyne_points /usb_cam_left/image_raw/compressed /novatel_data/inspvax /imu/data
rosbag record /velodyne_points /zed2/zed_node/right/image_rect_color/compressed /novatel_data/inspvax /imu/data
-
If there is no timestamp in INS topic (e.g. Novatel), use IMU timestamp as INS timestamp. They are usually hardware-synchronized. Make sure they have the same number of messages.
-
Record pose estimates of a SLAM algorithm (e.g. A-LOAM) and INS pose output.
rosbag record -O calib /aft_mapped_to_init /novatel_data/inspvax /imu/data
-
Convert the recorded topics into
.csvformat using my fork of rosbag_to_csv. -
Convert
.csvfiles to.matfiles.readLO: Convert LiDAR odometry file to.matformat.readNovatel: Convert Novatel pose file to.matformat.readIMU: Convert IMU pose file to.matformat.
-
We use COLMAP to estimate and export camera pose. The
.txtpose output should be in the following format:timestamp x y z qw qx qy qzwhere
timestampis the original timestamp when the image data is recorded. -
Convert INS and IMU topics into
.csvformat usingrosbag_to_csv. Here we use IMU timestamp as the original INS timestamp. -
Convert
.csvfiles to.matfiles.readVO: Convert visual odometry file to.matformat.readNovatel: Convert Novatel pose file to.matformat.readIMU: Convert IMU pose file to.matformat.
-
Use the methods above to acquire poses.
-
Convert
.csvfiles to.matfiles.readPose_FCPE: Convert LiDAR, camera and INS pose files to.matformat.
If you are using a different SLAM algorithm or a different INS device. You may define your own I/O interface accordingly. pose2mat.m can be used as a template.