1. Introduction
Mobile robots have been widely used in several domains, including education, personal assistance, and task automation. In education, they have been used to promote programming, language, and social skill learning, as well as to increase student motivation through interaction with robotic systems [
1,
2,
3,
4]. However, many of these solutions, such as NAO or Pepper robots, are associated with high costs that limit their adoption in resource-constrained settings, including public schools and rural areas in Latin America. This situation highlights a gap between available technological capabilities and their practical implementation in low-resource educational settings.
For Spanish speech recognition, local processing has gained relevance because of connectivity and privacy constraints. Tools such as VOSK can run locally on embedded devices such as the Raspberry Pi [
5] and support Latin American Spanish, making them suitable for predefined command recognition; this is a significant advantage in view of responsiveness benchmarks for TTS systems such as those reported by Dinh et al. [
6]. However, most systems are optimized for English and require an internet connection [
7,
8]. Furthermore, limitations in robust speech recognition have been reported due to linguistic variability and out-of-domain vocabulary [
9]. Although edge-based recognition and embedded assistants have been proposed, they tend to focus on other languages, transcription tasks, or architectures that depend on external devices [
2,
10,
11,
12].
Robotic navigation commonly relies on techniques such as SLAM, advanced planning, or large language models (LLMs) integrated with NAV2 for navigation [
13]. These approaches involve high computational requirements [
14,
15,
16]. Modern vision- and learning-based methods have demonstrated improvements in dynamic environments [
17,
18,
19]; however, their implementation on embedded platforms remains limited, particularly on resource-constrained devices such as the Raspberry Pi, where they may restrict interaction fluidity. In classrooms, where obstacles are dynamic, approaches based on static maps may be inefficient; therefore, this work adopts a more reactive approach based on sensors and machine learning for real-time obstacle avoidance [
20,
21]. Furthermore, incorporating language models enables command-based interaction and responses to open-ended questions. However, large models such as GPT-4 are difficult to deploy on embedded devices, while smaller models such as TinyLlama may lack the reasoning capabilities required for educational questions. Recent research has explored lightweight models and hybrid strategies for edge processing [
22,
23,
24], as well as dynamic selection mechanisms and semantic caching to optimize responses [
25,
26,
27].
Similarly, the integration of language models into robotic and human–robot interaction systems has been studied [
28,
29,
30], together with edge-optimization techniques based on caching [
31,
32]. However, these solutions primarily focus on cloud services or task-specific applications, without addressing academic queries in educational settings. Despite these significant advances, few studies attempt to integrate all these capabilities into a single, accessible, low-cost system that supports Latin American Spanish and offline operation. The closest available examples have addressed these capabilities only partially, either through educational robots without advanced NLP [
33], English-language conversational systems [
7], solutions for specific users [
5], or natural-language control limited to commands in multilingual settings [
34,
35,
36].
In this context, this paper presents a low-cost ROS2-based educational mobile robot running on a Raspberry Pi 4B that integrates Spanish voice interaction, reactive sensor-based navigation, vision-based object and door perception, and a hybrid language-processing architecture based on semantic caching. Unlike educational robotic platforms that mainly focus on learning activities or multimodal interaction without embedded academic question answering [
1,
2,
3,
33], speech assistant systems primarily oriented toward recognition, transcription, or user-specific assistance [
5,
10,
11,
12], and natural-language robot-control approaches mainly limited to navigation commands or multilingual low-resource scenarios [
34,
35,
36], the proposed system unifies academic question answering and navigation within a single low-cost edge platform designed for Latin American Spanish. Furthermore, in contrast to SLAM- or LLM-intensive navigation and interaction strategies [
13,
14,
15,
16,
17,
18,
19] and edge-optimization or caching frameworks evaluated mostly outside embodied educational robots [
22,
23,
24,
25,
26,
27,
31,
32], the proposed architecture uses task-dependent ROS2 node orchestration and a semantic cache to reduce latency and energy consumption while preserving offline operation for recurrent academic queries. The system is experimentally validated under real classroom conditions using component-level and integrated metrics, including speech recognition accuracy, object and door detection performance, NLP accuracy and latency, and battery life, providing an accessible robotic solution for resource-constrained educational environments.
The JUNO platform [
37] combines navigation and natural interaction, but it depends on cloud services and targets elderly care rather than educational content delivery. To the best of the authors’ knowledge, no existing work integrates offline Spanish-language academic question answering, reactive navigation, and semantic caching within a single low-cost embedded robotic platform.
Table 1 summarizes the differences between the proposed system and related works.
As a representative interaction, a student activates the robot by voice, asks “What is photosynthesis?”, and the robot responds verbally in approximately 3.8 s using its semantic cache, without requiring internet connectivity. In navigation mode, commands such as “robot forward” move the robot through the classroom, while the ultrasonic sensor handles obstacle avoidance.
The main contributions of this work can be summarized as follows:
- (I)
The design and implementation of a low-cost (under $250) ROS2-based educational mobile robot that integrates speech interaction, object and door perception, reactive navigation, and natural language processing within a single embedded platform.
- (II)
A hybrid, energy-aware natural language processing architecture that combines semantic caching, local inference, and optional cloud connectivity, enabling offline academic question answering in Latin American Spanish.
- (III)
A dual-mode (education/navigation) ROS2 node-orchestration strategy that selectively activates system components to reduce computational load and energy consumption.
- (IV)
A specialized door detection model trained through transfer learning to support safe reactive navigation in dynamic indoor environments.
- (V)
An experimental evaluation covering component-level metrics (speech recognition, object detection, NLP latency and accuracy, and sensor characterization), system-level performance (energy consumption and operating autonomy), and integrated navigation behavior, including command response, obstacle avoidance, and object following.
2. Materials and Methods
The proposed system follows a modular architecture based on ROS2 Humble (Hawksbill release) and is organized into four functional layers: (1) physical (embedded hardware), (2) abstraction (ROS2 interface nodes), (3) processing (vision, speech, and NLP), and (4) application (orchestration of operating modes). This structure decouples functional modules and optimizes resource use on the embedded platform.
2.1. Abstraction
The software architecture presented in
Figure 1 is organized into ROS2 nodes grouped by functionality: hardware interface, speech processing, NLP, vision, and orchestration.
The hardware interface manages sensor data acquisition and actuator control through dedicated nodes, while the vision module implements object detection using deep learning models such as YOLO and generates navigation commands based on visual and sensory information. Voice processing is performed by a node that integrates speech recognition, keyword activation, and speech synthesis, enabling natural interaction with the user in environments with or without connectivity.
This stage includes an orchestrator node that dynamically manages the operating modes. In education mode, voice processing is prioritized and input is provided by users through a microphone, whereas in navigation mode, the perception, locomotion, and voice processing modules are activated. Dynamic node management is achieved through process control, allowing ROS2 nodes to be activated or deactivated to reduce resource consumption on the embedded platform, a common strategy in resource-constrained robotic systems [
25,
26].
Figure 2 shows the complete ROS2 node-based structure. The system is organized into functional modules: the usb_camera_nodeacquires real-time visual data, which are processed by the object_detector_node using a YOLO-based model for object recognition. The object_follower_node integrates visual detections with distance data from the ultrasonic_node and orientation data from the imu_node to generate motion commands. These commands are sent to the motor_controller_node, which converts them into PWM signals to drive the motors.
Additionally, the voice_node acts as an interaction hub by integrating speech recognition (VOSK, vosk-model-small-es-0.42), command interpretation, and text-to-speech synthesis, thereby enabling natural communication with the user. This node also interfaces with the orchestrator to trigger mode transitions based on detected commands. Such modular ROS2 node-based architectures are widely used to decouple perception, control, and interaction processes in robotic systems, improving scalability and maintainability [
11,
12].
2.2. Hardware Interface
The robot chassis was fully designed using the open-source Blender v4.5.1 LTS software. An iterative prototyping approach was followed, in which preliminary versions were printed in PETG to verify component tolerances and fit until the final dimensions were achieved. All parts were assembled using standard screws, as shown in
Figure 3.
2.3. Embedded Hardware
The robot’s architecture is shown in
Figure 4. The system is based on a Raspberry Pi 4B (4 GB RAM) (Raspberry Pi Holdings, Cambridge, UK) running Ubuntu 22.04 Server, which was selected for its compatibility with ROS2 and its edge-computing capabilities.
Locomotion is implemented using a differential drive system with N20 DC motors, which provide a compact size and sufficient torque for indoor mobile robots. These motors are controlled by a TB6612FNG driver, which enables bidirectional control and PWM-based speed regulation. A ROS2 node translates high-level velocity commands into low-level PWM signals, facilitating modular control within the robot architecture [
11].
Table 2 shows the complete hardware bill of materials with individual component costs.
Differential-Drive Kinematics and Motor Control
The robot employs a differential drive locomotion scheme controlled by two independent N20 DC motors actuated through a TB6612FNG driver. Let
v and
denote the desired linear and angular velocities of the robot, respectively, as received through the cmd_vel ROS2 topic. The corresponding linear velocities of the left and right wheels,
and
, are obtained from the inverse kinematics of the differential drive model:
where
L is the distance between the wheel centers (track width). The corresponding wheel angular velocities are computed as:
where
r is the wheel radius. For the developed platform,
m (43 mm wheel diameter) and
m, based on physical measurements of the assembled chassis.
The N20 motors used in this work have a nominal speed of 100 RPM, corresponding to a theoretical maximum wheel angular velocity of approximately 10.47 rad/s. However, due to mechanical load, friction, and voltage drop under operating conditions, an empirically calibrated maximum angular velocity,
rad/s, was used to map the computed wheel angular velocities to PWM duty-cycle commands:
This PWM value, ranging from to , is sent to the TB6612FNG motor driver together with the corresponding direction signals, enabling proportional and bidirectional control of each wheel independently. This formulation allows the robot to execute both straight-line motion () and in-place or arc turns () by appropriately combining the linear and angular velocity commands received through the ROS2 cmd_vel interface.
For motion stabilization and orientation estimation, an MPU6050 IMU is integrated. This sensor provides accelerometer and gyroscope data, allowing basic trajectory correction and short-term pose estimation suitable for reactive navigation approaches in dynamic environments [
20].
The perception system combines multiple sensors to enable multimodal environmental understanding. A USB camera enables visual perception and supports object detection through deep learning models, as commonly implemented in robotic vision systems [
17]. Additionally, an HC-SR04 ultrasonic sensor is incorporated for short-range obstacle detection, providing consistent real-time distance measurements, particularly in indoor environments [
20]. The IMU also contributes to perception by complementing motion awareness.
For human–robot interaction, audio output is implemented using a PAM8403-based audio amplifier connected to an 8 Ω speaker. This module enables efficient low-power sound amplification, which is suitable for embedded voice assistant systems [
12].
The computational core of the system is a Raspberry Pi 4B, selected for its compatibility with ROS2 and its capability to perform edge-computing tasks such as vision processing and natural language interaction [
5]. Power is supplied by a 7.4 V LiPo battery, which is regulated to 5 V using a DC–DC step-down converter (LM2596). This regulation ensures the stable voltage levels required by the embedded system and its peripherals. Such configurations are widely used in mobile robotic platforms to ensure autonomy and reliability [
16].
2.4. Information Flow
The information flow depends on the operating mode. During navigation, voice commands are translated into movement actions by integrating visual and sensory perception.
Figure 5 illustrates the data flow for the movement-command execution process. The sequence begins when the user issues a voice command, which is captured by the microphone and processed by the voice_node. This node performs speech recognition using VOSK and extracts the intended navigation command.
Once the command is interpreted, it is sent as a cmd_vel message to the object_follower_node, which is responsible for generating motion actions. This node integrates perception data from multiple sources, including visual detections from the object_detector_node, distance measurements from the ultrasonic_node, and orientation data from the imu_node, allowing the system to adapt movement decisions to the environment.
The resulting motion commands are then transmitted to the motor_controller_node, which converts the high-level velocity commands into PWM signals to control the N20 motors.
Figure 6 and
Figure 7 illustrate the data flow for the academic question-answering process. The sequence begins when the user issues a spoken query, which is captured through the microphone and processed by the voice_node. This node performs speech recognition using VOSK, converts the audio input into text, and identifies the user’s intent.
The recognized query is then forwarded to the natural language processing module, where it is evaluated using a hybrid architecture that includes a semantic cache, a local model, and an optional cloud-based model. The system first attempts to resolve the query using the semantic cache to reduce latency and computational cost; if no match is found, the request is processed by either the local or the cloud-based model, depending on availability and complexity [
25,
26].
The semantic cache uses the sentence-transformers library with the all-MiniLM-L6-v2 model to compute query embeddings and retrieve semantically similar cached responses. Formally, a query
q is matched against cached entries
using cosine similarity:
where
denotes the sentence embedding produced by the all-MiniLM-L6-v2 model. A cache hit is triggered when
, where
. The local language model is Qwen2.5-1.5B (qwen2.5:1.5b-instruct-q4_0), deployed via Ollama with Q4_0 quantization to reduce the memory footprint on the Raspberry Pi 4B. The cloud-based model is the Trinity API (Trinity Large Preview), which is accessed only when internet connectivity is available.
Once a response is generated, it is sent back to the voice_node, which performs text-to-speech synthesis using either an offline or an online TTS system. The resulting audio signal is then transmitted to the speaker, enabling the robot to provide a verbal response to the user.
Throughout this process, the orchestrator node manages the activation of the required modules, prioritizing voice processing while disabling unnecessary components to optimize resource use. This structured data flow enables efficient human–robot interaction and supports responsive behavior under embedded-system constraints [
12].
Therefore, this system was designed with a focus on Spanish-language operation, offline functionality, and energy efficiency. Optimization strategies include reduced logging, automatic system startup, and basic security mechanisms to ensure stability and autonomy in educational settings.
2.5. Experimental Design
The integrated system was evaluated in a university classroom under typical lighting and noise conditions, considering the education and navigation operating modes. The sensors were calibrated using standard procedures.
The ultrasonic sensor was evaluated by comparing its measurements with known distances and calculating the absolute error, relative error, and standard deviation.
The IMU was validated under stationary and controlled-motion conditions to estimate drift and noise.
The camera was calibrated using objects with known dimensions to establish the relationship between pixels and real-world size.
The YOLOv8n object detection model was configured with a confidence threshold of 0.25 and a publish rate of 2.0 Hz on the Raspberry Pi 4B (Raspberry Pi Holdings, Cambridge, UK). It was evaluated using a set of images representative of the environment, focusing on performance metrics and inference latency on the Raspberry Pi. Additionally, a specialized door detection model was trained using transfer learning on a dataset obtained from [
37] and evaluated on a separate validation set of 62 images comprising a mixture of web-sourced and locally captured images, following a sourcing composition similar to that of the general object detection validation set.
The speech recognition system was evaluated under quiet and noisy conditions. Testing was conducted primarily with one speaker, with occasional additional trials involving two other speakers (male and female) to introduce some variability in voice characteristics. All speakers were positioned approximately 30 cm from the microphone. Test queries combined navigation commands and academic questions to reflect realistic usage scenarios. Noisy conditions were generated by playing pre-recorded videos of people speaking at high volume from a television located directly above the robot, simulating background classroom chatter, while a mobile phone placed next to the microphone introduced additional electronic interference; sound pressure level was not quantitatively measured.
Speech synthesis was analyzed in online and offline modes by measuring the response time from text generation to the start of audio playback. The natural language processing module was evaluated in three configurations: semantic cache, local model, and cloud model, comparing accuracy and latency for academic queries.
The metrics used for object detection and speech recognition included accuracy, latency, and error, depending on the component analyzed. Finally, power consumption was evaluated through a single continuous discharge test per operating mode using a 7.4 V LiPo battery with a nominal capacity of 2200 mAh. Average current was calculated based on the battery’s initial and final voltage variation under typical operating conditions for each mode.
4. Discussion
The results demonstrated the feasibility of integrating multiple capabilities—including voice interaction, reactive navigation, and natural language processing—into a single Raspberry Pi-based embedded device under real-world conditions, validating the accuracy, latency, and power consumption metrics established as objectives. Although current studies often focus on individual capabilities [
12,
20], the proposed approach demonstrates that a unified architecture can operate with limited computational resources, enabling implementation in educational environments, as has recently been explored in low-cost robotic platforms [
35].
The decision to omit SLAM-based navigation represents a trade-off between accuracy and computational efficiency. Although this limits global localization capabilities, the reactive navigation approach was more suitable for dynamic indoor environments [
14,
17], such as classrooms with frequently changing objects. Similarly, the use of a semantic cache [
26,
27] considerably reduces response latency for recurrent requests, although its effectiveness depends on how frequently those queries are repeated.
The low inference speed of 0.9 FPS observed for the YOLOv8n model represents a limitation for continuous dynamic obstacle tracking. However, the system compensates for this limitation by combining vision-based detection with the HC-SR04 ultrasonic sensor for immediate obstacle stopping, which operates independently of the camera pipeline. Camera-based detection primarily supports object recognition and navigation-target identification, while reactive obstacle avoidance is handled by the ultrasonic node, which is not subject to the same computational constraints.
Additionally, the 6.2° rotational error observed in the IMU may accumulate over extended navigation sequences, representing a known limitation for tasks that require precise heading control. This further motivates the future integration of visual odometry or a lightweight SLAM approach to correct drift over time.
The 75% success rate for voice command-based motion control reflects a timing sensitivity in the current sequential command processing pipeline: when a stop command is issued before the preceding movement command has completed processing, it may be ignored. This has implications for safe operation and should be addressed in future work through stop-command prioritization, an interrupt-based mechanism, or a dedicated command queue to ensure safety-critical stop signals are always processed regardless of system state.
Regarding natural language processing, large-scale LLMs remain impractical for embedded platforms [
22], while smaller models often lack sufficient reasoning capabilities [
23]. The proposed hybrid architecture offers a balanced solution that combines local inference with basic cloud processing to maintain functionality under varying connectivity conditions, a strategy similar to that proposed in recent work on resource optimization at the edge [
25]. Power consumption also plays a critical role in embedded robotic systems. The implementation of dual operating modes (education and navigation) proved effective in extending battery life by selectively activating system components according to task requirements, representing a practical optimization aligned with real-world usage scenarios and recent efforts to reduce energy consumption in autonomous navigation [
16].
It is important to note that the experimental evaluation presented in this work constitutes a technical validation of the integrated platform, focused on measuring the functional performance of individual components and their interaction under controlled classroom conditions. The objective of this phase was to demonstrate that the system is technically feasible and operationally promising as a prerequisite for educational deployment. Evaluating the robot’s effectiveness as a pedagogical tool—including user studies with students and teachers, measurement of learning outcomes, and assessment of engagement—represents a distinct and subsequent research phase that falls outside the scope of this technical validation study. Additional limitations include the use of relatively small datasets for computer-vision tasks, reliance on internet connectivity for complex queries [
5], increased latency in local language models [
7], and the absence of advanced navigation strategies such as SLAM [
14,
17], which limits the system to basic reactive behaviors.
5. Conclusions and Future Work
This paper presented the development of an ROS2-based educational mobile robot implemented on a Raspberry Pi 4B, integrating Spanish voice interaction (online and offline), reactive navigation, and a hybrid natural language processing architecture. The system demonstrates that Spanish voice interaction, reactive navigation, academic question answering, and resource-aware operation can be integrated into a single low-cost edge robotic platform for educational environments. Experimental results validate system performance through key metrics. The speech recognition module achieved 98% accuracy under both quiet and noisy conditions. The object detection system reached an F1-score of 0.975, while the specialized door detection model achieved 100% recall, prioritizing safe navigation. Additionally, the semantic cache resolved queries with an average latency of 3.8 s, considerably outperforming the local and cloud-based models. In terms of energy consumption, the system exhibited an average current of 1.46 A in education mode and 1.85 A in navigation mode. These results confirm the effectiveness of the proposed dual-mode strategy in optimizing energy use while maintaining system performance.
Future work will follow two complementary directions. The first direction addresses technical improvements: integrating more efficient local language models, expanding the vision and speech datasets, and incorporating lightweight navigation strategies such as visual odometry or a reduced-footprint SLAM approach to correct IMU drift over extended trajectories. The second direction addresses educational deployment: once the platform’s technical robustness is confirmed through integrated navigation trials, the system will be validated in real classroom settings through structured user studies with students and teachers, measuring interaction quality, academic support effectiveness, and engagement. This two-phase approach ensures that educational deployment is grounded in a technically reliable platform.
The novelty of the proposed system lies not in the individual component technologies, but in their integration into a unified, low-cost platform explicitly designed for Latin American Spanish educational environments. The combination of offline academic question answering through a curriculum-aligned semantic cache, reactive sensor-based navigation, dual-mode energy management, and classroom-validated experimental results constitutes a contribution not previously demonstrated in a single embedded robotic system of this cost and deployment context.