Skip to the content
4 layers93.2 × 35 mmMk2 routed, the printed circuit board in 3D

This project brings aim-assist and autonomous control to combat robots.

Size
93.2 × 35 mm
Copper layers
4
Thickness
1.6 mm
Parts
75
Nets
37
Pads
355
Tracks, vias
676, 166
Pours
11
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
6 Dec 2025
Updated
7 Nov 2026

Overview

Mk2 routed is an open-source printed circuit board by Woz4tetra, from the Woz4tetra/auto-battlebot repository on GitHub. It is a 4-layer board of 93.2 × 35 mm with 75 parts on 37 nets, routed with 676 tracks and 166 vias.

It is built around the ESP32-S3-MINI-1U-N4R2, TPS54202DDC and AP2112K-3.3, with the BNO055, USBLC6-2SC6 and B5819W among its other parts. Its parts include 23 capacitors, 18 resistors, 5 ICs, 3 diodes and 1 inductor. It belongs with the ESP32 and NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

8

README

README.md
Auto Battlebot banner

This project brings aim-assist and autonomous control to combat robots.

Driving skill in leagues like NHRL is often the deciding factor when hardware is similarly robust. The goal of this project is to deliver autonomous control to any radio-controlled combat robot.

Playback demo

Play recorded video through the full control pipeline.

Built for Low Latency

The application is written in C++ and uses TensorRT for inference.

On the Jetson Orin Nano, camera capture to motor motion is < 60 ms.*

Supported platforms:

  • Jetson Orin NX or Orin Nano
    • JetPack 7.2 (Ubuntu 24.04, CUDA 13.2, Python 3.12) or JetPack 6.2 (Ubuntu 22.04, CUDA 12.6, Python 3.10)
  • Intel x86 + NVIDIA GPU
    • Ubuntu 22
    • Ubuntu 24

Fast Deployment

At NHRL, there is no time to set up tripod hardware across 8+ cages and calibrate fixed camera systems.

This system is fully handheld. The handheld device features:

  • Jetson Orin NX
  • e-CAM25 RGB camera
  • USB connection to any OpenTX transmitter
  • 2+ hours of battery
  • 8-inch LCD display

Handheld autonomy device

If there is interest, I can release the BOM and parts list.

Easy to Debug

The application uses Foxglove for visualization, MCAP for replay debugging, and ZED SDK's SVO format for video playback.

Live viewing goes through viz_relay, a small process that owns the Foxglove WebSocket server on port 8765 and stays up across app restarts (scripts/run_viz_relay.sh, or the viz-relay.service unit on the Jetson). Recordings use Foxglove protobuf and JSON schemas; the layout is documented in docs/foxglove_recording_format.md.

The same relay serves a web dashboard (web/, Svelte). On the ZED Box it is http://<hostname>.local over an Ethernet cable to an iPad, using the box's existing hostname, and install/install_dashboard_network.sh sets up mDNS, the link-local address, and the firewall. A box with its own screen shows the same page full screen through service/dashboard-kiosk.service, a WebKitGTK window rather than a browser. On a dev box it is http://localhost:8080 after scripts/build_web.sh. Status topics and commands are one table in include/remote/protocol.hpp; see docs/plans/web_ui_plan.md.

Foxglove demo

Simulation and Playback Testing

To reduce regression risk, the system can replay recorded SVO files as if real hardware were connected.

It also includes a simulator for closed-loop behavior testing using Genesis.

Simulation demo

Implementation

Auto Battlebot system diagram

The system has 3 modes defined by configuration files:

  • Hardware: Receives images from a real ZED 2i and sends control commands to a real OpenTX transmitter.
  • Simulation: Receives images from simulation and sends commands over TCP to the simulator.
  • Playback: Receives images from an SVO file; commands are generated but not transmitted.

Engineering Highlights

The project focuses on end-to-end autonomy under real-time and real-world constraints.

  • Real-time systems: C++17 implementation for camera, perception, filtering, navigation, and transmission.
  • Maintainable systems: Components are swappable through interfaces and controlled by configuration.
  • ML in the loop: TensorRT-accelerated YOLO segmentation and keypoint models run in the control pipeline.
  • Control + geometry: Pursuit navigation with field-boundary clamping and velocity command generation.
  • Reproducibility/tooling: Simulation harnesses, playback workflows, tests, and model-sync scripts reduce iteration risk.

Pseudocode

This document describes runtime orchestration across modules.

Repo Tour

  • src/, include/: Core C++ runtime and interfaces
  • simulation/: Genesis server and protocol bridge
  • config/: Mode-specific TOML configurations
  • auto_battlebot/: Shared Python library, the only importable and type-checked tree
  • training/: Dataset building, model training, and offline scoring, one CLI per file
  • scripts/, install/: Setup, build, and run workflows (scripts/README.md)
  • firmware/: Robot-side firmware experiments and support code
  • playground/: Experimental work

Setup and Install

These scripts assume you are on one of the supported hardware configurations:

  • Jetson Orin NX or Orin Nano (JetPack 7.2 or JetPack 6)
  • Ubuntu 22 or 24 (x86 + NVIDIA GPU with compute capability 8.7 or higher)

These are the platforms I've tested on. This repository may work on other system configurations.

This section assumes CUDA and TensorRT are already installed.

Docker install

These commands ensure you have docker and docker-compose 2.20+ installed as well as the Nvidia docker runtime. This assumes you have the appropriate Nvidia drivers installed already.

bash
./install/install_docker_ubuntu.sh
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

This script builds the docker image:

bash
./scripts/docker/build_image.sh

Once this succeeds, run the playback with this script:

bash
./scripts/docker/run_playback.sh

To run unit tests, run these commands:

bash
./scripts/docker/shell.sh
./scripts/build_and_test.sh

If there's an error about no engine file found, jump to this section "Creating New Engine Files."

Docker-less install

I don't have a docker file for Jetson platforms. For Jetson-specific setup, see docs/jetson_setup.md.

To run SVO playback in a container instead, with ZED SDK, CUDA, and TensorRT already pinned, see docs/docker_playback.md. That path is x86 only and covers playback, not deployment.

To install the core application, run one of:

  • scripts/install_jetson.sh
  • scripts/install_ubuntu_22.sh
  • scripts/install_ubuntu_24.sh

Training and Python Tools

To install tools for training, firmware, and other Python workflows:

bash
./scripts/setup_python.sh

Simulation

To install and run simulation:

bash
scripts/setup_simulation.sh
scripts/run_simulation.sh

Obtaining Model Files

After running the Python tools setup script:

bash
source ./scripts/activate_python.sh
python scripts/sync_models.py

The script lists model files that match your architecture. If none appear, continue to the next section.

Creating New Engine Files

To create engine files for systems that do not have prebuilt artifacts:

For YOLO:

bash
python training/yolo/convert_to_tensorrt.py <path to onnx file>

For DeepLabV3:

bash
python training/deeplab/convert_to_tensorrt.py <path to pt file>

Running the Application

To run playback mode:

bash
./scripts/build_and_run.sh -c ./config/playback.toml

If installing on a new Jetson, deploy, build, and run the systemd service with:

bash
./scripts/deploy_to_jetson.sh <host name or ip address>

To run unit tests:

bash
./scripts/build_and_test.sh

Code Style

There is no strict style guide yet. Running the check-and-fix script applies baseline corrections:

bash
./scripts/lint
Footnotes
  • Crossfire has 19.5 ms of latency. The sense-and-control loop takes ~35 ms on the Jetson Orin Nano. Camera image acquisition takes ~20 ms. Because these steps are asynchronous, they cannot be summed directly. The stated figure is a worst-case latency guarantee.

Parts

75
QtyValueFootprintReferences
8100nFCapacitor_SMD:C_0402_1005MetricC1, C2, C6, C7, C16, C18, C20, C21
5100Resistor_SMD:R_0402_1005MetricR10, R13, R14, R17, R18
410kResistor_SMD:R_0402_1005MetricR6, R7, R11, R12
310uFCapacitor_SMD:C_0603_1608MetricC12, C14, C15
31uFCapacitor_SMD:C_0402_1005MetricC13, C17, C19
322uFCapacitor_SMD:C_0805_2012MetricC8, C9, C10
210Resistor_SMD:R_0402_1005MetricR2, R3
210uFCapacitor_SMD:C_0805_2012MetricC4, C5
222pFCapacitor_SMD:C_0402_1005MetricC22, C23
24.7kResistor_SMD:R_0402_1005MetricR8, R9
25.1kResistor_SMD:R_0402_1005MetricR15, R16
2B5819WDiode_SMD:D_SOD-123D1, D2
2GND_STITCHmk2:StitchVia_0.6mmTP15, TP16
2MountingHole_Lmk2:MountingHole_3.7mm_Washer9mm_Dcut_LH3, H4
2MountingHole_Rmk2:MountingHole_3.7mm_Washer9mm_Dcut_RH5, H6
10.5mmk2:R_Yezhan_ASR3_2512R1
1100kResistor_SMD:R_0402_1005MetricR4
1100uF 35VCapacitor_SMD:CP_Elec_6.3x7.7C3
112kResistor_SMD:R_0402_1005MetricR5
115uHInductor_SMD:L_Taiyo-Yuden_NR-40xxL1
132.768kHzCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
147pFCapacitor_SMD:C_0402_1005MetricC11
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U3
1BNO055Package_LGA:LGA-28_5.2x3.8mm_P0.5mmU4
1BOOT/RSTmk2:HDR-SMD_3P-P2.54-V-M_HX-PZ2.54-1X3P-TP-YQH1
1DSHOT_Lmk2:WirePad_Lap_1.6x3.0mmTP11
1DSHOT_Rmk2:WirePad_Lap_1.6x3.0mmTP13
1ESC_L+mk2:WirePad_Lap_3.0x5.0mmTP7
1ESC_L-mk2:WirePad_Lap_3.0x5.0mm_ViasTP8
1ESC_R+mk2:WirePad_Lap_3.0x5.0mmTP9
1ESC_R-mk2:WirePad_Lap_3.0x5.0mm_ViasTP10
1ESP32-S3-MINI-1U-N4R2mk2:BULETM-SMD_ESPRESSIF_ESP32-S3-MINI-1U-N8ESP1
1INA238Package_SO:VSSOP-10_3x3mm_P0.5mmU1
1NANO_RXmk2:CONN-SMD_HX-PZ2.54-1X4P-WTH2
1PACK_A+mk2:WirePad_Lap_3.6x5.0mmTP2
1PACK_A-mk2:WirePad_Lap_3.6x5.0mm_ViasTP1
1PACK_B+mk2:WirePad_Lap_3.6x5.0mmTP4
1PACK_B-mk2:WirePad_Lap_3.6x5.0mmTP3
1SIG_GND_Lmk2:WirePad_Lap_1.6x3.0mmTP12
1SIG_GND_Rmk2:WirePad_Lap_1.6x3.0mmTP14
1SW_BACKmk2:WirePad_Lap_3.6x5.0mm_ViasTP6
1SW_OUTmk2:WirePad_Lap_3.6x5.0mmTP5
1TPS54202DDCPackage_TO_SOT_SMD:SOT-23-6U2
1TYPE-C-31-D-06mk2:USB-C-SMD_TYPE-C-31-D-06USB1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U5
1XL-2020RGBC-WS2812Bmk2:LED-SMD_4P-L2.0-W2.0-BR-1LED1

Similar boards

  • 4 layers106.3 × 50 mmController, the printed circuit board in 3D

    Controller

    blonski3/ibm-modern-m-ssk

    Decyzje projektowe i ich uzasadnienia: docs/HARDWAREDECISIONS.md; historia zmian: docs/CHANGELOG.md.

    80 parts
  • 2 layers127 × 149 mmSpeakeasy panel 3x3, the printed circuit board in 3D

    Speakeasy panel 3x3

    W-Floyd/speakeasy

    ESPHome firmware for a custom ESP32-S3 WiFi speaker that integrates with Music Assistant via the Sendspin protocol or Snapcast for synchronized multi-room audio.

    414 parts1
  • 4 layers65.1 × 132.8 mmFX580 Main EPD LAYOUT V8, the printed circuit board in 3D

    FX580 Main EPD LAYOUT V8

    ThVerstappen/AI-Fx580VNX

    Revision mới nhất hoàn tất ngày 11/10/2026. Mở FX580MainEPDLAYOUTV8.kicadpro bằng KiCad 10.0.5; PCB và schematic cùng tên. Thư viện local dùng ${KIPRJMOD}/lib.

    132 parts
  • 2 layers80 × 100 mmMacro keyboard, the printed circuit board in 3D

    Macro keyboard

    drfhaust/Macro-keyboard

    macro keyboard esp32 s3

    74 parts
  • 4 layers40.8 × 40.8 mmACwing FC A, the printed circuit board in 3D

    ACwing FC A

    ACwing-UAV/ACwing_HW

    ACwing is a modular set of PCBs for small multirotors.

    111 parts
  • 2 layers100 × 100 mmEnvcity aqm v2, the printed circuit board in 3D

    Envcity aqm v2

    MateusMaruzka/aqm_envcity_hw

    138 parts2
  • 4 layers80 × 120 mmUAV MainBoard V3, the printed circuit board in 3D

    UAV MainBoard V3

    MennoScholten/UAV_Project

    Design and development of a UAV

    231 parts

Questions

How big is the Mk2 routed PCB?

It measures 93.2 × 35 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Mk2 routed use?

75 parts, built around the ESP32-S3-MINI-1U-N4R2, TPS54202DDC, AP2112K-3.3 and BNO055. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Mk2 routed KiCad files?

From the Woz4tetra/auto-battlebot repository on GitHub, at the commit this page was made from: the board is hardware/mr_stabs_mk2_pcb/pcba/mk2_routed.kicad_pcb and its schematic hardware/mr_stabs_mk2_pcb/pcba/mk2_sch.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Mk2 routed design in my own project?

Its repository states no licence, so its author keeps all rights: ask Woz4tetra before reusing the design.