Welcome to our Mobile Robotics Project! This repository contains all the necessary resources to simulate, operate, and extend our teleoperated UAV system for mapping and localization in forest environments. The project leverages ROS2, Gazebo Classic 11, RVIZ2, and cutting-edge SLAM algorithms to deliver state-of-the-art performance.
- Overview
- Features
- Key Packages
- Acknowledgements
- Getting Started
- Installation
- Usage
- Changing Worlds
- People behind the project
This project focuses on creating a versatile UAV platform for mapping and localization in GPS-denied environments, particularly forests. The drone is designed to:
- Map simulated forest environments in Gazebo.
- Perform LiDAR-Inertial odometry for precise localization.
- Simulation: Full integration with Gazebo Classic 11 for realistic forest environments.
- Visualization: 3D mapping and localization visualization using RVIZ2.
- Teleoperation: ROS2 nodes for teleoperated flight, mapping, and localization.
- Scalable Architecture: Modular design for adding new sensors, controllers, or behaviors.
- SJTU Drone: Contains UAV controller, simulation models, and forest world files.
- LI-SLAM: Implements LiDAR-Inertial odometry and mapping with a pose-graph backend.
- FASTLIO2: High-speed, real-time LiDAR-Inertial odometry for efficient localization and mapping.
We would like to acknowledge the following for their contributions:
- Shanghai Jiao Tong University for the SJTU Drone model, based on the Parrot AR2 drone: Repository
- Ryuhei Sasaki for the LI-SLAM package: Repository
- HKU-MARS for the FASTLIO2 package: Repository
- ROS2 Humble
- Gazebo Classic 11
- Python 3.8 or later
- C++ (for performance-critical nodes)
- Gazebo Model Files
# Clone the repository
git clone https://github.com/ShameerMasroor/LI-SLAM-and-FASTLIO2-for-Teleoperated-UAVs.git
Use rosdep
to install dependencies:
# Install ROS2 dependencies
rosdep install --from-paths src --ignore-src -r -y
-
Visit this Google Drive link.
-
Download the model files and place them in the following Gazebo directories:
/usr/share/gazebo-11/models /usr/share/gazebo-11/materials
Warning: The Gazebo simulation will fail to load if the models are not placed correctly!
# Source ROS2 setup
source /opt/ros/humble/setup.bash
# Build the workspace
colcon build
If errors occur during the build, you can build individual packages manually:
# Build specific packages
cd lidarslam_ros2-develop
colcon build --packages-select lidarslam_msgs
colcon build --packages-select graph_based_slam
colcon build --packages-select scanmatcher
# Build SJTU Drone package
cd sjtu_drone
colcon build
Note: We found that for machines having 8GB of RAM or below may freeze or become unresponsive during the building step. Build packages individually in that case.
# Navigate to the SJTU Drone package
cd sjtu_drone-ros2
# Source the workspace
source install/setup.bash
# Launch the Gazebo simulation
ros2 launch sjtu_drone_bringup sjtu_drone_bringup.launch.py
# Navigate to the LI-SLAM package
cd lidarslam_ros2-develop
# Source the workspace
source install/setup.bash
# Launch LI-SLAM
ros2 launch lidarslam lidarslam.launch.py
# Navigate to the FASTLIO2 package
cd FASTLIOROS2
# Launch FASTLIO2
ros2 launch fast_lio mapping.launch.py
Note: It is recommended to run only one of the SLAM packages at a time.
You can control the drone using either xterm or a Gamepad. Xterm is enabled by default, but you can switch to use a gamepad by commenting out the code for xterm in the sjtu_drone_bringup.launch.py
file.
sudo apt update
sudo apt install xterm
sudo apt install ros-humble-rviz-imu-plugin
A number of test worlds are provided in the sjtu_drone_description directory. You can set which world to use by changing worlds in the sjtu_drone_gazebo.launch.py file.
This project was lovingly made by Zaryan, Maleeha, and Shameer, all three of which go under the name of Zarmasha.