Skip to main content

TARS robot control library with daemon, dashboard, and SDK

Project description

TARS

Note to Visitors

This repository is a personal fork for experimenting with a new distributed architecture. If you're looking for the main TARS-AI project, please visit:

https://github.com/TARS-AI-Community/TARS-AI

This fork splits TARS into a dual-machine setup:

  • Host Computer (macOS/Windows/Linux): Handles all AI processing (STT, TTS, LLM, Vision)
  • Raspberry Pi 5: Handles all hardware I/O (servos, camera, audio)

Architecture Overview

New Architecture: RPi is self-contained and runs a WebRTC server + gRPC server. The host computer connects to it as a client.

RPi 5 (tars) - Standalone Robot            Host Computer (tars-conversation-app) - AI Brain
┌──────────────────────────────┐        ┌─────────────────────────────┐
│ WEBRTC + gRPC SERVERS        │        │ WEBRTC CLIENT + AI          │
│                              │        │                             │
│ tars_daemon.py               │        │ tars_bot.py                 │
│                              │        │                             │
│ On boot:                     │        │ Connects to RPi:            │
│ - Starts WebRTC server       │ WebRTC │ - aiortc client             │
│ - Starts gRPC server         │◄───────┤ - POST /api/offer           │
│ - POST /api/offer endpoint   │  P2P   │                             │
│                              │        │ Audio Pipeline:             │
│ Audio Routing:               │        │ ┌─────────────────────┐     │
│ - Mic → WebRTC track ────────┼────────┼►│ VAD → STT → LLM     │     │
│ - WebRTC track → Speaker ◄───┼────────┼─┤ → TTS → Audio Out   │     │
│                              │        │ └─────────────────────┘     │
│ DataChannel State Sync:      │        │                             │
│ - Receives eye states        │        │ Services:                   │
│ - Sends battery status       │        │ - Deepgram STT              │
│                              │        │ - GPT LLM + Tools           │
│ gRPC API (port 50051):       │        │ - ElevenLabs TTS            │
│ - ExecuteMovement(movement)      │◄───────┤ - Vision (tool calls)       │
│ - CaptureCamera(w, h, q)     │  gRPC  │                             │
│ - SetEmotion(emotion)        │        │ Tools call RPi via gRPC     │
│ - SetEyeState(state)         │        │                             │
│ - GetStatus()                │        │                             │
└──────────────────────────────┘        └─────────────────────────────┘
          │
          │ I2C + USB + CSI
          ▼
┌──────────────────┐
│ Hardware         │
│ - Servos         │
│ - USB Soundcard  │
│ - Pi Camera      │
│ - Display        │
│ - Battery        │
└──────────────────┘

Key Principle: The robot is self-contained. It boots up and waits for an AI brain to connect, not the other way around.


Installation

SDK (Mac / Windows / Linux)

For controlling TARS from your computer:

pip install tars-robot

Installs the gRPC client SDK only (~3 deps). Connect to a running Pi daemon and control hardware, run LLM tools, stream camera.

Daemon on Raspberry Pi

Two options — choose based on your use case:

Option A: PyPI (recommended for most users)

pip install tars-robot[daemon]
./start.sh

Installs all daemon dependencies (FastAPI, WebRTC, pygame, Adafruit libs). Includes tars-daemon and tars-servo-tester CLI commands.

Option B: Git clone (for development)

git clone https://github.com/latishab/tars.git
cd tars
python -m venv venv && source venv/bin/activate
pip install -e .[daemon]
./start.sh

Use this if you want to modify the daemon, contribute code, or run dev tools directly from source (src/app-servotester.py, src/app-cms.py).

PyPI Git clone
Install time Fast Moderate
Dashboard updates One-click from UI git pull
Modify daemon code No Yes
Servo tester / dev tools tars-servo-tester CLI CLI + direct source access

Full Installation Guide — detailed setup, systemd service, troubleshooting


What This Repo Contains

  • gRPC-based control system for Raspberry Pi 5 (low-latency hardware control)
  • WebRTC server for bidirectional audio streaming
  • 19 pre-programmed movements for servo control
  • Camera capture via gRPC (Pi Camera or USB webcam)
  • Real-time state synchronization via WebRTC DataChannel

Quick Start

Web Dashboard

First Boot WiFi Setup:

On first boot, TARS starts a WiFi hotspot:

SSID: TARS-Setup
Password: tars1234
Setup URL: http://tars.local:8000/setup (or http://10.42.0.1:8000/setup)

After WiFi is configured, access the dashboard at:

# Local network (home WiFi)
http://tars.local:8000

# Tailscale (dorm/corporate networks)
http://tars:8000

WiFi Setup Guide - Complete WiFi configuration instructions

Dashboard Features:

  • Monitor robot status (battery, CPU, network)
  • Control movements via joystick
  • Install and manage apps from the App Store
  • Configure WiFi and system settings

Tabs:

  • Status: System metrics, battery, connections
  • Control: Movement controls with joystick interface
  • Apps: Official and community apps marketplace
  • Settings: WiFi management, enterprise WiFi support, updates

Command Line

Start the RPi daemon (waits for AI brain to connect):

# Start WebRTC + gRPC servers (default)
python tars_daemon.py

# Or using start script
./start.sh

# WebRTC only (no gRPC)
python tars_daemon.py --no-grpc

# Specify custom gRPC port
python tars_daemon.py --grpc-port 50052

The RPi will (unified daemon on port 8000):

  1. Start unified HTTP server on port 8000 (WebRTC + REST API + Dashboard)
  2. Start the gRPC server on port 50051 (default)
  3. Wait for host computer to connect via POST /api/offer
  4. Once connected, audio flows bidirectionally and gRPC handles hardware control

Documentation

User Guides:

API Reference:

Architecture & Design:


Contributing


License & Attribution

This project is licensed under CC-BY-NC 4.0 for non-commercial use.

Attribution Chain

Based on the mechanical puppet designs by Christopher Nolan, Nathan Crowley, and the production team who originally brought TARS to life—miniaturized CAD by Charlie Diaz, with additional modifications by the TARS-AI Community, AtomikSpace, and Latisha B.

Contributors:

  • Christopher Nolan / Production Team - Original TARS character from Interstellar
  • Charlie Diaz - Original miniaturized CAD files and code (Hackster.io)
  • TARS-AI Community - Community project (repo)
  • Charles-Olivier Dion (AtomikSpace) - V2 hardware, modified CAD, hardware modules
  • Latisha B - Daemon architecture, display system, conversation pipeline

See LEGAL.md for detailed ownership and licensing information.

Commercial Use

Commercial use is not permitted under CC-BY-NC 4.0 without explicit written permission from all applicable copyright holders.

Commercial use includes:

  • Selling 3D printed parts, kits, or complete robots
  • Selling or distributing CAD files for money
  • Offering paid assembly, customization, or installation services
  • Monetized content that distributes project files or derivatives
  • Using this project in paid products, commercial research, or corporate projects

For commercial use, you must obtain separate licenses from:

  • AtomikSpace (hardware modules, CAD modifications): atomikspace.labs@gmail.com
  • Latisha B (daemon, dashboard, SDK, display): Contact via GitHub
  • Upstream contributors (Charlie Diaz, TARS-AI Community): As applicable

See LEGAL.md for AtomikSpace's dual-license model.


🧾 Attribution

Please follow the attribution guidelines when sharing or publishing derivative work:

See LEGAL.md for attribution requirements.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tars_robot-0.5.6.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tars_robot-0.5.6-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file tars_robot-0.5.6.tar.gz.

File metadata

  • Download URL: tars_robot-0.5.6.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tars_robot-0.5.6.tar.gz
Algorithm Hash digest
SHA256 7b8aabce87ed4dcbc89118ff1b0cdc5195dced5ee0d2e4940169ee0cf2a9b61e
MD5 7c1f1f0c6d479b60ef8a5587f6eab3c6
BLAKE2b-256 6427e3bfa89471c97aac56b4109db9a69730534946bbb5ced4e3a495610285e1

See more details on using hashes here.

File details

Details for the file tars_robot-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: tars_robot-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tars_robot-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7725a63654279bf70a11ddbf8239c386acf1bab579cc584089a2382ad1310331
MD5 3342a29d421ecfe039a0076d54b5bde3
BLAKE2b-256 923915a6e8bb52d38784be72073ae94fe30a91a11a47d9d28494d0e97801cde4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page