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.
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.
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
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-installYou must source the workspace overlay in every new terminal you use:
source ~/butler_ws/install/setup.bashTip: Add this to your ~/.bashrc to do it automatically:
echo "source ~/butler_ws/install/setup.bash" >> ~/.bashrc
source ~/.bashrcThis 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.pyWait for Gazebo, RViz, and Nav2 to fully load (Wait for the text "nav2_lifecycle_manager: Managed nodes are active").
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.pyThe 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 8000Then open http://localhost:8000 in your web browser.
If you want to use the bot in a custom environment, you must map it first using the integrated SLAM launch files.
-
Launch Simulation with SLAM Enabled:
ros2 launch butler_bot_bringup simulated_robot.launch.py use_slam:=true
-
Drive the Robot: Focus the joystick or keyboard teleop terminal and drive the bot around the environment to populate the map.
-
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 -
Update Default Map: To use a new map, modify the
map_namearguments insidebutler_bot_localization/launch/global_localization.launch.py.