Tested on Ubuntu 22.04 with an Nvidia RTX 3090
-
Install ROS2 Humble: LINK
-
Set up a ROS2 workspace: LINK
2a. prepare automatic sourcing of the ROS2 installation and workspace:echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc echo "source /home/user/ros2_ws/install/setup.bash" >> ~/.bashrc
where the second line must be adapted to your ros2 workspace. Afterwards, source the bashrc file (
source ~/.bashrc
) or simply close your terminal and open an new one (thus bashrc is loaded). -
Clone the pointcloud merge node: LINK
-
Set up a Second workspace for Point Labeler and SuMa -> See Instructions at: LINK
-
Install Point Labeler: LINK
-
Install Surfel Based Mapping (SuMa): LINK 5a. One dependency of SuMa is GTSAM. On Ubuntu 22.04 there is currently no pre-built package for GTSAM. After installing GTSAM's dependencies, build GTSAM with:
cd ~ git clone https://github.com/borglab/gtsam.git cd gtsam mkdir build cd build cmake .. sudo make install
-
Install pcd2bin: LINK
-
Create a folder structure which meets the KITTI standard LINK:
mkdir -p ~/dataset/pointclouds cd ~/dataset mkdir rosbags mkdir -p sequences/00/velodyne cd sequences/00 mkdir labels
-
Record ROSBAG of your LiDAR Data. In our case, this data is made out of 5 x Livox Horizon LiDARs:
ros2 bag record <params>
-
Start the pointcloud merge node inside
~/dataset/pointclouds
. (the pcd files are stored in the folder in which the node is started):
https://github.com/nerovalerius/pointcloud_merge_and_kitti
. -
Start playback of the ROSBAG within 5 seconds. Otherwise the pointcloud merge node quits.
ros2 bag play rosbag2_2022_06_21-12_56_43_0.db3 -s sqlite3 --rate 0.5
. -
Convert the .pcd files with the pcd2bin node and store the .bin files inside
~/dataset/sequences/00/velodyne
:
ros2 run pcd2bin_kitti pcd2bin
. -
create a dummy calibration file inside your created sequence:
nano ~/dataset/sequences/00/calib.txt
and fill it with:P0: 1 0 0 0 0 1 0 0 0 0 1 0 P1: 1 0 0 0 0 1 0 0 0 0 1 0 P2: 1 0 0 0 0 1 0 0 0 0 1 0 P3: 1 0 0 0 0 1 0 0 0 0 1 0 Tr: 1 0 0 0 0 1 0 0 0 0 1 0
-
Run SuMa with:
~/catkin_ws/src/SuMa/bin/visualizer
and open the first binary pointcloud of the sequence, e.g.:~/dataset/sequences/00/full_cloud_00001.bin
Run SuMa to get a
poses.txt
file for your sequence by pressing the PLAY button and thensave poses.txt
to the~/dataset/sequences/00/
folder. SuMa creates a posegraph for your pointcloud sequence.Each pointcloud then gets a absolute position in a world_frame, which is used to load a complete sequence of pointclouds into the Point Labeler. This means that a large number of pointclouds can be labelled at once.
-
Open
~/dataset/sequences/00/
with Point Labeler. Run Point Labeler with:
~/catkin_ws/src/point_labeler/bin/labeler
Point Labeler generates then generates the labes in the correct semantic KITTI format.
Hey Armin,
I'm currently trying to follow your instructions to set up the Pointcloud Merge Node, and I've run into a obstacle while attempting to set up a workspace for Point Labeler in ROS2. I'm having trouble adapting the workspace setup accordingly, since it was written to work with catkin on ROS1.
I was wondering if you could provide some guidance on how to modify the setup for Point Labeler to be compatible with ROS2. Do you have any suggestions or a workaround for this? I'd really appreciate your help in getting this sorted out.
Thanks a bunch!