Metadata-Version: 2.4
Name: reli-robot
Version: 3.0.0
Summary: ReLI: cross-lingual language-to-action grounding for human-robot interaction
Author-email: Linus Nwankwo <linus.nwankwo@unileoben.ac.at>
License-Expression: MIT
Project-URL: Homepage, https://linusnep.github.io/ReLI/
Project-URL: Documentation, https://linusnep.github.io/ReLI/
Project-URL: Repository, https://github.com/LinusNEP/ReLI
Project-URL: Issues, https://github.com/LinusNEP/ReLI/issues
Project-URL: Changelog, https://github.com/LinusNEP/ReLI/blob/main/CHANGELOG.md
Project-URL: Paper, https://arxiv.org/abs/2505.01862
Keywords: robotics,human-robot interaction,multilingual,LLM,open-vocabulary perception,ROS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: pydantic>=2.6
Requires-Dist: pyyaml>=6.0
Requires-Dist: openai>=1.40
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.40; extra == "anthropic"
Provides-Extra: gemini
Requires-Dist: google-genai>=1.0; extra == "gemini"
Provides-Extra: vision
Requires-Dist: torch>=2.3; extra == "vision"
Requires-Dist: torchvision>=0.18; extra == "vision"
Requires-Dist: transformers>=5.0; extra == "vision"
Requires-Dist: pillow>=10; extra == "vision"
Requires-Dist: opencv-python-headless>=4.9; extra == "vision"
Provides-Extra: yolo
Requires-Dist: ultralytics>=8.3; extra == "yolo"
Requires-Dist: opencv-python-headless>=4.9; extra == "yolo"
Provides-Extra: realsense
Requires-Dist: pyrealsense2; extra == "realsense"
Provides-Extra: ros
Requires-Dist: roslibpy>=2.0; extra == "ros"
Provides-Extra: web
Requires-Dist: fastapi>=0.110; extra == "web"
Requires-Dist: uvicorn[standard]>=0.29; extra == "web"
Requires-Dist: python-multipart>=0.0.9; extra == "web"
Requires-Dist: opencv-python-headless>=4.9; extra == "web"
Provides-Extra: speech
Requires-Dist: faster-whisper>=1.0; extra == "speech"
Provides-Extra: embeddings
Requires-Dist: sentence-transformers>=3.0; extra == "embeddings"
Provides-Extra: all
Requires-Dist: reli-robot[anthropic,gemini,ros,speech,vision,web]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"
Requires-Dist: fastapi>=0.110; extra == "dev"
Requires-Dist: python-multipart>=0.0.9; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=8.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=3.0; extra == "docs"
Requires-Dist: myst-parser>=4.0; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
Dynamic: license-file

# ReLI: Cross-Lingual Language-to-Action Grounding for Human-Robot Interaction

[![PyPI](https://img.shields.io/pypi/v/reli-robot.svg)](https://pypi.org/project/reli-robot/)
[![Python](https://img.shields.io/pypi/pyversions/reli-robot.svg)](https://pypi.org/project/reli-robot/)
[![Documentation](https://img.shields.io/badge/docs-linusnep.github.io%2FReLI-2a7ae2.svg?logo=readthedocs&logoColor=white)](https://linusnep.github.io/ReLI/)
[![CI](https://github.com/LinusNEP/ReLI/actions/workflows/ci.yml/badge.svg)](https://github.com/LinusNEP/ReLI/actions/workflows/ci.yml)
[![arXiv](https://img.shields.io/badge/arXiv-2505.01862-b31b1b.svg)](https://arxiv.org/abs/2505.01862)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/LinusNEP/ReLI/blob/main/LICENSE)

![ReLI overview](https://raw.githubusercontent.com/LinusNEP/ReLI/main/docs/media/hero.webp)

**Documentation: [linusnep.github.io/ReLI](https://linusnep.github.io/ReLI/)**

We present ReLI, a framework that enables human to instruct a mobile robot **in their own language**, written or spoken, and turns the instructions into safe robot actions. A ReLI robot can answer questions, navigates to named destinations and coordinates, finds and approaches objects it sees, draws shapes, and reports what is around it, etc., all in the user's language.

This repository provides the guideline to re-implement the corresponding paper [*ReLI: Cross-Lingual Language-to-Action Grounding for Human-Robot Interaction*](https://arxiv.org/abs/2505.01862).

```text
"Fahre zwei Meter vor und dreh dich nach rechts."   ->  MOVE 2 m, TURN right 90°
"导航到厨房"                                          ->  GO_TO_DESTINATION kitchen
"Abeg waka go meet the chair."                       ->  GO_TO_OBJECT "chair" (found with the camera)
```

See [Architecture](https://linusnep.github.io/ReLI/architecture.html).

## Installation

ReLI requires Python ≥ 3.10; an NVIDIA GPU is recommended for perception.

**On the host.** We recommend a virtual environment:

```bash
python3 -m venv ~/reli_env && source ~/reli_env/bin/activate
pip install "reli-robot[web]"                 # core + browser interface
```

The package is published on PyPI as `reli-robot`; it is imported as `reli` and provides the `reli` command.

From source: `git clone https://github.com/LinusNEP/ReLI.git && pip install -e "ReLI[dev,web]"`.

**With Docker.** The image includes the browser interface, perception, rosbridge and speech:

```bash
docker build -t reli .
docker run --rm -it --gpus all -p 127.0.0.1:8080:8080 -e OPENAI_API_KEY \
  -v "$PWD":/work reli web -c sim --host 0.0.0.0      # http://localhost:8080
```

or `docker compose up` (CPU) / `docker compose --profile gpu up reli-gpu`. See [Getting Started](https://linusnep.github.io/ReLI/getting_started.html) for details.

| Extra        | Adds                                                                  |
|--------------|-----------------------------------------------------------------------|
| `web`        | Browser interface (FastAPI)                                           |
| `vision`     | SAM 3, Grounding DINO, OWLv2, CLIP/SigLIP 2, depth models (PyTorch)   |
| `yolo`       | YOLO-World via Ultralytics                                            |
| `ros`        | ROS 1 / ROS 2 robots through rosbridge (`roslibpy`)                   |
| `realsense`  | Intel RealSense cameras without ROS                                   |
| `speech`     | Local speech recognition (faster-whisper)                             |
| `anthropic`, `gemini` | Claude and Gemini providers                                  |
| `embeddings` | Embedding-based consent classifier                                    |

## Quick start (simulator, no robot needed)

```bash
export OPENAI_API_KEY=...               # or another provider, see below
reli chat -c sim -v        # terminal
reli web  -c sim           # browser: http://127.0.0.1:8080
```

Example instructions: *"go to the kitchen"*, *"draw a square with 1 m sides"*, *"was siehst du?"*, *"go to the chair"*, or *"où es-tu ?"*.

Without an API key, `reli simulate` runs a plan through validation, safety checks and the simulator:

```bash
reli simulate -c sim '[{"action": "POLYGON", "sides": 4, "side_length": 1.5}]'
```

**Language models.** Any OpenAI-compatible server can be used:

```yaml
llm:
  provider: openai_compatible           # Ollama, vLLM, llama.cpp, LM Studio, DeepSeek, Groq, ...
  base_url: http://localhost:11434/v1
  model: qwen3:14b
```

`provider: anthropic` (with `ANTHROPIC_API_KEY`) and `provider: gemini` (with `GEMINI_API_KEY`) are also supported. Capabilities differ between servers, so the client adapts at run time. Models that reject `temperature` simply run without it.

**Webcam perception.** `pip install "reli-robot[vision,web]"` and `reli web -c webcam_local` combine the simulated robot with a webcam, SAM 3, and monocular metric depth.

## Real robots (ROS 1 and ROS 2)

ReLI communicates with ROS Noetic and ROS 2 (Humble/Jazzy) robots through [rosbridge](https://github.com/RobotWebTools/rosbridge_suite), so it can run on a separate GPU machine without Python-version conflicts. For robots without rosbridge, we provide a container (`docker/rosbridge.Dockerfile`).

```bash
pip install -e ".[ros,vision,web]"
reli web -c romr_ros1      # ROMR / ROS 1 + move_base (paper setup)
reli web -c ros2_nav2      # ROS 2 + Nav2 template
reli ros -c romr_ros1      # headless: instructions on /reli/input
```

Topics, frames, the navigation action, and camera extrinsics are all configured in YAML.
See [Real-Robot Deployment](https://linusnep.github.io/ReLI/robots.html).

## Configuration

To print every option with its default:

```bash
reli config -c sim
```

Configurations can extend each other (`extends: sim`). Example prompts are in [`src/reli/resources/prompts.yaml`](https://github.com/LinusNEP/ReLI/blob/main/src/reli/resources/prompts.yaml) and can be overridden with `prompts_file:`.

## Evaluation

```bash
reli eval -c sim paper --per-language 20   # IPA, TSR and ART on the bundled test instructions
```

The test instructions, translations and annotation guidelines are in [`benchmark/`](https://github.com/LinusNEP/ReLI/tree/main/benchmark). See [Evaluation](https://linusnep.github.io/ReLI/evaluation.html).

## Development

```bash
pip install -e ".[dev]"
pytest            # no network, GPU or ROS needed
ruff check src tests && ruff format --check src tests
pip install -e ".[docs]" && sphinx-build docs docs/_build/html
```

Pushing a version tag (`v*`) publishes the package to PyPI.

## Citation

```bibtex
@article{nwankwo2025reli,
  title   = {ReLI: Cross-Lingual Language-to-Action Grounding for Human-Robot Interaction},
  author  = {Nwankwo, Linus and Ellensohn, Bjoern and {\"O}zdenizci, Ozan and Rueckert, Elmar},
  journal = {arXiv preprint arXiv:2505.01862},
  year    = {2025}
}
```

## License

[MIT](https://github.com/LinusNEP/ReLI/blob/main/LICENSE)
