This project aims to build 3D point clouds from the 3D LiDAR Livox Mid-360 attached to a mobile robot. The sensor data, including LiDAR points, IMU, and TF, are recorded and processed by this project to perform SLAM (Simultaneous Localization and Mapping) and eventually create and visualize 3D point clouds.
- Build 3D point clouds using Livox Mid-360 LiDAR.
- Perform SLAM with recorded LiDAR and IMU data.
- Visualize the 3D point clouds.
- Utilize Docker for easy setup and deployment.
- Supports ROS Noetic, RViz, and Gazebo with GPU acceleration.
- Multiple rosbags of Livox sensor recording and output a single or multiple NPZ files.
- Docker
- NVIDIA Docker (for GPU support)
-
Clone the Repository
git clone https://github.com/anh0001/lidar_imu2npz.git cd lidar_imu2npz
-
Initialize Submodules
As this repository contains submodules, you need to initialize and update them:
git submodule update --init --recursive
-
Build the Docker Container
Use the provided script to build the Docker container:
./cmds.sh build-container
-
Start the Docker Container
Enter the Docker container with the following command:
./cmds.sh start
-
Perform build packages using the command:
./cmds.sh build
-
Enter the Docker Container
If the container is already running, use the following command to enter it:
./cmds.sh enter source devel/setup.bash
-
Source the Commands Script
Inside the container, source the commands script to load the necessary environment variables:
source cmds.sh
-
Prepare ROSBAG Data
Place all your ROSBAG data into the
rosbag/raw
folder. -
Run FastLIO Mapping
Execute the following command to process the ROSBAG data and output the results in the
rosbag/processed
folder:./cmds.sh run-fastlio-mapping
-
Combine Maps into a Single NPZ File
To combine all processed maps into a single
.npz
file, run:./cmds.sh combine-maps-to-npz
This will output
.npz
files in theout
folder.If you want to convert each map individually, run:
./cmds.sh map-to-npz
Use RViz for visualizing the 3D point clouds.
To visualize a single .npz
file, use:
./cmds.sh visualize-pc
To visualize all .npz
files in the out/
folder, run:
./cmds.sh visualize-all
- Fork the repository.
- Create your feature branch (
git checkout -b feature/fooBar
). - Commit your changes (
git commit -am 'Add some fooBar'
). - Push to the branch (
git push origin feature/fooBar
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.