Skip to content

Kadhiravan-K/Bulter_bot

 
 

Repository files navigation

Butler Delivery Bot: ROS 2 Autonomous Services Stack

This repository contains the complete software stack for the Butler Delivery Bot. At its core, it uses Behavior Trees (BT.CPP) to manage high-level mission logic, seamlessly orchestrating tasks like navigating to the kitchen, waiting for orders, delivering to specific tables, handling failures (e.g., blocked paths or skipped tables), and returning home.

Fully integrated with ROS 2 and Nav2, the stack includes Gazebo simulation, robust mapping and localization, and a custom web UI for real-time mission dispatch and monitoring.

📦 Directory Structure

The repository is modularized into several ROS 2 packages:

  • butler_bot_bringup: Core launch scripts to spin up simulation, navigation, and mission control nodes.
  • butler_bot_controller: Differential drive configurations and joystick teleop.
  • butler_bot_description: URDF/Xacro models of the robot.
  • butler_bot_gazebo: Gazebo simulation environments (e.g., Cafe world) and plugins.
  • butler_bot_localization: AMCL localization and configuration.
  • butler_bot_mapping: SLAM Toolbox integration and saved map configurations.
  • butler_bot_mission: Custom Behavior Trees, Python mission architecture, and Web UI.
  • butler_bot_navigation: Nav2 integration, Costmaps, Planners, and Behavior Servers.

🛠️ Setup Instructions

1. Prerequisites

Ensure you have the following installed before proceeding:

  • Ubuntu 22.04
  • ROS 2 Humble (Desktop Install via sudo apt install ros-humble-desktop)
  • Nav2 and Slam Toolbox:
    sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup ros-humble-slam-toolbox
  • Gazebo / Ignition:
    sudo apt install ros-humble-ros-gz
  • Behavior Tree CPP & Nav2 BT:
    sudo apt install ros-humble-behaviortree-cpp-v3 ros-humble-nav2-behavior-tree

2. Workspace Setup

Create a ROS 2 workspace, clone the repository, and build the stack:

# Create Workspace
mkdir -p ~/butler_ws/src
cd ~/butler_ws/src

# Clone Repository
git clone https://github.com/m-MARI444/Bulter_bot.git .

# Install Dependencies using rosdep
cd ~/butler_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y

# Build the Workspace
colcon build --symlink-install

3. Source the Workspace

You must source the workspace overlay in every new terminal you use:

source ~/butler_ws/install/setup.bash

Tip: Add this to your ~/.bashrc to do it automatically:

echo "source ~/butler_ws/install/setup.bash" >> ~/.bashrc
source ~/.bashrc

🏃‍♂️ Running the Robot

1. Launch the Simulation Stack

This launch file will start Gazebo with the Cafe world, spawn the robot, start controllers, and initialize Nav2 with a pre-built static map (my_map_main.yaml).

ros2 launch butler_bot_bringup simulated_robot.launch.py

Wait for Gazebo, RViz, and Nav2 to fully load (Wait for the text "nav2_lifecycle_manager: Managed nodes are active").

2. Send the Bot on a Mission

Once the simulation is running, open a new terminal and launch the Behavior Tree Mission Manager:

source ~/butler_ws/install/setup.bash
ros2 launch butler_bot_mission butler_mission.launch.py

3. (Optional) Run the Web UI

The bot includes a web server to trigger the BT nodes from a browser:

# In a new terminal
cd ~/butler_ws/src/butler_bot_mission/www
python3 -m http.server 8000

Then open http://localhost:8000 in your web browser.


🗺️ Mapping a New Environment

If you want to use the bot in a custom environment, you must map it first using the integrated SLAM launch files.

  1. Launch Simulation with SLAM Enabled:

    ros2 launch butler_bot_bringup simulated_robot.launch.py use_slam:=true
  2. Drive the Robot: Focus the joystick or keyboard teleop terminal and drive the bot around the environment to populate the map.

  3. Save the Map: Once the map looks complete in RViz, open a new terminal and save it to the mapping package:

    ros2 run nav2_map_server map_saver_cli -f ~/butler_ws/src/butler_bot_mapping/maps/my_new_map
  4. Update Default Map: To use a new map, modify the map_name arguments inside butler_bot_localization/launch/global_localization.launch.py.

About

Butler Delivery Bot A ROS 2-based autonomous delivery robot stack. Leverages Nav2 for dynamic navigation and Behavior Trees (BT.CPP) for complex, fault-tolerant mission orchestration (e.g., kitchen pickup, table delivery, and return home sequences).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 70.9%
  • C++ 15.4%
  • HTML 8.9%
  • CMake 4.8%