Metadata-Version: 2.4
Name: tcc-ironl
Version: 0.1.0
Summary: TCC-IRoNL toolkit: the ROS-free language layer of 'The Conversation is the Command' (HRI '24)
Author: Linus Nwankwo, Elmar Rueckert
License: CC-BY-4.0
Project-URL: Homepage, https://linusnep.github.io/TCC-IRoNL/
Project-URL: Documentation, https://linusnep.github.io/TCC-IRoNL/
Project-URL: Repository, https://github.com/LinusNEP/TCC-IRoNL
Project-URL: Issues, https://github.com/LinusNEP/TCC-IRoNL/issues
Project-URL: Paper, https://doi.org/10.1145/3610978.3640723
Project-URL: arXiv, https://arxiv.org/abs/2401.11838
Keywords: robotics,human-robot-interaction,llm,vlm,ros,natural-language
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=5.3
Requires-Dist: requests>=2.22
Requires-Dist: rapidfuzz>=2.0
Provides-Extra: openai
Requires-Dist: openai>=1.40; extra == "openai"
Provides-Extra: embeddings
Requires-Dist: sentence-transformers>=2.2; extra == "embeddings"
Provides-Extra: all
Requires-Dist: openai>=1.40; extra == "all"
Requires-Dist: sentence-transformers>=2.2; extra == "all"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2; extra == "docs"
Requires-Dist: myst-parser>=2; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Dynamic: license-file

<div align="center">

# TCC-IRoNL

**The Conversation is the Command: Interacting with Real-World Autonomous Robots Through Natural Language**

[![Documentation](https://img.shields.io/badge/Docs-linusnep.github.io%2FTCC--IRoNL-1f72b8.svg)](https://linusnep.github.io/TCC-IRoNL/)
[![PyPI](https://img.shields.io/pypi/v/tcc-ironl.svg)](https://pypi.org/project/tcc-ironl/)
[![Paper (HRI '24)](https://img.shields.io/badge/Paper-HRI%20'24-b31b1b.svg)](https://doi.org/10.1145/3610978.3640723)
[![arXiv](https://img.shields.io/badge/arXiv-2401.11838-b31b1b.svg)](https://arxiv.org/abs/2401.11838)
[![ROS Noetic](https://img.shields.io/badge/ROS-Noetic-brightgreen.svg)](http://wiki.ros.org/noetic)
[![Python 3.8+](https://img.shields.io/badge/Python-%E2%89%A53.8-blue.svg)](https://www.python.org/)
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)

📖 [Documentation](https://linusnep.github.io/TCC-IRoNL/) | 🌐 [Project Website](https://sites.google.com/view/theconversationisthecommandint/home) | ⚙️ [Install](https://linusnep.github.io/TCC-IRoNL/installation.html) | 🚀 [Get Started](https://linusnep.github.io/TCC-IRoNL/get_started.html) | 🧰 [Toolkit](https://linusnep.github.io/TCC-IRoNL/toolkit.html) | 🎬 [Demo Video](https://osf.io/cmbw6/files/wzyf6) | 📄 [Paper](https://doi.org/10.1145/3610978.3640723)

<a href="https://osf.io/cmbw6/files/wzyf6"><img src="https://raw.githubusercontent.com/LinusNEP/TCC-IRoNL/main/Figures/gifAnimation1.gif" width="400px" alt="Simulation demo: Unitree Go1 in Gazebo" /></a>
<a href="https://osf.io/cmbw6/files/wzyf6"><img src="https://raw.githubusercontent.com/LinusNEP/TCC-IRoNL/main/Figures/real_world_optimize.gif" width="400px" alt="Real-world demo: Unitree Go1 quadruped" /></a>

<sub>Click a GIF for the full demo video.</sub>

---

</div>

## Overview

TCC-IRoNL exploits pre-trained large language model (LLM) and multimodal vision-language model (VLM) to enable humans interact with autonomous robots through ordinary conversation. The LLM decodes a high-level instruction, such as *"go between the secretary's office and the kitchen twice"*, into precise robot-actionable commands or queries, and the VLM provides the robot a visual and semantic understanding of its task environment. Due to the stochastic nature of LLMs, a robot execution mechanism executes each command through the ROS navigation stack, which keeps the robot's behaviour predictable.

This repository contains:

- **`tcc-ironl`**, the ROS-free language layer as a pip package (`pip install tcc-ironl`): the prompt, the LLM providers (OpenAI, Claude, Gemini, DeepSeek, llama.cpp), the action parser and destination matching, plus a CLI to try commands without a robot;
- **`tcc_ros`**, the ROS Noetic nodes that run it on a robot, with the chat GUI and the SAM + CLIP perception node;
- simulation for the **Unitree Go1** quadruped and the **ROMR** wheeled robot, and a Docker setup that starts everything with one command.

## Try it without a robot

```bash
pip install "tcc-ironl[all]"
tcc-ironl parse "Move forward 1.5 meters at 0.2 m/s; Turn left 90 degrees; Navigate to the kitchen"
export OPENAI_API_KEY=sk-...       # or ANTHROPIC_API_KEY / GEMINI_API_KEY / DEEPSEEK_API_KEY
tcc-ironl chat "Go between the secretary's office and the kitchen twice"
```

`parse` works offline; `chat` sends your request to the LLM with the same prompt the robot uses and shows the parsed actions. See the [Toolkit](https://linusnep.github.io/TCC-IRoNL/toolkit.html) page for the Python API.

## Quick start: simulation with Docker

You need Linux, an NVIDIA GPU with CUDA 11.8+, Docker with Compose, and the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).

```bash
git clone https://github.com/LinusNEP/TCC-IRoNL.git && cd TCC-IRoNL
cp env.tcc-ironl-denv .env          # then set at least one API key in .env
mkdir -p models
xhost +local:docker                 # let the containers open Gazebo, RViz and the chat GUI
docker compose up --build
```

This starts the ROS core, the Gazebo world with the Go1, the navigation stack, the LLM/VLM backend and the chat GUI. Once the robot stands, type or say, for example:

> **"Move forward 1.5 meters at 0.2 m/s"**
> **"Go between the Secretary's office and the kitchen twice"**
> **"What can you see around you?"**

For a native ROS Noetic install, the ROMR robot and real-robot deployment, follow the [documentation](https://linusnep.github.io/TCC-IRoNL/):

| | |
|---|---|
| [Installation](https://linusnep.github.io/TCC-IRoNL/installation.html) | pip, Docker, or native ROS Noetic |
| [Get Started](https://linusnep.github.io/TCC-IRoNL/get_started.html) | Go1 and ROMR simulation, example commands |
| [Architecture](https://linusnep.github.io/TCC-IRoNL/architecture.html) | Nodes, topics and how a command flows through the system |
| [Configuration](https://linusnep.github.io/TCC-IRoNL/configuration.html) | LLM provider and model, camera topics, destinations, action vocabulary |
| [Real-Robot Deployment](https://linusnep.github.io/TCC-IRoNL/deployment.html) | Required topics, TF frames and steps for your own robot |
| [Troubleshooting](https://linusnep.github.io/TCC-IRoNL/troubleshooting.html) | Common errors and fixes |

## Updates since publication

| Component | Paper | Current |
|-----------|-------|---------|
| Language model | GPT-2 | **OpenAI, Claude, Gemini, DeepSeek, or a local model via llama.cpp** |
| Vision | YOLOv8 bounding boxes + CLIP | **Segment Anything (SAM) masks + CLIP**, with object tracking |
| Language layer | inside the ROS nodes | **`tcc-ironl` pip toolkit**, shared by the ROS nodes and the CLI |

## Citation

If you use this work in your research, please cite:

```bibtex
@inproceedings{nwankwo2024conversation,
  author    = {Nwankwo, Linus and Rueckert, Elmar},
  title     = {The Conversation is the Command: Interacting with Real-World Autonomous Robots Through Natural Language},
  booktitle = {Companion of the 2024 ACM/IEEE International Conference on Human-Robot Interaction},
  series    = {HRI '24},
  year      = {2024},
  pages     = {808--812},
  publisher = {Association for Computing Machinery},
  address   = {New York, NY, USA},
  location  = {Boulder, CO, USA},
  isbn      = {979-8-4007-0323-2},
  doi       = {10.1145/3610978.3640723},
  url       = {https://doi.org/10.1145/3610978.3640723}
}
```

## Contributing

Bug reports and pull requests are welcome; see [CONTRIBUTING.md](https://github.com/LinusNEP/TCC-IRoNL/blob/main/CONTRIBUTING.md).

## License

This work is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/) (see [LICENSE](https://github.com/LinusNEP/TCC-IRoNL/blob/main/LICENSE)). The vendored third-party packages keep their upstream licenses: `unitree_ros/` is BSD-3-Clause (Unitree Robotics) and `ultralytics_ros/` is AGPL-3.0 ([Alpaca-zip/ultralytics_ros](https://github.com/Alpaca-zip/ultralytics_ros)).

## Acknowledgements

Thanks to the following open-source projects:
- [unitree_ros](https://github.com/unitreerobotics/unitree_ros)
- [ROS Mobile Robot (ROMR)](https://github.com/LinusNEP/ROS-Mobile-Robot)
- [ultralytics_ros](https://github.com/Alpaca-zip/ultralytics_ros)
- [Segment Anything](https://github.com/facebookresearch/segment-anything)
- [CLIP](https://github.com/openai/CLIP)
