Reshaping Robot Trajectories Using Natural Language Commands: A Study of Multi-Modal Data Alignment Using Transformers

Arthur Bucker, Luis Figueredo, Sami Haddadin, Ashish Kapoor, Shuang Ma, Rogerio Bonatti

TL;DR

This paper introduces a novel framework that allows humans to reshape robot trajectories using flexible, natural language commands (e.g., "stay a bit further away from the glasses"). By leveraging pre-trained large language models (BERT and CLIP) and a multi-modal Transformer architecture, the system aligns semantic intent with geometric data to generate safe, intuitive, and context-aware robot paths.

What Problem Does This Paper Address?

Traditional human-robot interaction (HRI) is often rigid. If a robot’s autonomous motion planner generates a path that is technically safe but makes a human uncomfortable—perhaps by passing too close to a fragile wine glass—correcting it usually requires complex re-programming, kinesthetic teaching (physically moving the robot), or restrictive command templates.

The challenge lies in the "semantic gap": how do we translate a vague, qualitative statement like "move a little closer to the cup" into precise, quantitative coordinate changes? Existing methods struggle with the diversity of human language and the need to map those words to specific objects and spatial coordinates in a dynamic environment.

Methods

The authors propose a multi-modal attention-based Transformer model designed for trajectory reshaping. The pipeline consists of three main components:

  1. Language Encoding: The system uses BERT to extract semantic features from the user's command. Simultaneously, it uses CLIP to compute similarity vectors between the user's text and the labels of objects in the environment, helping the robot identify which object the user is talking about.
  2. Geometry Encoding: The initial trajectory (a sequence of waypoints) and object positions are projected into a higher-dimensional space and processed through a Transformer Encoder. This allows the model to capture long-range dependencies across the entire path.
  3. Multi-Modal Transformer Decoder: This is the "brain" that fuses the language and geometry features. It treats trajectory generation as a sequence prediction problem—much like how GPT predicts the next word in a sentence—to output a modified sequence of waypoints that satisfies the user's request while staying as close to the original path as possible.

The model is trained using imitation learning with a Huber loss function to minimize the distance between predicted waypoints and ground-truth "corrected" trajectories.

Datasets

Because real-world paired data of "language + trajectory" is scarce, the authors generated a synthetic dataset of 10,000 examples:

  • Initial Trajectories: Generated using an A* planner in randomized environments.
  • Reshaped Trajectories: Created using the CHOMP motion planner by modifying cost function weights based on semantic rules (e.g., increasing the "obstacle cost" for a specific object when the command is "stay away").
  • Vocabulary: Includes directions (left, front, etc.), intensities (a bit, very), and 1,000 different object labels sampled from ImageNet.

Key Insights and Ideas

  • Leveraging "Foundational" Knowledge: By using frozen, pre-trained models like BERT and CLIP, the system inherits a vast understanding of synonyms and semantic relationships. This allows the robot to understand commands it wasn't explicitly trained on (e.g., understanding "dirigible" if it was only trained on "balloon").
  • Trajectory as a Sequence: Treating a robot's path as a sequence of tokens (similar to language) allows the model to use the powerful attention mechanisms of Transformers to understand how a command at the start of a path might affect a movement near the end.
  • Implicit Constraint Handling: The model doesn't just blindly follow the text; it learns to constrain changes that would cause unsafe behavior, maintaining the feasibility of the path while respecting the user's intent.

Key Results

  • Performance: The Transformer-based model significantly outperformed a standard Fully Connected Network (FCN) baseline, achieving a lower test loss (0.002 vs 0.0025) and showing much better generalization to complex paths.
  • User Preference: In real-world tests with a 7-DOF PANDA robot arm, users overwhelmingly preferred the Natural Language (NL) interface.
  • Speed: NL was the fastest method (81s average) compared to kinesthetic teaching (139s) or manual programming (284s).
  • Success Rate: NL achieved a 100% success rate in the user study, whereas kinesthetic teaching and drawing often resulted in kinematically infeasible paths that the robot couldn't execute.
  • Zero-Shot Generalization: The model successfully executed commands using novel vocabulary (e.g., "be next to the dirigible") that were never seen during the training phase.

Limitations and Future Work

While impressive, the current system relies on textual labels for objects provided by an external source. The authors acknowledge that a truly end-to-end system should incorporate raw visual data (images) directly into the CLIP encoder to remove the need for manual labeling.

Additionally, the current model handles relatively simple spatial commands. Future work aims to tackle causal relations—for example, understanding that "move closer to the cup to pour the wine" implies a sequence of dependent actions rather than just a spatial shift.

Summary updated

BibTeX
@inproceedings{bucker2022reshaping,
  author = {Arthur Bucker and Luis Figueredo and Sami Haddadin and Ashish Kapoor and Shuang Ma and Rogerio Bonatti},
  title = {{Reshaping Robot Trajectories Using Natural Language Commands: A Study of Multi-Modal Data Alignment Using Transformers}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=z-HPTYjBBT6},
}

Loading related content...

Figure