首先,下载数据集,网速不好,最好使用梯子。
下载下来的数据大概如下所示
格式调整如下,可以将data_odometry_velodyne中的一个velodyne文件夹复制到data_odometry_calib中对应的序号中,(必须有times.txt和velodyne)最后如下图
使用已有的lidar2rosbag_KITTI工具,下载、运行方法为
cd ~/catkin_ws/src/git clone git@:AbnerCSZ/lidar2rosbag_KITTI.gitcd ~/catkin_wscatkin_make -DCMAKE_BUILD_TYPE=Release source ~/catkin_ws/devel/setup.bashrosrun lidar2rosbag lidar2rosbag KITTI_input_dir output_name
如果遇到
error: conflicting declaration ‘typedef struct LZ4_stream_t LZ4_stream_t’
则
sudo mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.baksudo mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.baksudo ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.hsudo ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h
如何发生段错误,核心已转储,可能是输入路径不对,可能是最后的“/”没加上。