ROS2-Based Low-Cost Mobile Robot for Educational Assistance with Reactive Navigation and Semantic-Cached Language Processing
ROS2-based mobile assistant robot for educational environments, integrating offline NLP in Spanish, YOLOv8n object detection, and reactive navigation on Raspberry Pi 4B.
π Paper: ROS2-Based Low-Cost Mobile Robot for Educational Assistance with Reactive Navigation and Semantic-Cached Language Processing β Submitted to Robotics (MDPI), 2026.
π₯ Authors: SebastiΓ‘n Alexis AucapiΓ±a, Nataly Cecilia BenalcΓ‘zar, JosΓ© Varela-AldΓ‘s and Ramiro Isa-Jara
ποΈ Institution: Universidad TecnolΓ³gica IndoamΓ©rica / ESPOCH β Ecuador
This project presents a low-cost educational mobile robot that combines autonomous reactive navigation with offline natural language processing in Spanish. The system runs entirely on a Raspberry Pi 4B using ROS2 Humble as middleware, making it accessible for resource-constrained educational environments such as public schools or universities in Latin America.
The robot operates in two modes:
- Education Mode β answers academic questions via voice interaction using a hybrid NLP architecture
- Navigation Mode β navigates autonomously using visual and ultrasonic perception
Total hardware cost: under $250 USD.
The system is organized into four functional layers:
βββββββββββββββββββββββββββββββββββββββββββ
β Application Layer β
β (Mode Orchestrator - ROS2 Node) β
βββββββββββββββββββββββββββββββββββββββββββ€
β Processing Layer β
β Vision | Speech/NLP | Navigation β
βββββββββββββββββββββββββββββββββββββββββββ€
β Abstraction Layer β
β (ROS2 Interface Nodes) β
βββββββββββββββββββββββββββββββββββββββββββ€
β Physical Layer β
β Raspberry Pi 4B | Sensors | Actuators β
βββββββββββββββββββββββββββββββββββββββββββ
| Node | Package | Function |
|---|---|---|
usb_camera_node |
robot_vision |
Real-time image acquisition |
object_detector_node |
robot_vision |
YOLOv8n-based object detection |
object_follower_node |
robot_vision |
Motion command generation |
ultrasonic_node |
robot_navigation |
Obstacle distance measurement |
imu_odometry_node |
robot_navigation |
Orientation estimation (MPU6050) |
motor_controller_node |
robot_navigation |
PWM motor control (TB6612FNG) |
voice_node |
robot_voice |
Speech recognition + TTS + NLP orchestration |
| Component | Specification |
|---|---|
| Computing unit | Raspberry Pi 4B β 4GB RAM |
| OS | Ubuntu 22.04 Server (ARM64) |
| Motors | N20 DC motors β differential drive |
| Motor driver | TB6612FNG |
| IMU | MPU6050 |
| Camera | USB Camera (Logitech C270) |
| Ultrasonic sensor | HC-SR04 |
| Audio amplifier | PAM8403 + 8Ξ© speaker |
| Battery | 7.4V LiPo 2200mAh |
| Voltage regulator | LM2596 DC-DC step-down |
| Component | Technology |
|---|---|
| Middleware | ROS2 Humble |
| Object detection | YOLOv8n (Ultralytics) |
| Speech recognition | VOSK (offline, Latin American Spanish) |
| TTS Online | Edge TTS |
| TTS Offline | Piper TTS |
| Local LLM | Qwen2.5-1.5B Q4_K_M (quantized) |
| Cloud LLM | Trinity via OpenRouter API |
| Semantic cache | all-MiniLM-L6-v2 (sentence-transformers) |
| Metric | Value |
|---|---|
| Speech recognition accuracy (quiet) | 98% |
| Speech recognition accuracy (noisy) | 98% |
| YOLOv8n F1-score | 0.975 |
| Door detection recall | 100% |
| Semantic cache accuracy | 100% |
| Semantic cache avg. latency | 3.8 s |
| Battery life β Education mode | 96 min (1.46 A) |
| Battery life β Navigation mode | 75.6 min (1.85 A) |
| Total hardware cost | < $250 USD |
The NLP module uses a three-tier hybrid architecture to balance accuracy, latency, and energy consumption:
User Query (voice)
β
βΌ
βββββββββββββββββββ HIT ββββββββββββββββββββ
β Semantic Cache βββββββββββββββΆβ Instant Responseβ
β (embeddings) β ββββββββββββββββββββ
ββββββββββ¬βββββββββ
β MISS
βΌ
βββββββββββββββββββ
β Local Model β Qwen2.5-1.5B Q4_K_M (offline)
β (Qwen) β
ββββββββββ¬βββββββββ
β Complex query / no connectivity
βΌ
βββββββββββββββββββ
β Cloud Model β Trinity via OpenRouter (online)
β (Trinity) β
βββββββββββββββββββ
The semantic cache resolved 33.3% of queries without invoking any LLM, significantly reducing energy consumption and latency.
- Raspberry Pi 4B with Ubuntu 22.04 Server (ARM64)
- ROS2 Humble installed
- Python 3.10+
git clone https://github.com/SesSic/MobileRobotAssistantNLPROS2.git
cd MobileRobotAssistantNLPROS2sudo apt install ros-humble-usb-cam ros-humble-cv-bridge ros-humble-sensor-msgspip install ultralytics vosk sentence-transformers openai --break-system-packages| Model | Destination | Source |
|---|---|---|
| VOSK Spanish small | model-vosk-es-small/ |
alphacephei.com/vosk/models β vosk-model-small-es-0.42 |
| YOLOv8n | workspace root | auto-downloaded on first run via Ultralytics |
| Door detector | src/robot_vision/models/ |
see Dataset section below |
| Piper TTS | /home/<user>/piper/ |
github.com/rhasspy/piper |
Note: After downloading Piper, update the
piper_pathparameter insrc/robot_educativo/launch/robot_completo_launch.pyto match your installation path.
Edit src/robot_educativo/launch/robot_completo_launch.py and set your actual ALSA device IDs:
'mic_device': 'hw:1,0', # your microphone
'speaker_device': 'plughw:2,0' # your speakerRun arecord -l and aplay -l on the Pi to find your device numbers.
Edit src/robot_voice/robot_voice/unified_processor.py and replace:
'openrouter_api_key': "YOUR_OPENROUTER_API_KEY_HERE"colcon build
source install/setup.bash
ros2 launch robot_educativo robot_completo_launch.pyMobileRobotAssistantNLPROS2/
βββ src/
β βββ robot_educativo/ # Main package: orchestrator + launch
β βββ robot_navigation/ # Motor, ultrasonic, IMU nodes
β βββ robot_vision/ # Camera, YOLO, follower nodes
β βββ robot_voice/ # Voice recognition, TTS, NLP nodes
βββ scripts/ # Utility and test scripts
βββ start_robot.sh # Convenience startup script
βββ test_openrouter.py # API connectivity test
βββ test_embeddings.py # Semantic cache test
βββ test_vosk_integrado.py # Speech recognition test
βββ .gitignore
build/,install/,log/, and model files are excluded from the repository. Runcolcon buildto generate them locally.
Door detection model trained using transfer learning on the Door Dataset from Roboflow Universe (accessed March 2026).
The experimental data supporting the results of this study are available upon reasonable request: saucapina2@indoamerica.edu.ec
If you use this work, please cite:
@article{aucapina2026mobile,
title={ROS2-Based Low-Cost Mobile Robot for Educational Assistance
with Reactive Navigation and Semantic-Cached Language Processing},
author={Aucapi{\~n}a, Sebasti{\'a}n Alexis and Benalc{\'a}zar,
Nataly Cecilia and Varela-Ald{\'a}s, Jos{\'e} and Isa-Jara, Ramiro},
journal={Robotics},
volume={15},
number={7},
pages={131},
year={2026},
publisher={MDPI},
doi={10.3390/robotics15070131}
}π Published paper: https://doi.org/10.3390/robotics15070131
This project is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, consistent with MDPI open access policy.
The authors acknowledge the support of the Facultad de IngenierΓas, MaestrΓa en RobΓ³tica y AutomatizaciΓ³n Industrial, Universidad TecnolΓ³gica IndoamΓ©rica, Ambato, Ecuador.