Skip to content

MAPIRlab/sancho_robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

249 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Sancho Robot

Sancho is a socially-aware mobile robot built on the AgileX Ranger Mini v3 platform. It autonomously navigates indoor environments, detects and recognizes people using computer vision and body-pose estimation, holds conversations powered by LLMs, and physically orients its animated head and face toward whoever is speaking β€” all orchestrated through a modular ROS 2 architecture.

Developed by the MAPIRlab research group at the University of MΓ‘laga.


Research Demonstration Videos

Hierarchical Decision-Making Architecture for Service Robots

https://youtu.be/1JcaW7hJzJc

Demonstration of a hierarchical Behavior Tree architecture for the Sancho service robot. The video showcases autonomous roaming, speech-based task assignment, mission execution, task interruption, and battery-aware priority management. The system is capable of dynamically switching between behaviors while preserving execution state and ensuring safe operation.


Multimodal Attention and Robust Interlocutor Tracking in Natural HRI

https://youtu.be/HzKdb3460BQ

Demonstration of a multimodal Human-Robot Interaction (HRI) architecture that combines audio and visual perception to identify, localize, and track human interlocutors. The system uses sound source localization, body tracking, face recognition, and an identity cache to maintain robust attention during natural interactions, even under temporary occlusions or face turns. The robot coordinates its mobile base and pan-tilt head to naturally orient itself toward the active speaker.


System Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              sancho_bringup                                 β”‚
β”‚                    (Primary Entry Point β€” Launch Hub)                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ sancho_descriptionβ”‚  β”‚  sancho_hardware  β”‚  β”‚   Processing Layer      β”‚   β”‚
β”‚  β”‚  (URDF / TF)     β”‚  β”‚  (HAL / Drivers)  β”‚  β”‚ (Scan Merger + Filter)  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                        β”‚                         β”‚
         β–Ό                        β–Ό                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ sancho_perceptionβ”‚   β”‚  sancho_vision    β”‚   β”‚    sancho_navigation         β”‚
β”‚ (MoveNet Body   │──▢│ (Face Detection/  β”‚   β”‚ (Nav2 + CBF Safety +         β”‚
β”‚  Pose Pipeline) β”‚   β”‚  Recognition/GUI) β”‚   β”‚  Roaming + Semantic Filter)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                     β”‚                         β”‚
         β–Ό                     β–Ό                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ sancho_control   β”‚  β”‚ sancho_audio   β”‚    β”‚      sancho_behavior             β”‚
β”‚ (Head Tracking   β”‚  β”‚ (Mic Capture / β”‚    β”‚ (Orchestrator State Machine +    β”‚
β”‚  P-Controller)   β”‚  β”‚  VAD / DOA /   β”‚    β”‚  Interaction Manager +           β”‚
β”‚                  β”‚  β”‚  Wake Word /   β”‚    β”‚  sancho_bt_plugins for Nav2)     β”‚
β”‚                  β”‚  β”‚  Assistant)    β”‚    β”‚                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
                            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           sancho_hri                                       β”‚
β”‚           (LLM / STT / TTS Provider Gateway + Conversational AI)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ sancho_web_bridge β”‚   β”‚ sancho_interfaces  β”‚   β”‚ sancho_lifecycle_utils  β”‚
β”‚ (WebSocket /     β”‚   β”‚ (Custom msgs/srvs/ β”‚   β”‚ (Lifecycle Node         β”‚
β”‚  REST API)       β”‚   β”‚  actions)          β”‚   β”‚  Auto-Configurator)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Repository Map

Package Description
sancho_bringup πŸš€ Primary entry point. Top-level launch files that bring up the robot description, hardware drivers, and processing layers.
sancho_description URDF model, 3D meshes, and TF tree broadcasting for the Ranger Mini v3 platform.
sancho_hardware Hardware Abstraction Layer β€” driver wrappers for LiDARs, cameras, base, head servos, and animated face.
sancho_interfaces All custom ROS 2 message (33), service (31), and action (1) definitions.
sancho_perception Human body pose estimation (MoveNet), 3D projection, social group detection via DBSCAN, and waypoint generation.
sancho_vision Face detection, recognition, body-face fusion tracking, spatial clustering, and HRI GUI.
sancho_audio Full audio pipeline β€” microphone capture, VAD, DOA estimation, wake word, and conversational assistant logic.
sancho_control Head tracking P-controller that converts face pixel positions into pan/tilt servo commands.
sancho_navigation Nav2 configuration, autonomous roaming, CBF safety filter, semantic scan splitting, maps and behavior trees.
sancho_behavior High-level behavioral orchestrator (Search β†’ Navigate β†’ Socialize state machine) and interaction manager.
sancho_bt_plugins Custom C++ BehaviorTree.CPP v3 plugins for Nav2 (e.g., IsLocalized condition).
sancho_hri Provider-agnostic LLM, STT, and TTS gateways plus the sancho_ai conversational brain with per-user memory.
sancho_web_bridge WebSocket-based ROS bridge, REST API, web assistant, session and database management.
sancho_lifecycle_utils Utility node for automated lifecycle configuration and activation of managed nodes.
cliff_detector Depth-image-based cliff and stair detection for navigation safety.

Third-party dependencies are vendored in ros2_ws/src/third_party_pkgs/ and include astra_camera, interbotix_ptu, laser_scan_merger, urg_node2, usb_cam, ranger_ros2, ugv_sdk, ByteTrack, image_pipeline, nav2_social_costmap_plugin, and people_msgs.


Hardware Stack

Component Model / Driver Purpose
Mobile Base AgileX Ranger Mini v3 (ranger_ros2 / ugv_sdk) 4WD skid-steer chassis, odometry, velocity control
Front LiDAR Hokuyo URG (urg_node2) Forward 2D obstacle scanning (/scan_1st)
Rear LiDAR Hokuyo URG (urg_node2) Rear 2D obstacle scanning (/scan_2nd)
RGB-D Camera Orbbec Astra (astra_camera) RGB + depth for perception, face detection, and cliff detection
Nose Camera USB Camera (usb_cam) High-resolution front-facing camera mounted on head
Pan/Tilt Head WidowX WXXMS Turret (interbotix_ptu) 2-DOF Dynamixel head for gaze control
Animated Face ESP32 + LCD/LED display (custom firmware) Expressive eye animations and lip-synced speaking
Microphone Array Orbbec stereo mic / XMOS XVF3800 DSP Audio capture, VAD, and Direction of Arrival
SBC Linux PC (Ubuntu 22.04) Main compute running ROS 2 Humble

Quick Start

See the full Workspace Setup Guide for prerequisites and build instructions.

# Launch the full physical robot
ros2 launch sancho_bringup sancho_full_bringup.launch.py

Project Structure

sancho_robot/
β”œβ”€β”€ README.md                    ← You are here
β”œβ”€β”€ firmware/                    ← ESP32 face firmware (Arduino)
β”œβ”€β”€ web_ui/                      ← Web frontend
β”œβ”€β”€ ros2_ws/
β”‚   β”œβ”€β”€ README.md                ← Workspace build guide
β”‚   └── src/
β”‚       β”œβ”€β”€ sancho_bringup/      ← πŸš€ Primary entry point
β”‚       β”œβ”€β”€ sancho_description/  ← URDF & TF
β”‚       β”œβ”€β”€ sancho_hardware/     ← Hardware drivers
β”‚       β”œβ”€β”€ sancho_interfaces/   ← Custom msg/srv/action
β”‚       β”œβ”€β”€ sancho_perception/   ← Body pose pipeline
β”‚       β”œβ”€β”€ sancho_vision/       ← Face detection & recognition
β”‚       β”œβ”€β”€ sancho_audio/        ← Audio & voice assistant
β”‚       β”œβ”€β”€ sancho_control/      ← Head tracking control
β”‚       β”œβ”€β”€ sancho_navigation/   ← Nav2 + autonomous navigation
β”‚       β”œβ”€β”€ sancho_behavior/     ← High-level behavior orchestration
β”‚       β”œβ”€β”€ sancho_bt_plugins/   ← Nav2 BT plugins (C++)
β”‚       β”œβ”€β”€ sancho_hri/          ← LLM / STT / TTS gateway
β”‚       β”œβ”€β”€ sancho_web_bridge/   ← Web bridge & REST API
β”‚       β”œβ”€β”€ sancho_lifecycle_utils/  ← Lifecycle management utility
β”‚       β”œβ”€β”€ cliff_detector/      ← Depth-based cliff detection
β”‚       └── third_party_pkgs/    ← Vendored external packages
└── .env                         ← API keys (not committed)

License

See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors