Skip to content
This is a project planning and overview page. For progress updates, check the build log.

Documentation

Software Architecture

Calvin's software is split across three purpose-built systems that communicate in a chain: Explorator ↔ Cogitator ↔ Instinctus.

System Data Flow

Explorator Electron + Vue 3

Human workstation  ·  Telemetry display  ·  Audio & video feeds  ·  Manual controls  ·  PID tuning

TCP / WebSocket  ·  LAN / WiFi
Cogitator Python  ·  Jetson Orin Nano

Vision service (OAK-D Pro W)  ·  LLM processing (planned)  ·  Telemetry relay  ·  WebSocket gateway

1 MBPS Serial
Instinctus Teensy 4.1
ARM Cortex-M7 · 600 MHz

Sensor reads  ·  Serial bridge  ·  PID balance loop  ·  ODrive CAN commands

CAN Bus
ODrive S1
Left Motor
ODrive S1
Right Motor

01 Instinctus

github.com/fungus-wine/calvin_instinctus

Single-Core Architecture

The Teensy 4.1's ARM Cortex-M7 runs at 600 MHz and handles all Instinctus tasks on a single core — sensor reads, serial comms, the PID balance loop, and CAN bus motor commands.

  • Reads ICM-20948 IMU via SPI
  • Reads VL53L4CX ToF sensors on a I2C bus
  • Receives commands from Cogitator over serial
  • Runs PID controller (1 kHz target loop rate)
  • Sends velocity setpoints to ODrive S1 over CAN
  • Forwards telemetry back to Cogitator

Key Details

Board Teensy 4.1
Core ARM Cortex-M7 · 600 MHz
Framework Arduino / Teensyduino
CAN FlexCAN · 250 kbps
Loop rate 1 kHz target

03 Cogitator

github.com/fungus-wine/calvin_cogitator

Planned Python Services

Cogitator is architected as a set of independent Python services coordinated by a ZeroMQ message bus and broker.

  • serial_service
    Serial link to Instinctus — reads telemetry, writes commands
  • vision_service
    OAK-D Pro W depth perception, object detection via DepthAI
  • video_service
    Streaming video from OAK-D Pro W
  • hearing_service
    Audio location and processing with ReSpeaker 3.0
  • audio_service
    Audio streaming from ReSpeaker 3.0
  • gateway_service
    WebSocket server — exposes telemetry and commands to Explorator

Runtime Environment

Platform Jetson Orin Nano · JetPack 6.2
Language Python 3
Vision SDK DepthAI / depthai-python

04 Explorator

github.com/fungus-wine/calvin_explorator

Electron + Vue 3

Explorator is a cross-platform desktop application built with Electron and Vue 3. It connects to Cogitator's WebSocket API over LAN to provide live telemetry and manual control.

  • Real-time telemetry dashboard
  • Live camera and audio feeds from Cogitator
  • Manual text commands
  • PID tuning interface
  • Hardware Diagnostics view
  • Data Logger

Tech Stack

Shell Electron (Node.js)
UI Framework Vue 3 + Vite
Styling Tailwind CSS
Networking WebSocket client

05 Tooling

Calvin's firmware development relies on two purpose-built tools that replace the standard Arduino IDE workflow with a simple, scriptable CLI wrapper paired with a graphical companion app. Servitor depends on grot — it shells out to grot build and grot load under the hood.

grot

Ruby gem

A friendly CLI wrapper around arduino-cli and teensy_loader_cli. Reads a per-project .grotconfig TOML file for board FQBN, port, and sketch path, then exposes memorable sub-commands for the most common development loops. For example:

  • grot build
    Compile the sketch via arduino-cli with config-driven settings
  • grot load
    Upload the compiled binary to the connected board

Servitor

Electron / Vue 3

A cross-platform desktop app that consolidates the Arduino development loop into a single window — project dashboard, serial monitor, and live data plotter — with one-click build and upload backed by grot.

  • Project dashboard — per-project build/load buttons with streaming output
  • Auto port detection — scans ports and updates .grotconfig automatically
  • Serial monitor — real-time text view with send capability
  • Serial plotter — live charts from key:value data streamed off the board
  • 9 OKLCH themes, persistent light/dark mode preference

All Repositories