Convert PointCloud2 in ros2bag to pcd
- ubuntu22 ros2 humble
cd ros2_ws/src/
git clone https://github.com/KOKIAOKI/ros2bag_to_pcd.git
cd ../
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
For 3D-BBS test data
source install/setup.bash
ros2 run ros2bag_to_pcd leveling [your bag file path] [lidar topic name] [imu topic name] [save folder path]
====Support msg type====
lidar: sensor_msgs/PointCloud2
imu: sensor_msgs/Imu
Please correct online_launch.py parameter so that the topic can be read. First terminal
source install/setup.bash
ros2 launch ros2bag_to_pcd online_launch.py
Second terminal
ros2 bag play [your bag file path]
source install/setup.bash
ros2 run ros2bag_to_pcd offline [your bag file path] [topic name] [save folder path]
or
cd ros2_ws
./build/ros2bag_to_pcd/offline [your bag file path] [topic name] [save folder path]
source install/setup.bash
ros2 run ros2bag_to_pcd create_map [your bag file path] [topic name] [trajectory topic name] [save folder path]
or
cd ros2_ws
./build/ros2bag_to_pcd/create_map [your bag file path] [topic name] [trajectory topic name] [save folder path]