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            โ”‚
โ”‚ - Move(movement, speed)      โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค - 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 Only (App Development)

For controlling TARS from your computer (Mac/Windows/Linux):

pip install tars-robot

This installs only the lightweight SDK (~3 dependencies) needed to connect to the robot via gRPC.

Full Daemon (Raspberry Pi)

For running the robot daemon on the Pi:

pip install tars-robot[daemon]

This installs all dependencies including FastAPI, pygame, Adafruit libraries, etc.

๐Ÿ“– Full Installation Guide - Detailed instructions, usage examples, and 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 COPYRIGHT.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 DUAL-LICENSE.md for AtomikSpace's dual-license model.


๐Ÿงพ Attribution

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

๐Ÿ‘‰ ATTRIBUTION.md


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.4.tar.gz (27.6 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.4-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tars_robot-0.5.4.tar.gz
  • Upload date:
  • Size: 27.6 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.4.tar.gz
Algorithm Hash digest
SHA256 6ce145761206c0042120c4d9b12a40111cd936c048a63c9695b48e3da7debfa6
MD5 446086169eb94a6f5ced2a31ff4bcd0e
BLAKE2b-256 753da9ccf63cded5e42e52173546375f771e6ef6f48eb95639e91443fa65ac9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tars_robot-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 24.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dac8d41274b88e25207d68250548974e077c5db950e51caa7e0b5b9e0ceaa858
MD5 87c9162f4debccfe7ed5901a8c97fe66
BLAKE2b-256 6ea5bea80fdb43c432acb718b2cd541164731b2f292401acd39653053bb088c2

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