Skip to content

Latest commit

ย 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– bumpy_ws โ€” ROS2 Autonomous Mobile Robot Platform

A ROS2-based Autonomous Mobile Robot (AMR) platform supporting LiDAR-based SLAM, sensor fusion (EKF), autonomous navigation, teleoperation, camera/gas sensing, and multi-robot formation control.

The workspace is developed and tested using ROS2 Humble on Ubuntu 22.04.


๐Ÿ“Œ Overview

bumpy_ws is a modular ROS2 workspace built for a differential-drive autonomous mobile robot (bumpy7) and multi-robot experimentation.

The system uses a YDLidar 2D LiDAR for environment perception, an EKF-based sensor fusion pipeline, and supports SLAM, autonomous navigation, and multi-robot formation control.

The workspace contains:

  • Robot bringup
  • Robot description (URDF/xacro) + EKF sensor fusion
  • Low-level firmware (motor control, teleop, tick publishing)
  • Sensor drivers (camera, IMU, gas sensor, OLED, web dashboard, leader election)
  • SLAM (slam_toolbox + Cartographer)
  • Autonomous navigation (Nav2)
  • Multi-robot formation control
  • YDLidar ROS2 driver + SDK

The architecture is designed to be extendable for multi-robot coordination, swarm robotics, warehouse automation, and autonomous indoor navigation.


๐Ÿš€ Features

๐Ÿค– Autonomous Robot

  • ROS2-based robot control (bumpy_bringup)
  • Differential-drive URDF/xacro description (bumpy_description)
  • EKF-based sensor fusion (ekf.yaml)
  • TF management
  • Velocity control via diff_tf.py / motor_control.py

๐Ÿ—บ๏ธ SLAM & Mapping

  • Dual SLAM support: slam_toolbox and Google Cartographer (bumpy_slam)
  • Real-time 2D map generation
  • Map saving (save_map.launch.py)
  • Multiple saved maps (amr_map, maze, room_map, SREC_COE_NEW)
  • Saved waypoints per map (JSON)

๐Ÿงญ Navigation

  • Nav2-based autonomous navigation (bumpy_navigation)
  • Configurable params (nav2_params.yaml)

๐Ÿ“ก Sensors

  • Camera + camera TF publisher
  • IMU node
  • Gas sensor node
  • OLED status display
  • Robot status monitor
  • Web server dashboard (Flask-based)
  • Leader election node (multi-robot)

๐ŸŽฎ Firmware & Teleoperation

  • Differential-drive tick publisher + motor control
  • Xbox controller teleop config
  • Keyboard teleoperation

๐Ÿค Multi-Robot Coordination

The formation_control package contains:

  • 2-robot formation control
  • 3-robot formation control (two implementations)
  • Obstacle handling for multi-robot formations

๐Ÿ› ๏ธ Technology Stack

Component Technology
Operating System Ubuntu 22.04
Middleware ROS2 Humble
Programming Python / C++
SLAM slam_toolbox, Google Cartographer
Navigation ROS2 Navigation Stack (Nav2)
Sensor Fusion robot_localization (EKF)
Visualization RViz2
Environment Perception YDLidar 2D LiDAR
Build System Colcon
Multi-Robot Control Python
Robot Communication ROS2 Topics / TF

๐Ÿ“‚ Project Structure

bumpy_ws/
โ”‚
โ”œโ”€โ”€ Bumpy Rviz/                     # Saved RViz2 configs for mapping/navigation
โ”‚   โ”œโ”€โ”€ bumpy7.rviz
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_bringup/              # Top-level robot bringup
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_bringup/
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bringup.launch.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ minimal.launch.py
โ”‚   โ”‚   โ”œโ”€โ”€ package.xml
โ”‚   โ”‚   โ”œโ”€โ”€ setup.py
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_description/          # URDF/xacro + EKF config
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_description/
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ekf.yaml
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ robot.launch.py
โ”‚   โ”‚   โ”œโ”€โ”€ urdf/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bumpy.xacro
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bumpy7.xacro
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ robot.xacro
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_firmware/             # Low-level motor control & teleop
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_firmware/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ diff_tf.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ motor_control.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ teleop.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ tick_pub.py
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ motor_control.launch.py
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_navigation/           # Nav2 autonomous navigation
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_navigation/
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ navigation.launch.py
โ”‚   โ”‚   โ”œโ”€โ”€ params/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ nav2_params.yaml
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_sensors/               # Sensor drivers & dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_sensors/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ camera.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ camera_tf_pub.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ gas_sensor_node.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ imu.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ leader_ele.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ oled.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ robot_status.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ web_server_node.py
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ bumpy_slam/                 # SLAM (slam_toolbox + Cartographer) + maps
โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_slam/
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ slam.lua
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ slam_params.yaml
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ slam.launch.py          # slam_toolbox
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ cartographer.launch.py  # Cartographer
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ save_map.launch.py
โ”‚   โ”‚   โ”œโ”€โ”€ maps/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ amr_map.pgm / .yaml
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ maze.pgm / .yaml
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ room_map.pgm / .yaml
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SREC_COE_NEW.pgm / .yaml
โ”‚   โ”‚   โ”œโ”€โ”€ waypoints/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bumpy_map_waypoints.json
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ room_map_waypoints.json
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SREC_COE_NEW_waypoints.json
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ formation_control/          # Multi-robot formation control
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ formation_config.yaml
โ”‚   โ”‚   โ”œโ”€โ”€ formation_control/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 2robot.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 3robot.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 3robot2.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ obstacle.py
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ formation.launch.py
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ydlidar_ros2_driver/        # YDLidar ROS2 driver (C++)
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ydlidar.rviz
โ”‚   โ”‚   โ”œโ”€โ”€ launch/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ydlidar_launch.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ydlidar_launch_view.py
โ”‚   โ”‚   โ”œโ”€โ”€ params/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ *.yaml   (per LiDAR model)
โ”‚   โ”‚   โ””โ”€โ”€ src/
โ”‚   โ”‚       โ”œโ”€โ”€ ydlidar_ros2_driver_client.cpp
โ”‚   โ”‚       โ””โ”€โ”€ ydlidar_ros2_driver_node.cpp
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ YDLidar-SDK/                # Vendored LiDAR SDK
โ”‚       โ”œโ”€โ”€ core/
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ python/
โ”‚       โ””โ”€โ”€ doc/
โ”‚
โ”œโ”€โ”€ build/        # Ignored
โ”œโ”€โ”€ install/      # Ignored
โ””โ”€โ”€ log/          # Ignored

__pycache__/, .pyc, and .bak/.backup files should be excluded from Git via .gitignore.


โš™๏ธ Installation

Prerequisites

  • Ubuntu 22.04
  • ROS2 Humble
  • Python 3
  • Colcon
  • RViz2
  • slam_toolbox
  • Cartographer
  • Navigation2
  • robot_localization (EKF)

Install required ROS2 packages:

sudo apt update

sudo apt install \
ros-humble-slam-toolbox \
ros-humble-cartographer \
ros-humble-cartographer-ros \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-robot-localization \
ros-humble-teleop-twist-keyboard \
ros-humble-rviz2

๐Ÿ“ฅ Clone the Repository

git clone https://github.com/rajagopal95/bumpy_ws.git
cd bumpy_ws

๐Ÿ”จ Build the Workspace

colcon build
source install/setup.bash

For every new terminal:

source ~/bumpy_ws/install/setup.bash

๐Ÿค– Robot Bringup

ros2 launch bumpy_bringup bringup.launch.py

Bringup starts:

  • Robot description (URDF/TF)
  • EKF sensor fusion
  • Motor control / firmware nodes
  • Sensor nodes

For a lightweight bringup (development/testing):

ros2 launch bumpy_bringup minimal.launch.py

๐Ÿงฎ Sensor Fusion (EKF)

Odometry and IMU data are fused using robot_localization, configured at:

src/bumpy_description/config/ekf.yaml

This publishes a filtered odom โ†’ base_link transform used by SLAM and Nav2.


๐Ÿ—บ๏ธ SLAM

The project supports two SLAM backends: slam_toolbox and Google Cartographer.

slam_toolbox

ros2 launch bumpy_slam slam.launch.py

Parameters:

src/bumpy_slam/config/slam_params.yaml

Cartographer

ros2 launch bumpy_slam cartographer.launch.py

Parameters:

src/bumpy_slam/config/slam.lua

๐ŸŽฎ Manual Teleoperation

Keyboard:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=/cmd_vel

Keyboard Controls

        i
    j   k   l
        ,
Key Function
i Forward
, Backward
j Rotate Left
l Rotate Right
k Stop

๐Ÿ’พ Saving a Map

ros2 launch bumpy_slam save_map.launch.py

Saved maps are stored in:

src/bumpy_slam/maps/

Each map includes a .yaml (metadata) and .pgm (occupancy grid image).

Saved waypoints for each map live in:

src/bumpy_slam/waypoints/

๐Ÿงญ Autonomous Navigation

ros2 launch bumpy_navigation navigation.launch.py

Navigation pipeline:

                Saved Map
                    โ”‚
                    โ–ผ
              Localization
                    โ”‚
                    โ–ผ
             Global Planner
                    โ”‚
                    โ–ผ
              Local Planner
                    โ”‚
                    โ–ผ
              Controller
                    โ”‚
                    โ–ผ
                 /cmd_vel
                    โ”‚
                    โ–ผ
                  Robot

Nav2 parameters:

src/bumpy_navigation/params/nav2_params.yaml

๐Ÿ–ฅ๏ธ Visualizing in RViz2

You can view LiDAR scans, TF frames, maps, and navigation data in RViz2 on your own computer.

LiDAR Config

An RViz config is included with the LiDAR driver:

src/ydlidar_ros2_driver/config/ydlidar.rviz
rviz2 -d src/ydlidar_ros2_driver/config/ydlidar.rviz

Mapping (SLAM)

While running slam_toolbox or Cartographer, open RViz2 and set the Fixed Frame to map, then add Map, LaserScan, and TF displays. Load your saved mapping config from the Bumpy Rviz folder:

rviz2 -d "Bumpy Rviz/bumpy7.rviz"

Navigation (Nav2)

While bumpy_navigation is running, open RViz2 and add displays for Map, Costmap (global/local), Path, LaserScan, and TF. Load your saved navigation config from the Bumpy Rviz folder:

rviz2 -d "Bumpy Rviz/bumpy7.rviz"

Nav2's bundled default config also works if installed:

rviz2 -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz

๐Ÿ“ท Sensors & Dashboard

The bumpy_sensors package provides:

  • camera.py / camera_tf_pub.py โ€” camera driver + TF publishing
  • imu.py โ€” IMU data publishing
  • gas_sensor_node.py โ€” gas sensor readings
  • oled.py โ€” OLED status display
  • robot_status.py โ€” robot health/status monitoring
  • leader_ele.py โ€” leader election for multi-robot setups
  • web_server_node.py โ€” Flask-based web dashboard for monitoring

๐Ÿค Multi-Robot Formation Control

src/formation_control/

Implementations:

formation_control/
โ”œโ”€โ”€ 2robot.py     # Two-robot formation
โ”œโ”€โ”€ 3robot.py     # Three-robot formation (v1)
โ”œโ”€โ”€ 3robot2.py    # Three-robot formation (v2)
โ””โ”€โ”€ obstacle.py   # Obstacle handling for formations

๐Ÿ‘ฅ Two-Robot Formation

        Robot 1
           โ”‚
           โ–ผ
      Formation Logic
           โ”‚
           โ–ผ
        Robot 2

๐Ÿ‘ฅ๐Ÿ‘ฅ Three-Robot Formation

             Robot 1
                โ–ฒ
               / \
              /   \
             /     \
        Robot 2 โ”€โ”€โ”€ Robot 3

๐Ÿšง Obstacle Handling

              Obstacle
                 โ–ˆโ–ˆโ–ˆ
                 โ–ˆโ–ˆโ–ˆ
                  โ”‚
                  โ–ผ

        Robot 1
           \
            \
        Robot 2 -----> Formation Motion
            /
           /
        Robot 3

๐Ÿ”„ Multi-Robot System Architecture

                 Environment
                      โ”‚
                      โ–ผ
               LiDAR / Sensors
                      โ”‚
                      โ–ผ
                Robot Perception
                      โ”‚
                      โ–ผ
             Formation Controller
                      โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚           โ”‚           โ”‚
          โ–ผ           โ–ผ           โ–ผ
       Robot 1     Robot 2     Robot 3
          โ”‚           โ”‚           โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
                      โ–ผ
               Coordinated Motion

๐Ÿง  Overall System Workflow

                         START
                           โ”‚
                           โ–ผ
                    Robot Bringup
                           โ”‚
                           โ–ผ
                 Sensor + EKF Startup
                           โ”‚
                           โ–ผ
                    YDLidar 2D LiDAR
                           โ”‚
                           โ–ผ
                 slam_toolbox /
                    Cartographer
                           โ”‚
                           โ–ผ
                    Real-Time SLAM
                           โ”‚
                           โ–ผ
                       Save Map
                           โ”‚
                           โ–ผ
                 Nav2 Localization
                           โ”‚
                           โ–ผ
                 Autonomous Navigation
                           โ”‚
                           โ–ผ
                  Multi-Robot Control
                           โ”‚
                           โ–ผ
                Formation + Obstacle
                     Handling
                           โ”‚
                           โ–ผ
                          END

๐Ÿ“Š ROS2 Communication

Important interfaces include:

Velocity Command

/cmd_vel

LiDAR

/scan

Odometry / TF

/odom
odom โ†’ base_link (EKF-fused)

To inspect available topics:

ros2 topic list

To inspect the TF tree:

ros2 run tf2_tools view_frames

๐Ÿ“Ÿ YDLidar Driver & SDK

The ydlidar_ros2_driver package (C++) wraps the vendored YDLidar-SDK to provide ROS2 LaserScan output.

Build the SDK (if not already built):

cd src/YDLidar-SDK
mkdir -p build && cd build
cmake ..
make
sudo make install

Then build the ROS2 driver as part of the workspace via colcon build.


๐Ÿ“ Recommended Git Ignore

# ROS2
build/
install/
log/

# Python
__pycache__/
*.pyc

# Backups
*.bak
*.bak2
*.backup
*.backup.*

# YDLidar-SDK build artifacts
src/YDLidar-SDK/build/

# IDE
.vscode/
.idea/

# OS
.DS_Store

๐Ÿ“ธ Results

The system is designed to demonstrate:

  • โœ… EKF-based sensor fusion
  • โœ… Real-time LiDAR mapping
  • โœ… Dual SLAM support (slam_toolbox + Cartographer)
  • โœ… Saved occupancy-grid maps + waypoints
  • โœ… Nav2 autonomous navigation
  • โœ… Manual keyboard robot control
  • โœ… Sensor dashboard (camera, IMU, gas, OLED, web)
  • โœ… Multi-robot formation control
  • โœ… Obstacle-aware multi-robot development

Add project screenshots here:

docs/
โ”œโ”€โ”€ mapping.png
โ”œโ”€โ”€ navigation.png
โ”œโ”€โ”€ rviz.png
โ””โ”€โ”€ formation_control.png

Example:

![SLAM Mapping](docs/mapping.png)

๐Ÿ”ฎ Future Improvements

Navigation

  • Dynamic obstacle avoidance
  • Improved local planning
  • Adaptive planner selection
  • Improved localization

Perception

  • LiDAR + IMU fusion refinement
  • LiDAR + Camera fusion
  • AI-based object detection (YOLOv8)
  • Dynamic obstacle tracking

Multi-Robot

  • Dynamic formation switching
  • Leader-follower control
  • Decentralized coordination
  • Collision avoidance
  • Multi-robot task allocation
  • Swarm intelligence

Remote Operation

  • Web-based robot monitoring
  • Multi-robot dashboard
  • Remote teleoperation
  • Real-time status monitoring

๐ŸŽฏ Potential Applications

  • ๐Ÿญ Warehouse automation
  • ๐Ÿ“ฆ Material transportation
  • ๐Ÿฅ Hospital logistics
  • ๐Ÿข Indoor service robots
  • ๐Ÿšจ Surveillance
  • ๐Ÿ” Inspection
  • ๐Ÿค Multi-robot exploration
  • ๐Ÿ Swarm robotics research

๐Ÿ‘จโ€๐Ÿ’ป Authors

N N Rajagopal

Venket Ramana R S

Harishwaran T

ROS2 | Autonomous Mobile Robots | SLAM | Navigation | Multi-Robot Systems

Portfolio: rajagopal95.github.io/Portfolio


๐Ÿ“œ License

This project is developed for educational, development, and research purposes.

About

ros2 Autonomous Mobile Robot (AMR)

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages