Source-linked AI summary

Language Models as Zero-Shot Trajectory Generators

Teyun Kwon, Norman Di Palo, Edward Johns

arXiv:2310.11604v2cs.ROcs.AIcs.CLcs.HCcs.LG

TL;DR

This paper asks whether an LLM can generate low-level robot trajectories without the auxiliary components often used for that control. It tests GPT-4 with a task-agnostic prompt on real-world manipulation tasks, finding proficiency on many tasks and reporting failure detection and replanning.

  • Problem

    It was not thoroughly examined whether LLMs could generate low-level robot trajectories without auxiliary control components, despite the assumption that limited physical-interaction data leaves them incapable.

    Source: §I · p. 1
  • Method

    GPT-4 uses one task-agnostic prompt and off-the-shelf object detection and segmentation to generate dense end-effector poses without motion primitives, trajectory optimisers, or in-context examples.

    Source: §I · pp. 1–2
  • Results

    GPT-4 with the designed prompt performed well on many of 30 diverse real-world manipulation tasks, and the paper reports that code-generated trajectories outperformed explicit numerical pose lists on intricate motions.

    Source: §V · p. 5, §VI · p. 8
  • Takeaways & Limitations

    The findings support the paper’s conclusion that LLMs possess low-level control understanding sufficient for a range of common tasks and can detect failures and re-plan trajectories.

    Source: §I · p. 2, §VI · p. 8

    The prompt struggles with tasks requiring high precision, complex trajectory shapes, or richer perception than bounding-box computation.

    Source: §VI · p. 8

Abstract

from arXiv · show

Large Language Models (LLMs) have recently shown promise as high-level planners for robots when given access to a selection of low-level skills. However, it is often assumed that LLMs do not possess sufficient knowledge to be used for the low-level trajectories themselves. In this work, we address this assumption thoroughly, and investigate if an LLM (GPT-4) can directly predict a dense sequence of end-effector poses for manipulation tasks, when given access to only object detection and segmentation vision models. We designed a single, task-agnostic prompt, without any in-context examples, motion primitives, or external trajectory optimisers. Then we studied how well it can perform across 30 real-world language-based tasks, such as "open the bottle cap" and "wipe the plate with the sponge", and we investigated which design choices in this prompt are the most important. Our conclusions raise the assumed limit of LLMs for robotics, and we reveal for the first time that LLMs do indeed possess an understanding of low-level robot control sufficient for a range of common tasks, and that they can additionally detect failures and then re-plan trajectories accordingly. Videos, prompts, and code are available at: https://www.robot-learning.uk/language-models-trajectory-generators.

I. INTRODUCTION

The paper tests whether GPT-4 can generate dense robot-manipulation trajectories without the auxiliary components commonly used for low-level control. It uses one task-agnostic prompt and also investigates prompt design and failure recovery.

I. INTRODUCTION

  • Prior low-level LLM control methods relied on skills, motion primitives, trajectory optimisers, or in-context examples.The paper frames its work against the assumption that LLMs lack low-level control ability because they have limited exposure to physical interaction data.Source: §I · p. 1, Figure 2 · p. 2
  • GPT-4 is tested with off-the-shelf object detection and segmentation, while all remaining reasoning is performed by the LLM using one task-agnostic prompt.The tasks include instructions such as opening a bottle cap and wiping a plate with a sponge.Source: §I · p. 1
  • The paper’s contributions include zero-shot generation of dense end-effector poses without pre-trained skills, motion primitives, trajectory optimisers, or in-context examples.It also studies prompt ablations and whether object-trajectory analysis can support failure detection and replanning.Source: §I · pp. 1–2

II. RELATED WORK

Prior LLM-based robotics approaches commonly use external components for low-level control, while this work investigates generating complex trajectories without task-specific guidance. Its related work also covers foundation models and methods for grounding language in visual scenes.

LLMs for Robotics

  • Code as Policies and ChatGPT for Robotics use predefined motion primitives, SayCan uses robotics-specific pre-trained skills, and VoxPoser and Language to Rewards use external trajectory optimisers.Several of these approaches also rely on in-context examples, which can make extrapolation beyond demonstrated tasks challenging.Source: §II · p. 2
  • Compared with Code as Policies, the paper targets more complex trajectories without predefined primitives, in-context examples, or task-specific guidance.It also investigates whether LLMs’ internal task knowledge supports trajectory generation and failure detection and recovery.Source: §II · p. 2

Foundation Models for Robotics

  • Other foundation-model work includes fine-tuned VLMs, language-token demonstrations for LLMs, model-to-model language exchange, and environment feedback for success detection.LLMs and VLMs have also been used for planning and success detection in long-horizon reinforcement-learning tasks.Source: §II · p. 2

Language and Visual Grounding

  • Language and visual grounding methods include CLIP features in NeRFs, object keypoints, demonstration retrieval, web-scale image diffusion, and CLIP similarity scores.These methods address visual grounding rather than the paper’s primary focus on low-level trajectory generation.Source: §II · p. 2

III. PROBLEM FORMULATION

The study evaluates whether GPT-4 can generate dense end-effector trajectories under zero-shot constraints, using a real-world benchmark of 30 everyday manipulation tasks. The setup uses vision models for object information and tracking, while the robot executes generated trajectories open loop.

Assumptions and Constraints

  • The study prohibits pre-existing motion primitives, policies, trajectory optimisers, in-context examples, and robotics-specific pre-training or fine-tuning.The LLM may query a pre-trained vision model, but must autonomously generate, parse, and interpret its inputs and outputs.Source: §III · pp. 2–3

Real-World Experimental Setup

  • On a Sawyer robot, LangSAM supplies queried-object 3-D bounding boxes, and GPT-4 predicts 4-D end-effector poses plus gripper commands for open-loop execution.XMem tracks object segmentations throughout each task for later success detection.Source: §III · p. 3

Task Selection

  • The benchmark recreates 30 everyday manipulation tasks selected from recent robotics papers, with human-evaluated success criteria.Each task-method combination is measured over five trials with randomized object positions and orientations, without further human feedback or intervention.Source: §III · p. 3

IV. PROMPT DEVELOPMENT

The final prompt combines task decomposition, code generation, object-part reasoning, and collision-avoidance guidance. Evaluations report notable performance across many tasks and examine how prompt components affect success.

Full Prompt

  • The final prompt asks the LLM to summarize and decompose its plan before generating Python code that outputs a dense end-effector pose sequence.It includes coordinate definitions, object-detection functions, step-by-step reasoning, code-generation guidance, and collision avoidance.Source: §IV · p. 3

Prompt Ablations

  • Prompting step-by-step planning produced the highest performance increase among the reported prompt-component changes.Without it, the LLM often omitted needed steps such as gripper opening or closing and aligning to an object’s graspable side.Source: §IV · p. 4, Figure 5 · p. 4
  • Collision-avoidance guidance prompts attention to object dimensions and additional waypoints, while removing the phrase “clear objects and the tabletop” lowered performance.The LLMs also performed well when the entire collision-avoidance prompt was removed.Source: §IV · p. 4, Figure 5 · p. 4
  • Asking the LLM to describe a trajectory’s shape before generating poses was beneficial for complex motions such as shaking.The paper also reports noticeable effects from removing code-documentation and reusable-function prompts, though the supplied passage does not specify a direction or magnitude.Source: §IV · p. 4

Full Prompt Evaluation

  • GPT-4 with the full prompt showed proficiency on the majority of 30 tasks, predicting dense end-effector poses without external motion primitives, policies, or trajectory optimisers.The tasks were drawn from prior work in which solving them required numerous human demonstrations.Source: Figure 6 · p. 5, §IV · p. 5

Prompt Ablations

  • Describing object parts in natural language, such as a bowl’s rim or a pan’s handle, resulted in more tasks being executed successfully.The prompt uses this to help the LLM identify a suitable part to interact with.Source: Figure 5 · p. 4, §IV · p. 5

V. FURTHER INVESTIGATIONS

The further investigations compare trajectory and gripper output choices, model executability, and failure detection with re-planning. They also examine failure sources and compare the zero-shot prompt with Code as Policies.

  • For intricate paths, code output achieved 60% success versus 10% for numerical poses, with code better suited to generating complex paths.The comparison includes drawing a circle or a five-pointed star.Source: §V · pp. 5–6
  • Code output produced 100% executable trajectories, while some numerical outputs remained unparsable after three self-corrections.Source: §V · p. 6
  • Explicit open_gripper and close_gripper functions performed better than a binary gripper variable, which could leave the gripper hard-coded open.Separate functions decouple opening and closing actions during trajectory generation.Source: §V · p. 6
  • GPT-4 and Claude 3 (Opus) generated executable code 100% of the time; Gemini 1.0 Pro, Claude 2, and Llama 2 (70B Chat) did so 88.0%, 68.0%, and 36.0% of the time.Executability does not establish that the code successfully completed the task.Source: §V · p. 6
  • Failure detection and re-planning produced a small performance improvement; for bowl grasping, two re-plans raised task success from 0% to 20%.The LLM shifted from attempting a centroid grasp to grasping the rim.Source: §V · pp. 6–7, Figure 10 · p. 6
  • Gripper pose prediction accounted for 48.3% of failure cases, versus 25.9% for task planning; object detection errors often involved segmenting parts such as a bowl rim or toaster slot.Source: §V · p. 7
  • The study also compares the zero-shot prompt with the original Code as Policies prompt, which uses 77 in-context examples, across 30 tasks.The supplied passage describes the comparison setup but does not report its outcome.Source: §V · pp. 5, 7

SOURCES OF ERROR

The section identifies execution failure categories and compares the zero-shot prompt with Code as Policies on the full task set and on unseen tasks.

  • Failure categories include gripper pose prediction, task planning, trajectory-generation function definition, object detection, and camera calibration errors.Source: SOURCES OF ERROR · p. 7, Figure 11 · p. 7
  • On the 30-task comparison, Code as Policies averaged 22.0% success versus 57.3% for the zero-shot prompt.Code as Policies performed near-perfectly on familiar pick-and-place tasks but did not generalize to more complex tasks.Source: SOURCES OF ERROR · p. 7, Figure 12 · p. 7
  • On 10 unseen tasks, Code as Policies reached at most 34.0% with 20 added examples, below the zero-shot prompt's 46.0%.Adding examples improved Code as Policies' generalization, but did not match the zero-shot prompt.Source: SOURCES OF ERROR · p. 7, Figure 12 · p. 7

VI. CONCLUSIONS

The paper concludes that GPT-4 with a single task-agnostic prompt can generate end-effector pose sequences for many of 30 diverse real-world tasks, using only off-the-shelf detection and segmentation models. Its pipeline iterates between LLM outputs, robot actions, and task-success checks, re-prompting after failures.

VI. CONCLUSIONS

  • GPT-4 with the designed prompt performed well on many of 30 diverse real-world manipulation tasks under the stated zero-shot constraints.The setup excludes in-context examples and auxiliary components beyond off-the-shelf object detection and segmentation models.Source: §VI · p. 8
  • High-precision tasks, complex trajectory shapes, and tasks needing richer perception than bounding boxes remain challenging for current LLMs and the prompt.Source: §VI · p. 8

PIPELINE ALGORITHM

  • The pipeline combines the task prompt and instruction, then uses LLM output to query objects, execute pose trajectories, or check task completion.When completion is false, it resets the environment and re-prompts with an LLM summary of object poses.Source: PIPELINE ALGORITHM · p. 9

A. Ablation Studies on the Main Prompt & Language Model Comparisons

The listed commands cover tabletop object picking and placement, bottle actions, and moving a pan.

B. Ablation Studies on the Action Output •

The action-output ablation includes varied language-based manipulation tasks, from selecting and moving objects to drawing shapes with different gripper conditions.

B. Ablation Studies on the Action Output •

C. Code as Policies Comparison

The Code as Policies comparison covers object manipulation, contact-based actions, and household interactions, including tasks with spatial or motion constraints.

C. Code as Policies Comparison

TASK SUCCESS CRITERIA

The task-success criteria define observable completion conditions for object selection and placement, sustained-contact actions, and interactions with household objects.

TASK SUCCESS CRITERIA

  • Several picking tasks require lifting a specified object at least 10 cm, including the left chip bag, rightmost can, middle fruit, and chip bag right of a can.Source: TASK SUCCESS CRITERIA · pp. 9–10
  • Placement criteria include moving the farthest object within 5 cm of another, putting an apple inside a bowl, removing it from the bowl, dropping a ball into a cup, and moving fruit near a bottle or pear.Source: TASK SUCCESS CRITERIA · pp. 9–10
  • Contact and motion criteria cover pushing a can at least 10 cm, sponge contact, wiping while maintaining contact, shaking at least twice, stirring, and drawing a five-pointed star.Source: TASK SUCCESS CRITERIA · pp. 9–10
  • Other criteria specify rotating a bottle vertically, making a cap liftable, inserting bread into a toaster slot, knocking over a bottle, and pushing a bottle within 5 cm of an orange.Source: TASK SUCCESS CRITERIA · pp. 9–10
  • Additional tasks require moving a pan left, wiping a table without touching a plate, tracing a 10 cm circle, unplugging a charger, removing tissue, and rotating a dimmer anticlockwise.Source: TASK SUCCESS CRITERIA · p. 10
  • The towel-hanging criterion requires stable placement on the rack without touching the table.Source: TASK SUCCESS CRITERIA · p. 10
Loading 2310.11604v2…