A comprehensive ROS 2 workspace for autonomous robotics applications featuring SLAM, object detection, and Boston Dynamics Spot robot integration. This system provides advanced perception capabilities including QR code detection, hazmat detection, ArUco markers, and real-time mapping for autonomous navigation.
This repository contains several ROS 2 packages that work together to provide:
- SLAM and Mapping: Real-time simultaneous localization and mapping using Hector SLAM and SLAM Toolbox
- Object Detection: YOLOv8/YOLOv5 with OpenVINO acceleration for hazmat detection and general object recognition
- Marker Detection: QR codes and ArUco markers for localization and navigation waypoints
- Robot Integration: Boston Dynamics Spot robot driver with additional features
- Geotiff Generation: Automated map export functionality for GIS applications
- Multi-Camera Support: Intel RealSense camera integration with synchronized data processing
world_info: Object detection, QR code reading, ArUco markers, and world understandingspot_driver_plus: Enhanced Boston Dynamics Spot robot driver with additional perception featuresrrl_launchers: Launch configurations for various SLAM, mapping, and navigation scenarios
hector_geotiff: Geotiff map generation and export functionalityhector_map_tools: Map processing utilities and toolshector_marker_drawing: Visualization and marker drawing capabilities
- Ubuntu 20.04/22.04
- ROS 2 Humble (recommended) or Galactic
- Python 3.8+
# Essential dependencies
sudo apt update
sudo apt install -y \
libzbar-dev \
libeigen3-dev \
libopencv-dev \
ros-humble-cv-bridge \
ros-humble-image-transport \
ros-humble-tf2-ros \
ros-humble-slam-toolbox \
ros-humble-navigation2 \
ros-humble-realsense2-camera
# For QR code detection
sudo apt install libzbar-devsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main"
sudo apt update
sudo apt install librealsense2-dkms librealsense2-utils librealsense2-devWhy OpenVINO? Provides significant performance improvements for object detection on Intel integrated GPUs. See: Running OpenVINO on Intel GPU
Follow the Intel GPU installation guide for GPU compute support.
cd ~
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz
tar -xvzf l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz
rm l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz
mv l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64 openvino2022.3
. ~/openvino2022.3/setupvars.sh
echo '
#OpenVINO
. ~/openvino2022.3/setupvars.sh > /dev/null' >> ~/.bashrc# Install ultralytics for YOLO models
pip3 install ultralytics
# Install QReader for QR code detection with OpenVINO acceleration
git clone https://github.com/RRL-ALeRT/QReader_openvino
cd QReader_openvino
pip3 install -e .# Clone the repository
git clone https://github.com/RRL-ALeRT/alert_ros2.git
cd alert_ros2
# Source ROS 2
source /opt/ros/humble/setup.bash
# Build the workspace
colcon build --symlink-install
# Source the workspace
source install/setup.bash# Terminal 1: Launch SLAM system
ros2 launch rrl_launchers slam_launch.py
# Terminal 2: Launch perception system
ros2 launch world_info tag_detectors_launch.py
# Terminal 3: Launch trajectory server (optional)
ros2 run hector_trajectory_server hector_trajectory_server# Launch hazmat detection with multiple cameras
ros2 launch world_info tag_detectors_launch.py
# Run YOLOv8 object detection with OpenVINO
ros2 run spot_driver_plus kinova_yolov8_openvino.py# Real-time geotiff generation with SLAM
ros2 run hector_geotiff geotiff_node
# One-time map saving with SLAM Toolbox
ros2 run hector_geotiff geotiff_saver# Launch Spot driver
ros2 launch rrl_launchers spot_driver_launch.py
# Emergency stop functionality
ros2 run spot_driver_plus spot_estop.pyslam_launch.py: Complete SLAM system with mapping and perceptionnav2_launch.py: Navigation stack with autonomous path planningrealsenses_launch.py: Multi-camera RealSense configurationcartographer2d_launch.py: Google Cartographer 2D SLAMrtabmap_launch.py: RTAB-Map RGB-D SLAMoccupancy_grid_launch.py: Occupancy grid mapping
- Camera Feeds:
/rs_front/color/image_raw,/rs_left/color/image_raw,/rs_right/color/image_raw - Depth Data:
/rs_*/aligned_depth_to_color/image_raw - Object Detection:
/detected_objects,/hazmat_detections - QR Codes:
/qr_detections - Map Data:
/map,/geotiff_map
- Map Saving:
/save_map - Emergency Stop:
/spot/emergency_stop - Path Planning:
/plan_path
Configuration files are located in the config/ directories of each package:
- SLAM Parameters:
rrl_launchers/config/mapper_params_online_async.yaml - Camera Calibration: Individual camera parameter files
- Detection Thresholds: Configurable confidence thresholds for object detection
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
- Max Kirsch - m.kirsch@fh-aachen.de
- Shubham Pawar - skpawar1305@gmail.com
- Hector SLAM - Original SLAM implementation
- QReader OpenVINO - Accelerated QR code detection
- OpenVINO not found: Ensure OpenVINO environment is sourced in
~/.bashrc - Camera not detected: Check RealSense installation and USB permissions
- Build failures: Verify all ROS 2 dependencies are installed
- Use GPU inference mode for object detection when available
- Adjust confidence thresholds based on your use case
- Consider reducing image resolution for improved performance