Abstract
Large Language Models (LLMs) have demonstrated significant potential in high-level robotic task planning. However, existing methods often rely on static planning, which fails in dynamic environments where objects move or actions fail. This paper presents InCoRo (In-Context Learning for Robotics), a framework that integrates LLMs into a real-time feedback loop. By combining GPT-3.5 with a sophisticated perception stack and a pre-execution filter, InCoRo enables robots to adapt to environmental changes and correct errors autonomously. Evaluated on industrial SCARA and DELTA robots, InCoRo achieves over 80% success in dynamic tasks where traditional static planners fail entirely.
Introduction
While Large Language Models (LLMs) are adept at decomposing complex human commands into sequential steps, their application in robotics has largely been limited to "static" planning. In these systems, the robot observes the environment once, generates a plan, and executes it blindly. This approach is brittle; if an object is moved mid-task or a gripper slips, the system lacks the necessary feedback to adjust. InCoRo addresses this gap by embedding the LLM within a continuous feedback loop, allowing the robot to "see" and "think" iteratively to handle dynamic obstacles and moving targets.
System Architecture
The InCoRo system is built upon three integrated pillars designed to facilitate real-time adaptation:
- The Pre-processor: This component uses an LLM to translate complex user prompts into a sequence of "atomic actions" (e.g., "find ball," "pick up ball") and a list of relevant objects.
- The Perception Stack: To maintain environmental awareness, the system utilizes a trio of vision models: Grounding DINO for object detection, FastSAM for precise segmentation, and TAPIR for tracking moving objects across frames.
- The LLM-based Control Loop: This core innovation utilizes GPT-3.5 as a real-time controller. It receives continuous state updates from the perception stack and outputs low-level commands. A Pre-execution Filter validates these commands against hardware and safety constraints. If a command is rejected, it is recycled into the LLM's prompt as a "negative example," enabling the model to learn and correct its logic via In-Context Learning (ICL) without requiring weight updates.
Experimental Evaluation
The authors evaluated InCoRo using 12 standardized tasks (7 static and 5 dynamic) performed on industrial SCARA and DELTA robotic platforms. Static tasks included block stacking and color sorting, while dynamic tasks involved following moving objects or interacting with a human hand. The system was compared against Code as Policies (CaP), a prominent baseline for LLM-based static planning.
Key Results and Insights
- Dynamic Superiority: The most significant finding was the failure of static planning in non-stationary environments. While the CaP baseline achieved some success in static tasks, it had a 0% success rate in dynamic settings. In contrast, InCoRo reached an 83.2% success rate on dynamic tasks using the SCARA robot.
- Static Performance: InCoRo also outperformed the baseline in static environments, achieving 92.6% success on SCARA (vs. 20% for CaP) and 78.3% on DELTA (vs. 16% for CaP).
- Ablation of Perception: Studies indicated that precise object segmentation (SAM) is more critical for manipulation than high-frequency tracking (TAPIR). Removing SAM caused performance to drop from 83.2% to 50.4%, whereas removing TAPIR had a significantly smaller impact.
- Autonomous Error Correction: Qualitatively, the feedback loop allowed the robot to autonomously "re-try" actions. If the perception unit noticed a failed grasp, the LLM generated a corrective trajectory rather than proceeding with a broken plan.
Limitations and Future Work
The current implementation relies on 2D vision, which can complicate depth estimation and slow down tasks like block stacking. Additionally, exploratory movements for objects outside the initial field of view remain relatively slow. Future research will focus on integrating 3D scene understanding to improve spatial accuracy and exploring multi-robot coordination within the same feedback-driven framework.
Summary updated