Skip to content

AuTURBO/RDSim

Repository files navigation

RDSim: Robo Delivery Simulator

Summary: RDSim is a Robo Delivery Simulator developed for autonomous delivery systems. It integrates state-of-the-art SLAM, localization, planning, and control technologies within the Gazebo simulation environment. Designed as a comprehensive solution, RDSim supports robot control, environment simulation, and robust navigation capabilities.

Image 1 Image 2 Image 3

1. Environment Settings

There are two ways to execute: 'Manual Installation && build' or 'Docker Installation'

RDSim clone

First of all, we need to clone this project before that.

$ cd ~/ros2_ws/src
$ git clone --recursive https://github.com/AuTURBO/RDSim.git
$ cd ~/ros2_ws/src/RDSim/ && git submodule update --remote

1.1. Manual Installation && build

Requirements

Setting GAZEBO_RESOURCE_PATH

echo "export GAZEBO_RESOURCE_PATH=/usr/share/gazebo-11:$GAZEBO_RESOURCE_PATH" >> ~/.bashrc
source ~/.bashrc

Install dependency

$ sudo apt-get update && sudo apt install -y \
    ros-humble-robot-localization \
    ros-humble-imu-filter-madgwick \
    ros-humble-controller-manager \
    ros-humble-diff-drive-controller \
    ros-humble-interactive-marker-twist-server \
    ros-humble-joint-state-broadcaster \
    ros-humble-joint-trajectory-controller \
    ros-humble-joint-state-publisher-gui \
    ros-humble-joy \
    ros-humble-robot-state-publisher \
    ros-humble-teleop-twist-joy \
    ros-humble-twist-mux \
    libgazebo-dev \
    ros-humble-spatio-temporal-voxel-layer \
    ros-humble-pcl-ros \
    ros-humble-pcl-conversions \
    ros-humble-rclcpp-components \
    ros-humble-xacro* \
    tmux \
    tmuxp \
    && echo 'alias start_rdsim="cd ~/ros2_ws/src/RDSim/rdsim_launcher && tmuxp load rdsim_launcher.yaml"' >> ~/.bashrc \
    && echo 'alias end="tmux kill-session && killgazebo"' >> ~/.bashrc \
    && source ~/.bashrc

RDSim build

$ cd ~/ros2_ws && rosdep install --ignore-src --rosdistro humble --from-paths ./src/RDSim/rdsim_submodules/navigation2
$ cd ~/ros2_ws && colcon build --symlink-install --parallel-workers 8 && source install/local_setup.bash

1.2. Docker Installation

Docker environment tested on Ubuntu 22.04, nvidia

# in rdsim main directory
cd ~/ros2_ws/src/RDSim/docker && ./run_command.sh

2. Executing the RDSim with One Line

Launch All Nodes

To start the simulation and launch all necessary nodes, simply execute the following command:

start_rdsim

This command initializes the RDSim environment and starts all relevant processes automatically.

Terminate All Nodes

To terminate all running nodes and clean up resources, use the following

end

This command ensures that all processes related to the simulation are safely stopped.

3. Launch the ROS2 Nodes and GAZEBO world

Launch the Gazebo world

ros2 launch rdsim_gazebo rdsim_gazebo_world.launch.py
Image 1

Loading the robot model into the GAZEBO world

ros2 launch rdsim_description rdsim_gazebo.launch.py
Image 1

Teleoperate the robot

Executing the teleoperation node to control the robot via keyboard input

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Navigate the outdoor robot in the GAZEBO world

The system supports launching localization nodes (VSLAM, EKF) and the navigation node (NAV2) for outdoor environments.

ros2 launch rdsim_gazebo rdsim_gps_navigation.launch.py
Image 1

This Navigation can detect 3D obstacles, such as trees, using a 3D LiDAR sensor and a spatio-temporal voxel layer for precise obstacle avoidance.

Image 1

This navigation module includes a new topology map server that supports predefined routing plans for efficient delivery in the GAZEBO simulation environment. The topology map server is implemented as a behavior, enabling the use of behavior trees for flexible and adaptive decision-making. Additionally, the behavior tree can be visualized using Groot for better understanding and debugging.

Image 1 Image 2

The localization framework is based on pose estimation using the robot_localization package. It integrates data from various sensors, including:

  • VSLAM (HDL Localization) module
  • GPS sensor
  • Wheel odometry
  • IMU sensor
Image 1

* The box represented in orange is used