Metadata-Version: 2.4
Name: tars-robot
Version: 0.5.9
Summary: TARS robot control library with daemon, dashboard, and SDK
Author: TARS Team
License: CC-BY-NC-4.0
Project-URL: Homepage, https://github.com/latishab/tars
Project-URL: Repository, https://github.com/latishab/tars
Project-URL: Documentation, https://github.com/latishab/tars#readme
Project-URL: Issues, https://github.com/latishab/tars/issues
Keywords: robotics,grpc,tars,raspberry-pi,robot
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio>=1.60.0
Requires-Dist: protobuf>=4.25.0
Requires-Dist: loguru>=0.7.0
Provides-Extra: daemon
Requires-Dist: grpcio-tools>=1.60.0; extra == "daemon"
Requires-Dist: fastapi>=0.104.0; extra == "daemon"
Requires-Dist: uvicorn>=0.24.0; extra == "daemon"
Requires-Dist: aiortc>=1.6.0; extra == "daemon"
Requires-Dist: opencv-python>=4.8.0; extra == "daemon"
Requires-Dist: numpy>=1.24.0; extra == "daemon"
Requires-Dist: pygame>=2.5.0; extra == "daemon"
Requires-Dist: pyserial>=3.5; extra == "daemon"
Requires-Dist: adafruit-circuitpython-pca9685>=3.4.0; extra == "daemon"
Requires-Dist: adafruit-circuitpython-ina260>=1.3.0; extra == "daemon"
Requires-Dist: psutil>=5.9.0; extra == "daemon"
Requires-Dist: aiofiles>=23.0.0; extra == "daemon"
Dynamic: license-file

# TARS

> **Note:** This is a fork of [TARS-AI-Community/TARS-AI](https://github.com/TARS-AI-Community/TARS-AI) with a distributed architecture. The original runs everything on the Pi. This fork separates the hardware daemon from the AI pipeline, exposing gRPC and WebRTC APIs so anyone can build apps that control the robot.

Raspberry Pi 5 robot daemon. Handles servo control, WebRTC audio streaming, display, camera, and battery monitoring. Apps connect via gRPC and WebRTC.

## 🛠️ What You Need

See the [TARS-AI wiki](https://github.com/TARS-AI-Community/TARS-AI/wiki) for the full bill of materials and build instructions. Come back here if you want to run this distributed architecture instead of the original monolithic setup.


**Hardware:**
- Raspberry Pi 5 (or Pi 4 4GB+)
- PCA9685 servo driver + servos
- USB audio adapter
- Speaker (8Ω 5W)
- Pi Camera or USB webcam
- INA260 battery monitor (optional)
- 12V battery pack

**Software:**
- Python 3.9+

---

## 🚀 Quick Start

### 1. Install on Pi

```bash
pip install tars-robot[daemon]
tars-daemon
```

Dashboard: `http://tars.local:8000` — see [WiFi Setup](./docs/WIFI_SETUP.md) for Tailscale access

### 2. Install an App

Browse and install apps from the dashboard's Apps tab.

**Featured:**
- **[tars-conversation-app](https://huggingface.co/spaces/latishab/tars-conversation-app)** — Voice AI pipeline (LLM, STT, TTS). Talk to your robot. ([source](https://github.com/latishab/tars-conversation-app))
---

## 📦 Installation

### PyPI (Recommended)

```bash
pip install tars-robot[daemon]
tars-daemon
```

### Git Clone (Development)

```bash
git clone https://github.com/latishab/tars.git
cd tars && pip install -e .[daemon]
tars-daemon
```

### SDK Only (Remote Control)

```bash
pip install tars-robot
```

```python
from tars_sdk import TarsClient

client = TarsClient("tars.local:50051")
client.move("wave_right")
client.set_emotion("happy")
client.close()
```

---

## 🏗️ Architecture

```
App (any machine)                     tars-daemon (Raspberry Pi)
─────────────────────────────────     ─────────────────────────────
tars-conversation-app                   ├── gRPC Server (:50051)
  ├── LLM (Claude)                      ├── HTTP + Dashboard (:8000)
  ├── STT (Deepgram)                    ├── WebRTC Audio
  ├── TTS (Kokoro)                      ├── Servo Control (PCA9685)
  └── TarsClient SDK ─────────────────►├── Display (pygame)
                        gRPC :50051     ├── Camera
                        WebRTC :8000    └── Battery (INA260)
```

Apps connect via gRPC (:50051) and WebRTC (:8000). They can run on a separate computer or on the Pi itself.

---

## 📱 Apps

TARS supports installable apps. Browse and install from the dashboard's Apps tab.

**Featured:**
- **[tars-conversation-app](https://huggingface.co/spaces/latishab/tars-conversation-app)** — Voice AI pipeline (LLM, STT, TTS). Talk to your robot. ([source](https://github.com/latishab/tars-conversation-app))

*More apps coming soon.*

---

## 📚 Documentation

- [Installation](./docs/INSTALLATION.md)
- [API Reference](./docs/API.md)
- [WiFi Setup](./docs/WIFI_SETUP.md)
- [Servo Calibration](./docs/CALIBRATION.md)
- [Daemon](./docs/DAEMON.md)
- [Dashboard](./docs/DASHBOARD.md)
- [Architecture](./docs/ARCHITECTURE.md)

---

## ⚖️ License

See [LEGAL.md](./LEGAL.md).
