Introduction
General-purpose service robots in home environments face significant challenges in interpreting complex human instructions. While Large Language Models (LLMs) offer powerful natural language understanding, their application in robotics is often hindered by linguistic ambiguity and "hallucinations"—instances where the model ignores parts of a request or invents actions outside the robot's capabilities. This paper proposes a robust framework to bridge the gap between flexible LLM reasoning and the strict execution requirements of robotic hardware.
Methodology
The proposed system transforms natural language commands into executable sequences using a multi-step pipeline centered on structured prompting and error correction.
Constrained Prompt Scheme and Exceptional Handling
To mitigate mapping errors, the authors treat robot actions as Python functions. By "importing" a set of eight primitive actions—move_to, look_for_obj, look_for_person, follow, grasp, pass_to, speak, and answer—the LLM is encouraged to output structured, nested Python lists. This approach leverages the LLM's proficiency in code generation to enforce structural discipline.
A critical component of the framework is the exceptional handling module, which acts as a safety net. If the LLM generates an invalid format or an unsupported action (e.g., using find instead of look_for_obj), the system detects the error and automatically provides a corrective prompt. The model is given up to five retries to produce a valid plan, significantly increasing the reliability of the task planning process.
State Machine Generation
Once the LLM generates a valid list of actions, the system maps these primitives to a SMACH (State Machine) for execution. This ensures that the robot follows a logical sequence of states (e.g., moving to a room before looking for a person) and can handle basic success or failure transitions at each step.
System Integration
The planning module is integrated into a physical robotic system (AgileX TRACER MINI) equipped with a suite of perception tools. The system utilizes YOLOv7 for object detection, MediaPipe for gesture tracking, and Deepface for facial recognition. These tools allow the robot to ground the high-level plans in the physical environment, such as identifying a specific person like "Robin" or locating a "bedroom."
Evaluation and Results
The framework was evaluated using 100 commands from the RoboCup@Home generator and real-world testing in a simulated home environment.
- Success Rates: The system correctly decomposed 83% of commands into the proper order of functions, and 69% were successfully executed in full.
- Model Performance: Baidu ERNIE-Bot 4.0 emerged as the top performer, achieving 98% accuracy in navigation/following tasks and 93% in object manipulation tasks.
- Error Correction: The exceptional handling module successfully caught instances where the LLM tried to use non-existent functions, forcing it to adhere to the predefined primitives and preventing system crashes.
Conclusion and Future Work
This research demonstrates that framing robot task planning as a constrained code-generation problem, supported by reactive error handling, significantly improves the reliability of LLM-based control. However, a "visual grounding gap" remains, particularly for tasks requiring the robot to answer questions about its environment. Future work will focus on integrating Visual Language Models (VLMs) to allow the robot to reason about the environment in real-time, rather than relying solely on a pre-generated plan.
Summary updated