Skip to content

R2-D2 is a differential drive cleaning robot capable of autonomous navigation, mapping, localization, and path planning. The robot features lidar-based SLAM, real-time obstacle avoidance, and full Nav2 integration for autonomous operation in simulated environments.

License

Notifications You must be signed in to change notification settings

Ojas-Thombare/R2-D2-Autonomous-Cleaning-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R2-D2 Autonomous Cleaning & Exploration Robot

ROS 2 Gazebo Python

An autonomous robot capable of self-exploring unknown environments and performing systematic room cleaning.


✅ Progress Tracking

Feature Status Description
Simulation ✅ Done Robot model & physics in Gazebo Harmonic.
Mapping ✅ Done SLAM Toolbox integration.
Navigation ✅ Done Nav2 Stack (Path Planning & Obstacle Avoidance).
Auto Mapping ✅ Done Frontier Exploration (OpenCV based).
Auto Cleaning 🚧 In Progress Room Segmentation & Zigzag Plan (Code Logic Ready).

🔮 Future Work

  • Refine Coverage Path Planning algorithm.
  • Add 3D Vision support.
  • Implement Docking & Auto-Charging.

🚀 How to Run (Demo)

1. Robot Visualization

View the robot model and sensor configuration.

ros2 launch r2d2_description display.launch.py

Gazebo Simulation

📂 About this:

  • Package: r2d2_description
  • File: urdf/cleaner_robot.urdf.xacro
  • Details: Defines the robot chassis, wheels, lidar, and camera joints.

2. Manual Mapping (SLAM)

Drive the robot manually to create a map of the house.

ros2 launch r2d2_navigation mapping.launch.py

SLAM Mapping

📂 About this:

  • Package: r2d2_navigation
  • Tech: Uses slam_toolbox (Async Mode).
  • Goal: Generates a 2D Occupancy Grid map of the environment.

3. Autonomous Navigation

Give the robot a "Goal Pose" in RViz, and it will drive there automatically.

ros2 launch r2d2_navigation navigation.launch.py

Navigation

📂 About this:

  • Package: r2d2_navigation
  • Tech: Nav2 Stack (AMCL + MPPI Controller).
  • Details: Uses nav2_params.yaml to configure costmaps and behavior trees.

4. Auto Mapping (Frontier Exploration)

The robot explores the unknown house by itself until the map is complete.

# 1. Launch Complete Autonomy Stack
ros2 launch r2d2_autonomy autonomy.launch.py

# OR (If simulation is already running)

# 2. Run Frontier Explorer Node
ros2 run r2d2_autonomy frontier_explorer

Auto Mapping

📂 About this:

  • Package: r2d2_autonomy
  • Code: frontier_explorer.py
  • Logic: Uses OpenCV to find "frontiers" (edges between known & unknown space) and sends Nav2 goals to them.

5. Auto Cleaning (Coverage)

The robot systematically cleans the mapped house room-by-room.

ros2 launch r2d2_autonomy cleaning.launch.py

(Demo GIF Coming Soon)

📂 About this:

  • Package: r2d2_autonomy
  • Code: coverage_planner.py
  • Logic:
    1. Segment Map: Breaks map into Rooms.
    2. Zigzag Path: Generates a Boustrophedon path to cover every inch.

📥 Installation

# 1. Clone
mkdir -p ~/dev_ws/src
cd ~/dev_ws/src
git clone https://github.com/Ojas-Thombare/R2-D2-Autonomous-Cleaning-Robot.git

# 2. Install
cd ~/dev_ws
rosdep install --from-paths src --ignore-src -r -y

# 3. Build provided packages
colcon build --packages-select r2d2_description r2d2_gazebo r2d2_navigation r2d2_autonomy

# 4. Source
source install/setup.bash

About

R2-D2 is a differential drive cleaning robot capable of autonomous navigation, mapping, localization, and path planning. The robot features lidar-based SLAM, real-time obstacle avoidance, and full Nav2 integration for autonomous operation in simulated environments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published