A fully custom-built quadruped robot dog designed and coded from scratch.
APEX is designed to walk across varied outdoor terrain using real-time inverse kinematics, stay balanced using an IMU, navigate to GPS waypoints autonomously, and stream live camera footage back to any device over WiFi. Onboard ML-based obstacle avoidance is built and awaiting tuning on the hardware, for fully autonomous terrain exploration.
- Inverse Kinematics — custom 3-link IK/FK engine computing joint angles for all four legs in real time
- Body-Twist Steering — the body yaws in place or arcs while walking, instead of tank-style steering
- IMU Stabilization — per-leg height correction keeps the body level on uneven ground
- GPS Navigation — follows waypoints entered live from the dashboard, then holds position at the end
- ML Obstacle Avoidance — a pretrained depth model turns the webcam feed into steering around obstacles
- Live Video Streaming — webcam feed to any device on the same network
- Mission Control Dashboard — web UI for homing, standing, walking, steering and navigation; works with no internet
- Fault-Tolerant Sensors — every sensor runs on its own thread, so a dead one degrades safely instead of freezing the robot
- ROS 2 Integration — dashboard and controller talk over ROS 2 topics
- Per-Motor Current Sensing — every motor driver's current is read and shown live on the dashboard; a mid-swing spike is treated as an early foot touchdown and triggers recovery
For how all of this works, see TECHNICAL.md.
For the full, up-to-date bill of materials, see the APEX BOM on Google Sheets.
Full setup instructions are a work in progress. The notes below are enough to get running.
pip install -r Code/Pi5/requirements.txtROS 2 (Humble or later) is a separate apt install, needed only for pi5_main.py. To test without ROS, use single_leg_test.py.
- Optional pieces: obstacle avoidance (
onnxruntime+ the depth model) and the status OLED (luma.oled). If either is missing, everything else still runs. - Missing hardware is OK: a dead IMU, GPS, compass, camera, power monitor or speaker won't stop the boot. It shows as FAIL in the boot log and on the OLED, and the dashboard shows an amber "running degraded" banner.
- Private settings: copy
Code/Pi5/.env.exampletoCode/Pi5/.envand fill it in (currently the Bluetooth speaker's MAC)..envis gitignored. - Wiring and
/boot/firmware/config.txt: every I2C bus, UART and header pin is in HARDWARE.md.
cd Code/Pi5
python3 single_leg_test.pyThen open http://<pi-ip>:5000 in a browser for the control panel and live camera feed.
cd Code/Pi5
source /opt/ros/<distro>/setup.bash # e.g. humble, jazzy, lyrical
python3 pi5_main.pyOn the robot this runs inside a ROS 2 Docker container (privileged, host networking) with a Python venv for the pip packages. Stop it with Ctrl+C or pkill -f pi5_main; either way it shuts down cleanly and leaves "stopped" on the OLED.
Flash each Pico with MicroPython, then copy the contents of Code/Pico/ to the Pico filesystem. The main loop starts automatically on boot. The legs do not move on their own -- each Pico just holds its power-on position under light PID until it's homed. From the web dashboard: home each leg individually, then Stand, then Go. A Stop control cuts motor power without losing homing.
- Re-flash all four Picos. Seven firmware fixes live on the Pico side; a Pi running current code against old firmware still cannot stand, and still will not walk. See the banner in
ENGINEERING_NOTES.md. - Copy every file in
Code/Pico/to each board, includingmcp3208.py,current_sense.pyandcontact_detect.py. - Calibrate
TOUCHDOWN_AMPSinpico_main.py. The touchdown abort ships with uncalibrated 3.0 A placeholders. SeeENGINEERING_NOTES.md→ Ground contact — current sensing replaced the FSR. - Set
LEG_IDon each board — all four currently ship as0. - Check the IMU roll/pitch signs on a stand. Levelling assumes right-side-down is positive roll and nose-up is positive pitch. If either axis is bolted in backwards the correction is positive feedback and will drive the robot over. Steps are in
ENGINEERING_NOTES.md→ Before you walk it.
| Component | Status |
|---|---|
| IK / FK engine | Complete |
| Gait generation | Complete |
| Pico PID motor control | Complete |
| Pi-Pico serial protocol | Complete — frames stage on the Pico, re-sends rate-limited to 10 Hz |
| IMU stabilization | Complete — verify the roll/pitch signs on a stand first |
| GPS navigation | Complete |
| Camera streaming | Complete |
| Recovery path | Complete |
| Homing / Stand / Go / Stop dashboard workflow | Complete |
| ML obstacle avoidance | Built, needs hardware tuning |
| Motor stall protection (software) | Complete — error and encoder must both stall; needs a bench check |
Per-motor current sensing (BTS7960 IS, MCP3208) |
Built, not yet run on hardware |
| Foot-contact abort (current-based, replaces FSR) | Built — thresholds need bench calibration |
| Motor Currents dashboard panel | Complete |
| Mechanical build | In progress |
| Custom PCB | In progress |
| CAD files | In progress |
APEX/
├── Code/
│ ├── Pi5/ # Raspberry Pi 5 code (ROS 2 node, dashboard, sensors, vision)
│ └── Pico/ # RP2040 MicroPython firmware (one copy runs on every leg)
├── CAD/ # Fusion 360 leg and body models, PCB V1 design and Gerber files
├── Photos/ # Build photos
├── README.md # This file
├── TECHNICAL.md # How it works: architecture, protocol, gait, control loop, vision, dashboard
├── HARDWARE.md # Pi 5 buses and pins, config.txt, OLED, Pico boards, speaker
└── ENGINEERING_NOTES.md # Open issues, bench checklists, resolved defects, planned work
Questions or inquiries: apex.quadrupedalrobot@gmail.com
Want your own APEX? Whether it's for educational, personal, commercial, or any other use, email apex.quadrupedalrobot@gmail.com to purchase one.
MIT
