Skip to main content

TuTr Hyperloop System Overview

📌 What is this for? (Quick Summary)​

In Simple Words:
We built an autonomous hyperloop cargo pod to transport shipping containers along a 600-meter track at speeds up to 60 km/h.

This documentation explains how the whole system works:

  1. On the Pod: Sensors measure battery voltage, motor temperatures, and speed, and dual cameras record live video.
  2. On the Raspberry Pi: A small computer on the pod reads these sensors and sends the numbers to the cloud every second.
  3. In the Cloud (AWS): Cloud servers store the sensor history and let operators securely send commands (like Enable Battery, Launch, or Emergency Stop).
  4. On Your Laptop Screen: Web dashboards (both a simple 2D view and an interactive 3D simulation) let operators monitor the pod and watch live video in real time.

1. Executive Summary​

This handbook is designed to help any incoming software or systems engineer understand the entire TuTr Hyperloop codebase quickly.

Whether you need to fix a camera bug, update a safety limit, or add a new gauge to the web dashboard, this guide gives you the full picture without unnecessary buzzwords.


2. Where Does the Code Live? (Repository Map)​

Everything in our workspace is organized into three clean folders:

Folder PathWhat It Does & Technologies Used
Client Dashboard/ThreeJsForDemoPurpose3D Simulation Dashboard: An interactive 3D view of the 600m track where the pod glides smoothly based on real sensor numbers. Built with React, Three.js, and WebRTC live camera video.
Client Dashboard/Dashboard2D Operations Dashboard: The main control panel deployed at https://dashboard.tutr.tech. Has live dials, audio alerts that speak warnings out loud, safety buttons, and 33 automated tests.
Edge Device/RPi-PackageEdge Device Software: The code that runs on the Raspberry Pi inside the pod. Written in Go (for high speed) and Python (for camera streaming and simulation). Includes 23 automated tests.
TuTrDocs-mainThis Documentation Site: Built with Docusaurus and protected by our engineering login (tutr / Tutr@tech1).

3. The 4 Main Parts of the System​

3.1 The Raspberry Pi on the Pod (RPi-Package)​

  • go_server: A fast Go program listening on port 20006. It receives binary sensor packets from the pod's CAN bus, decodes them, and uploads them to the cloud.
  • emulator: When testing on your laptop or in the lab without the real hyperloop track, this Python script replays a real 126-second, 600-meter test run at speeds up to 60 km/h.
  • stream_service: Takes the camera video, optimizes it so it doesn't freeze, and sends it to our cloud video server. If a camera is unplugged, it automatically shows a colorful test pattern so you know the stream is still alive.

3.2 The Cloud Backend (AWS)​

  • API Gateway (npig3gpgck) & Lambda: A single URL (POST https://npig3gpgck.execute-api.ap-south-1.amazonaws.com/api) handles all requests from the web dashboards.
  • Cognito Login: Secure user accounts with 3 permission levels:
    • Admin & Engineer: Allowed to turn on the high-voltage battery and click Launch.
    • Manager: Read-only access (can watch live numbers and video, but cannot press physical buttons).
  • The "Bouncer" Rule: If an operator logs in on their laptop, and someone else opens the dashboard with the same account on a tablet, the older tab is automatically logged out to prevent two people from pressing conflicting buttons.

3.3 The Live Video Server (MediaMTX)​

  • Hosted at cam.tutr.tech. It takes raw RTSP video from the pod and turns it into WebRTC, the same ultra-fast video protocol used by Google Meet and Zoom. This keeps video latency under 1 second so operators can see what is happening immediately.

3.4 The Web Dashboards​

  • Closed-Loop Safety: When an operator clicks Enable Battery, the system doesn't just assume it worked. It waits for the voltage sensor to physically read above 48 Volts before enabling the Launch button.
  • Automatic Thermal Shutdown: If the battery hits 80°C or the motor inverter hits 90°C, the screen flashes yellow and speaks a voice warning. If either hits 100°C, the system cuts power immediately and locks the controls for 1 hour to protect the equipment.
  • Smooth 3D Motion: The 3D view uses mathematical smoothing (Hermite spline) so the 3D pod model moves like butter at 60 FPS even if the cloud numbers only arrive once a second.

4. Suggested Reading Order​

If you are new to the team, read the docs in this order:

  1. End-to-End Architecture: Understand how data flows from track to cloud.
  2. Edge Device & Raspberry Pi: Learn what runs on the vehicle itself.
  3. API Reference: See how the frontend asks the cloud for live stats.
  4. Client Dashboards: Explore the 2D panel and the 3D visualizer.
  5. Troubleshooting & Past Incidents: Learn the hard-won lessons from real bugs we solved.