Skip to content

nomoto39/FAST_LIO_NAV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAST_LIO_NAV2

This repository provides an experimental mapless, short-distance autonomous navigation system. It seamlessly integrates real-time LiDAR odometry and point cloud generation from FAST_LIO with the ROS 2 Nav2 stack.

Notably, this single package provides a full-stack integration: covering everything from sensor data processing, SLAM, and autonomous path planning, all the way down to direct hardware motor control.

🖥️ System Requirements

  • OS: Ubuntu 22.04
  • ROS 2: Humble Hawksbill
  • Hardware (Compute): Intel NUC (Core i7) or NVIDIA Jetson Orin Nano
  • Hardware (Sensor): Livox Mid-360 (Assumed to be mounted horizontally, facing upwards)
  • Hardware (Controller): Arduino Mega (or compatible microcontroller)+ Cytron MDDS30 Motor Driver

📦 Installation & Build

This repository uses a .repos file to manage external dependencies cleanly.

# 1. Clone this repository
git clone https://github.com/nomoto39/FAST_LIO_NAV2.git

# 2. Import dependencies (livox_ros_driver2)
vcs import < FAST_LIO_NAV2/dependencies.repos

# 3. Build the workspace
cd ~/FAST_LIO_NAV2
colcon build --symlink-install
source install/setup.bash

🔌 Hardware Setup (Motor Control)

This system assumes a Differential Drive robot. The /cmd_vel velocity commands generated by Nav2 are converted into serial signals and sent to the microcontroller to drive the motors.

Before running the system, please complete the following hardware setup:

1. Configure udev rules

To ensure the microcontroller is consistently recognized on the same USB port, apply the provided udev rules:

cd ~/FAST_LIO_NAV2/src/ros2serial_arduino
# Copy the rules file (Requires root privilege)
sudo cp udev/99-usb-arduino-mega.rules /etc/udev/rules.d/
# Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger

2. Upload Arduino Code

Flash the motor control code to your microcontroller (e.g., using Arduino IDE or PlatformIO). The source code is located at:

  • src/ros2serial_arduino/Arduino/ros2serial_arduino/src/motor_control.cpp

🚀 Usage

To launch the entire autonomous navigation system (Sensor, SLAM, Nav2, and Robot Controller), run:

ros2 launch robot_controller auto_local.launch.py

⚙️ Customization for Your Robot

When applying this system to your mobile robot, you MUST adjust the following parameters to match your hardware dimensions.

1. Static TF (Coordinate Transformations)

The system uses the following TF tree: map -> odom -> body -> base_link -> livox_frame.

  • FAST_LIO publishes the dynamic TF from odom -> body.

  • You need to adjust the static TFs in your launch file (auto_local.launch.py).

Example Setup (Modify x, y, z according to your LiDAR mounting position): The following example assumes the Livox sensor is mounted 0.17m forward (x) and 0.63m upward (z) from the center of the robot's base (ground level).

# 1. map -> odom (Offsets the starting position)
map_to_odom_tf = Node(
    package='tf2_ros',
    executable='static_transform_publisher',
    name='map_to_odom',
    arguments=['--x', '0.17', '--y', '0.0', '--z', '0.63', ... , '--frame-id', 'map', '--child-frame-id', 'odom']
)

# 2. body -> base_link (Transform from LiDAR to Robot base)
rotbody_to_baselink_tf = Node(
    package='tf2_ros',
    executable='static_transform_publisher',
    name='body_to_base_link',
    arguments=['--x', '-0.17', '--y', '0.0', '--z', '-0.63', ... , '--frame-id', 'body', '--child-frame-id', 'base_link']
)

# 3. base_link -> livox_frame (Transform from Robot base to LiDAR)
baselink_to_livox_tf = Node(
    package='tf2_ros',
    executable='static_transform_publisher',
    name='static_tf_base_link_livox',
    arguments=['--x', '0.17', '--y', '0.0', '--z', '0.63', ... , '--frame-id', 'base_link', '--child-frame-id', 'livox_frame']
)

2. Nav2 Parameters (robot_radius)

Open your Nav2 configuration YAML file located at src/robot_controller/config/nav2_params.yaml and update the robot_radius (or footprint) parameter to match the physical size of your robot.

You must change this value in both the local_costmap and global_costmap sections to ensure safe obstacle avoidance.

local_costmap:
  local_costmap:
    ros__parameters:
      robot_radius: 0.3 # Change this to your robot's radius in meters

global_costmap:
  global_costmap:
    ros__parameters:
      robot_radius: 0.3 # Change this to your robot's radius in meters

🙏 Acknowledgments

This system is built upon the incredible work of the open-source community. We express our deepest gratitude to the original authors:

FAST-LIO by hku-mars (Original SLAM algorithm)

FAST_LIO_ROS2 by Taeyoung96 (ROS 2 porting)

ros2serial_arduino by tomoswifty (Arduino serial communication base)

About

This package implements mapless, short-distance autonomous navigation using FAST_LIO and Nav2. It utilizes the real-time odometry and point cloud data generated by FAST_LIO for the Nav2 stack.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors