ROS2 APP

Robot
operating system

The ROS2 package that runs on the robot. Navigation, person detection, autonomous behaviors, and workflow execution - all coordinated through a collection of nodes that communicate over ROS2 topics.

Architecture

The robot runs on a mini PC with Ubuntu 22.04 and ROS2 Humble. An Arduino Nano Every handles low-level motor control, flashed with micro-ROS firmware to communicate with the main system. Nodes communicate through topics and services, with the tablets connecting via ROSBridge WebSocket.

Navigation uses Nav2 with a custom lane-based planner. When navigating between waypoints, the robot follows predefined lanes rather than computing arbitrary paths. This ensures predictable behavior in complex spaces.

Nodes

nav_command_node

Handles all navigation commands including waypoint management, lane-based path planning, and Nav2 integration. Publishes navigation status and manages the robot's position on the map.

/millie/waypoint/goto/millie/nav/status/millie/waypoints

workflow_executor_node

Executes multi-step workflows combining navigation and actions. Receives workflow definitions and steps through each task in sequence - navigate to a location, then speak or perform an action.

/millie/workflow/execute/millie/workflow/status

boot_server

Flask HTTP server that controls ROS2 launch files. Starts and stops navigation, mapping, and manual modes. Also handles map saving/loading and system status queries.

HTTP API on port 5000

oak_person_detector_node

Runs person detection on the OAK-D Lite camera. Publishes bounding boxes, confidence scores, and depth information for detected people. Feeds data to follower and tracker nodes.

/oak/person_detections/oak/rgb/image_raw

person_follower_node

Follows a detected person while maintaining a safe distance. Uses depth data to calculate position and publishes velocity commands to stay behind the target.

/millie/follow/enable/cmd_vel

wander_node

Random exploration behavior. Picks directions, moves until obstacles are detected, then chooses new paths. Used for ambient presence and patrol mode.

/millie/wander/enable/cmd_vel

center_on_human_node

Rotates the robot to keep a detected person centered in the camera frame. Used for Track mode - maintains eye contact without moving closer.

/millie/track/enable/cmd_vel

mode_manager_node

Coordinates autonomous behaviors. Ensures only one mode (wander, follow, track, patrol) is active at a time. Handles mode transitions and conflicts.

/millie/mode/millie/mode/status

depth_obstacle_avoider_node

Monitors depth camera for obstacles and modifies velocity commands to avoid collisions. Works alongside other nodes to ensure safe movement.

/oak/stereo/depth/cmd_vel

motor_node

Low-level motor control. Translates velocity commands into wheel speeds for the differential drive base. Handles acceleration limits and emergency stops.

/cmd_vel/wheel_speeds

lidar_person_tracker_node

Tracks people using LiDAR data. Provides 360-degree awareness for following and tracking behaviors when targets move outside camera view.

/scan/millie/lidar_tracks

motion_detector_node

Detects motion in the camera feed. Used to trigger awareness behaviors and wake the robot from idle states.

/oak/rgb/image_raw/millie/motion_detected

Key Topics

TopicTypeDescription
/cmd_velgeometry_msgs/TwistVelocity commands for the robot base
/scansensor_msgs/LaserScan2D LiDAR scan data
/millie/nav/statusstd_msgs/StringNavigation status (idle, navigating, succeeded, failed)
/millie/waypointsstd_msgs/StringJSON list of saved waypoints
/millie/waypoint/gotostd_msgs/StringCommand to navigate to a waypoint by name
/millie/workflow/executestd_msgs/StringJSON workflow definition to execute
/millie/modestd_msgs/StringSet autonomous mode (wander, follow, track, patrol)
/oak/person_detectionsvision_msgs/Detection2DArrayDetected people with bounding boxes

Dependencies

Nav2

Navigation stack for path planning and obstacle avoidance

SLAM Toolbox

Simultaneous localization and mapping

ROSBridge

WebSocket bridge for tablet communication

DepthAI

OAK-D camera SDK for depth and detection

micro-ROS

Communication with the motor controller

GETTING STARTED

Installation

Prerequisites

  • Ubuntu 22.04
  • ROS2 Humble
  • Nav2 and SLAM Toolbox
  • DepthAI SDK for OAK-D camera

Build

# Clone into your workspace

cd ~/ros2_ws/src

git clone https://github.com/DreamCloudClub/millie_bot.git

# Install dependencies

cd ~/ros2_ws

rosdep install --from-paths src --ignore-src -r -y

# Build

colcon build --packages-select millie_bot

# Source the workspace

source install/setup.bash

Launch

# Start the boot server

ros2 run millie_bot boot_server

# Or launch navigation directly

ros2 launch millie_bot navigation.launch.py

Arduino Firmware

The Arduino Nano Every handles motor control via USB serial. Flash the firmware included in the package using Arduino CLI.

# Install Arduino CLI and megaAVR board

arduino-cli core install arduino:megaavr

# Compile and upload

cd ~/ros2_ws/src/millie_bot/firmware/arduino/millie_motor

arduino-cli compile --fqbn arduino:megaavr:nona4809 .

arduino-cli upload --fqbn arduino:megaavr:nona4809 -p /dev/ttyACM0 .

Full documentation and hardware setup guides available on GitHub.

View README →