Skip to content

TechShare-inc/FAST_LIO_ROS2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAST-LIO-ROS2

Maintainer: Yunlong Feng
Modifier: Taeyoung Kim

What's New?

  • Dockerize
  • Step-by-step tutorial
  • Add save trajectory function
  • Add save map function without service callback

Results

I currently only experiment after converting the ros2 bag format from the M2DGR dataset.

FAST_LIO_ROS2_result.mp4

< FAST-LIO2-ros2 trajectory result in Gate 01 sequence >

How to use

I recommend utilizing docker to easily configure your environment setting.

Requirements

git clone --recursive https://github.com/Taeyoung96/FAST_LIO_ROS2.git

Make a docker image (For the docker user)

cd docker
docker build -t fast-lio-ros2:latest .

Environment setting

Make a docker container

When you create a docker container, you need several options to use the GUI and share folders.

First, you should enter the command below in the local terminal to enable docker to communicate with Xserver on the host.

xhost +local:docker

After that, make your own container with the command below.

sudo chmod -R 777 container_run.sh
./container_run.sh <container_name> <image_name:tag>

⚠️ You should change {container_name}, {docker image} to suit your environment.

For example,

 ./container_run.sh fast-lio-ros2 fast-lio-ros2:latest

In my case, I also shared an additional /data folder to run the ROS2 bag files.

If you have successfully created the docker container, the terminal output will be similar to the below.

output :

Current working directory: /home/taeyoung/Desktop/FAST_LIO_ROS2
================FAST-LIO ROS2 Docker Env Ready================
root@taeyoung-cilab:~/ros2_ws#

Build and Run the launch file

Within Docker, we need 2 containers.
To access the same container, use the command below

docker exec -it fast-lio-ros2 /bin/bash

Within the connected container,

source /opt/ros/humble/setup.bash

This is an example for running M2DGR dataset. You need to use rosbags to change the ros1 bagfile to a ros2 bagfile already.

root@taeyoung-cilab:~/ros2_ws# 

All should stay on the above path.

  • 1st container (For build fast_lio and livox_ros_driver2 package)
cd src/livox_ros_driver2/
./build.sh humble

This process only needs to be done once, after connecting to the container.
For all subsequent builds, simply proceed to colcon build on ros2_ws.

cd ~/ros2_ws/
source install/setup.bash 

For launch fast_lio ros2 version for M2DGR.

ros2 launch fast_lio mapping_m2dgr.launch.py
  • 2nd container (For ros2 bag play)
ros2 bag play gate_01

Convert ROS1 bag to ROS2 bag

TODO

  • Test with more bag files.
  • Troubleshoot mapping speed issues

Acknowledgments

Thanks to FAST-LIO for sharing their awesome research.
Thanks also to Ericsii for providing the ros2 branch.
I follow the license of each repository.

About

[ROS2 humble] ROS2 wrapper for FAST-LIO package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 90.8%
  • Python 6.1%
  • MATLAB 1.3%
  • Other 1.8%