Build Stanford Doggo, configure four ODrives, understand Teensy locomotion and test leg trajectories
Original Stanford Doggo is a brushless open-source quadruped developed at Stanford, including work by Nathan Kau. It uses eight brushless motors (two per leg), four dual-motor ODrive controllers and a Teensy 3.5 running the movement code. Unlike Mini Pupper's 12 servo axes, Doggo has coupled two-motor leg linkages, belt transmissions and legacy motor-controller firmware requiring careful version matching.


1. Hardware inventory and model-specific differences
| System | Original Doggo reference |
|---|---|
| Eight brushless motors | Two actuators in each of four coupled-leg modules |
| Four ODrive motor controller boards | Each operates a pair of motors and reads its matching encoders |
| Teensy 3.5 MCU | High-level leg trajectories and four UART controller interfaces |
| BNO080 IMU | Body orientation; reference X-positive axis faces forward |
| Pulleys, belts, bearings and linkage plates | Transfers brushless motor effort to each leg |
| Power distribution and battery | Use electrical specifications of the ODrive/fork revision |
| Cut and machined frame parts | Original design involves waterjet cutting, drilling and tapping |
| Original ODrive fork + Doggo Teensy firmware | Version-matched controllers, gains, bus mapping and calibration |
2. Coupled two-motor leg geometry
The original controller describes virtual leg orientation and extension coordinates. Its Jacobian converts leg-space torques to the two motor efforts. This is not a three-servo-per-leg architecture.
3. Clone firmware, mechanical files and all submodules
sudo apt install -y git python3
git clone https://github.com/Nate711/StanfordDoggoProject.git
cd StanfordDoggoProject
git submodule update --init --recursive
git submodule status
cd ..
# Reference projects, if working on them independently:
git clone https://github.com/Nate711/Doggo.git
git clone https://github.com/Nate711/ODrive.git
Record each commit of the Doggo/ODrive projects and use their matching firmware. Modern ODrive firmware and new ODrive boards may change protocols, motor parameters and configuration tools.
4. Mechanical fabrication and assembly
- Review the original Fusion 360 CAD and the detailed BOM. Separate waterjet parts, machined features, pulleys, bearings, spacers, belts and frame hardware.
- Waterjet-cut the correct structural plates. Drill and tap features exactly as specified, then deburr all edges.
- Assemble one two-motor leg linkage, check coaxial alignment and free rotation, then repeat for all four leg positions.
- Install motor pulleys and belts; adjust tension to the design specification. Excessive belt tension increases joint friction and can prevent stable motion.
- Mount the legs to the chassis using the correct left/right mirrored orientations. Secure pulleys, bearings and fasteners.
- Install the four ODrive controllers, Teensy 3.5 and BNO080 in their reference positions; keep power and signal wiring clear of belts.
- Before energizing, verify mechanical leg positions and secure the chassis on a stable stand with all feet clear.
5. Wiring and communication topology
Original leg numbering: 0 front left, 1 rear left, 2 rear right, 3 front right. The Teensy uses distinct UART links to four ODrives. TX/RX cross connection and logic voltage must follow the exact board schematics. Do not guess power wiring from this illustration.
6. Flash and configure four ODrives
- Identify and label every dual-channel ODrive, its motor and encoder pair.
- Use the original Doggo ODrive fork and firmware revision; inspect release instructions before flashing.
- Check motor pole-pair, resistance, encoder direction, current limits and belt gearing according to the original config, not generic defaults.
- Review the fork's motor setup tool before using it: software configuration can spin motors and must be performed on a restrained test fixture.
- Calibrate one ODrive/motor pair at a time, recording measured motor and encoder states before proceeding.
cd ODrive
ls tools/doggo_setup.py
python3 -m py_compile tools/doggo_setup.py
# Do not run motor calibration until mechanically secured
# and the matching legacy instructions have been reviewed.
7. Configure Teensy firmware and check sources
cd ../Doggo
git submodule update --init --recursive
find . -iname "platformio.ini"
find . -iname "*.ino" -o -iname "*.cpp" | head -30
# If PlatformIO is used in this checkout:
cat platformio.ini
Use the repo's supported Teensy toolchain and library versions to compile and flash. The original controller streams position/torque targets to the ODrives at approximately 100 Hz. Verify Teensy serial port mapping, IMU alignment and leg-index conventions before energizing the complete robot.
8. Leg control: trajectory to motor torque
9. Offline Python program: generate and inspect a sample foot trajectory
import math
frequency = 1.0
amplitude = 0.02
height_offset = 0.15
samples = 100
for index in range(samples):
t = index / samples
x = amplitude * math.sin(2 * math.pi * frequency * t)
z = height_offset + amplitude * math.cos(
2 * math.pi * frequency * t
)
print(round(t, 3), round(x, 4), round(z, 4))
Save as leg_trajectory.py and run python3 leg_trajectory.py. This is a mathematical visualization example, not the official Doggo gait or a physical motor-control script. These arbitrary dimensions have not been validated for a real robot.
10. Safe physical startup process
- With power disconnected, inspect belt tension, mechanical alignment, battery, conductor insulation and controller mounting.
- Place the chassis on a stable support that keeps all legs clear; ensure motor motion cannot hit tools or people.
- Confirm each ODrive's firmware and encoder state individually.
- Confirm the BNO080 orientation, with positive X facing the robot's front as required by the original build.
- Inspect the initial leg pose. The project describes a start calibration involving a large rotation and return, which can be hazardous without support.
- Verify the remote stop method, motor-current limits and controller error reporting.
- Test neutral position and slow supported movements before short low-speed locomotion on a clear floor.
- Reserve trotting, running and jumps for a fully validated configuration.
11. Troubleshooting by hardware layer
| Observed failure | First inspection |
|---|---|
| ODrive not recognized | USB/serial, power, firmware fork and configured baud |
| Motor spins backward | Encoder direction, phase ordering and joint mapping |
| Leg binds by hand | Belt tension, pulley alignment, bearings and linkage geometry |
| Teensy fails to build | PlatformIO or supported build tool, dependencies and MCU target |
| Wrong leg responds | UART pairing and 0–3 leg identity mapping |
| Robot immediately falls | Stop; inspect IMU frame, calibration and controller gains |
| Excess motor heat/current | Disconnect supply, check belt drag and motor configuration |
Stanford Doggo depends on historical custom ODrive firmware. A modern motor controller may require porting its control loop and CAN/UART interfaces. Firmware compilation or an offline trajectory script does not prove physical walking readiness. No physical robot testing is claimed in this guide.
Complete practical guide: Stanford Doggo
Doggo's quadruped leg architecture uses paired motor drives and parallel linkages. Its archived ODrive and Teensy dependencies need to match the original controller generation.
1. Files, parts and fabrication
- Retrieve the source recursively and preserve the mechanical drawings. Identify the waterjet-cut, drilled, tapped and printed pieces in the release before ordering.
- Assemble one linkage with the specified pulleys, shafts and bearings. Check parallelism and free movement before installing motors.
- Use the exact specified ODrive, encoder and motor variants. Mount each leg to the correct body corner and inspect cable slack at full passive travel.
2. Software installation and configuration
- Inspect pinned submodules and historical ODrive firmware requirements before installing host tools. Keep a separate environment for older Python and controller dependencies.
- Review doggo_setup.py before use; it applies hardware settings and must match the ODrive model and firmware.
- Build the controller firmware for the documented Teensy setup and inspect the gait state transitions. Verify sensor and motor calibration through the provided setup procedure.
Commissioning diagram
- 1Teensy gait controller
- 2ODrive motor commands
- 3Paired motor linkage
- 4Foot position
- 5Encoder feedback
Mermaid diagram source
flowchart TD
N0["Teensy gait controller"]
N1["ODrive motor commands"]
N2["Paired motor linkage"]
N3["Foot position"]
N4["Encoder feedback"]
N0 --> N1
N1 --> N2
N2 --> N3
N3 --> N43. Power-on preparation and first movement
- Secure the body with all legs unloaded. Test one drive and encoder in isolation using the original calibration procedure.
- Verify the leg position for a small supported motor motion. Record zero offsets and direction for each actuator before combining left and right legs.
- Select only a documented stationary posture after feedback and stopping are verified. Lower the body under supervision.
4. Programming exercise
Perform a read-only inspection of the archived controller material before installing any motor configuration. The commands do not send setpoints.
git submodule status --recursive
git log -1 --format='%h %cs %s'
git ls-files | grep -Ei 'odrive|teensy|doggo_setup|gait'Identify the pinned firmware, setup script and gait implementation. Resolve the actual historical hardware/software versions before running the setup script.
5. Progress to practical operation
- Verify joint feedback and a stationary supported posture; inspect contact consistency when paws reach the floor.
- Use the published gait controller at a restricted setting, checking the foot path and body behavior over a short distance.
- Jumping, running and flips are advanced experiments with greater dynamic loads. Do not use them as startup tests.
6. Software and hardware diagnostics
- ODrive tool rejects configuration
- Match hardware generation, firmware and host tool version.
- Leg moves in an unexpected direction
- Check the paired encoder sign and joint mapping with body supported.
- Pulley slips or linkage binds
- Remove power and inspect tightening, shaft alignment and linkage clearance.
Technical basis: Stanford Doggo source, original mechanical drawings and ODrive setup. Programming examples are identified as simulation, offline analysis or documented interface instructions. No physical commissioning test is claimed.
Stanford Doggo brushless legs and ODrive setup
Archived research quadruped
Doggo is an end-of-life project; plan to reproduce an older electronics and firmware stack or obtain engineering support.
From parts to first test 5 steps
Audit the DoggoHardware design
Review Fusion 360 and manufacturing references. Identify the structural parts that require waterjet cutting, drilling or tapping and the parts that can be printed.
Reference 1 ↓Source compatible drives and electronics
Use the historical repository's BOM/build notes to obtain the brushless motors, ODrive hardware, Teensy, encoders and power components; match the firmware-era hardware.
Reference 2 ↓Fabricate and assemble the four legs
Follow the mechanical layouts for linkages, shafts and transmission components. Check clearance before attaching each leg to the frame.
Reference 1 ↓Recover the original firmware dependencies
Clone the project with its submodules and examine the ODrive and Teensy firmware versions before configuring motor and encoder feedback.
Reference 2 ↓Bench-test before attempting gait
Verify encoder signs and drive response individually with the legs secured. A functioning gait requires matching historical controller behavior; availability of source files alone does not guarantee a supported startup.
Reference 2 ↓
Parts, files and official manuals 2 references
Archived ODrive quadruped
Practical implementation notes for Stanford Doggo. Use the exact hardware and software revision specified in the project documentation.
Tools and equipment
- CAD and fabrication service for cut or machined parts
- hex drivers
- caliper
- motor and encoder tools
- ODrive and Teensy development environment
Component illustration
- 1Motor drive
- 2Pulley / shaft
- 3Linkage
- 4Foot contact
Control architecture
- 01Teensy controller
- 02ODrive network
- 03Brushless motor drives
- 04Parallel leg linkage
Mechanical preparation and assembly
Extract the mechanical drawings and identify waterjet-cut, drilled, tapped and printed components. Prepare each leg's drive and parallel linkage, check pulley and shaft alignment, then mount the four legs to the chassis. Check both directions by hand before power.
Electrical setup and calibration
Identify the historic ODrive board and firmware versions before connecting motors. Verify encoder phase and signs in the archived setup, and inspect the Teensy wiring loom. Use external support; brushless actuators and legs can move suddenly if calibration is wrong.
Software setup and programming
Clone the source with submodules and inspect the original controller firmware. The project's doggo_setup.py is tied to the compatible ODrive stack; recover exact historical dependencies before any calibration. Review the controller and its gait state transitions before deployment.
First test and acceptance criteria
A reproducible drive setup requires valid encoder readings and expected motor motion at restricted effort. Do not attempt jumping or flips as commissioning tests.
Programming and configuration example
Source checkout and dependency review only; do not run the archived setup script on an unverified motor controller.
git clone --recurse-submodules https://github.com/Nate711/StanfordDoggoProject.git
cd StanfordDoggoProject
git submodule status --recursive
# Inspect the pinned ODrive firmware before running doggo_setup.py.Troubleshooting
If ODrive configuration fails, check the firmware and hardware generation before running the historical setup. Do not attempt calibration with a mechanically loaded leg.
Technical reference: project release documentation. The assembly references above provide the revision-specific drawings and BOM. Examples are editorial walkthroughs or documented commands; they have not been physically tested by TechniaHQRobot.
What the hardware release requires
Doggo uses brushless motors, custom leg links and multiple motor controllers. Its hardware folder points to a Fusion 360 CAD assembly and a BOM; the author notes that some pieces must be waterjet cut and later drilled or tapped.
The project has dependencies on Doggo and ODrive submodules. Clone with submodules before attempting to build or edit the control code.
Motor setup before locomotion
The official README describes flashing custom ODrive firmware to four controllers, running doggo_setup.py and loading the Doggo Arduino code on the Teensy. On startup the legs calibrate the motors and encoders before the idle state.
Changes to mechanical gearing require matching gear-ratio values in the controller. A mismatch can turn small setpoint errors into unsafe joint movement.
Maintenance and present-day value
The publisher has ended Doggo support while focusing on Pupper V3. Its mechanical and low-level controller sources remain a learning resource, but present-day reproductions need extra component compatibility work.
Videos of jumps or flips do not constitute an assurance of performance for a self-assembled robot. Begin with static support and cautious motor tests.
Legacy firmware, cut parts and encoder tests
Answers are based on published source material and project documentation. Their order does not represent search volume.
01Is Stanford Doggo still maintained?
No. Its README explicitly announces end of life and directs new attention toward Pupper V3.
Sources Official project documentation
02Are all structural parts 3D printed?
No. The author says some leg links require waterjet cutting, drilling and tapping in addition to printed pieces.
Sources Official project documentation
03Why is my clone missing the control code?
Doggo and ODrive are submodules. Clone the repository recursively or initialize submodules at the pinned revisions.
Sources Official project documentation
04Can I use stock ODrive firmware?
The official build instructions specify a custom ODrive fork. Stock firmware compatibility is not established for that historical controller configuration.
Sources Official project documentation
05How do I calibrate the legs?
Flash the matching ODrive and Teensy code, run the supplied setup script and allow the startup encoder calibration as documented. Keep the robot supported during tests.
Sources Official project documentation
06What happens if I change the transmission ratio?
The software must be updated to the new gear ratio; the author calls this out explicitly for modified mechanical designs.
Sources Official project documentation
Stanford Doggo: parts cost, software updates and maintenance
This practical ownership section complements the original assembly and programming instructions. Public files do not guarantee that all components can still be purchased or that every build is supported.
| Item | Project record |
|---|---|
| Cost record / BOM target | Historical research BOM exists; no current complete quote |
| Software licence | Inspect repository LICENSE and individual ODrive/Doggo submodules |
| Hardware licence | Inspect root and CAD-specific licensing before manufacturing |
| Simulation availability | No current official one-command simulator established by repo |
| Build difficulty | Advanced |
How to obtain the robot or its parts
Use the Stanford Doggo documentation and hardware release to identify whether an assembled product, kit or self-sourced parts are offered. Price the matching revision, not a photograph or an old bill of materials. Include actuators, controller, supply, wiring, tools, fabrication, shipping, tax and spare parts. A historical BOM target is not a current delivered quote.
- Project documentation
- Source repository and version history
- CAD / fabrication files
- Revision-specific workshop source
How the hardware and software work together
Mechanical path: Motor drive → Pulley / shaft → Linkage → Foot contact.
- Teensy controller
- ODrive network
- Brushless motor drives
- Parallel leg linkage
Feedback, fault detection and the approved stop function constrain the command path.
Clone the source with submodules and inspect the original controller firmware. The project's doggo_setup.py is tied to the compatible ODrive stack; recover exact historical dependencies before any calibration. Review the controller and its gait state transitions before deployment.
Install, update and recover the software
Keep the exact hardware revision, repository commit, operating system, dependencies, controller firmware and calibration in a local build manifest. Read the project’s setup instructions before installing. Use an isolated environment and a separate checkout for upgrades; compare release notes, regenerate only the documented configuration, and first repeat a simulation or read-only test. Back up calibration and original firmware files where the project supports it. Restore only a documented compatible release if the new version fails.
Project-specific verification: A reproducible drive setup requires valid encoder readings and expected motor motion at restricted effort. Do not attempt jumping or flips as commissioning tests.
Power, battery replacement and cycle life
Measure battery voltage and drive current under the same gait; use the pack specified for the chosen historical build.
Battery cycle life and robot service life are different. Equivalent full cycles (EFC) can be estimated as cumulative discharged energy (Wh) divided by initial usable pack energy (Wh). State of health (SOH) is measured usable capacity divided by baseline usable capacity × 100%, under comparable conditions. Example only: 1,800 Wh discharged from a 600 Wh reference pack equals 3 EFC; neither number is a specification for this robot. Ask for the manufacturer’s cycle rating, temperature limits, capacity-retention criterion and warranty. Do not use an arbitrary percentage as a replacement threshold.
Common problems, wear and service plan
| When | Inspection and evidence |
|---|---|
| Before operation | Inspect pulley alignment, belt wear and parallel leg linkage. Use the original ODrive and Teensy configuration when replacing hardware. |
| After a fault or impact | Identify the historic ODrive board and firmware versions before connecting motors. Verify encoder phase and signs in the archived setup, and inspect the Teensy wiring loom. Use external support; brushless actuators and legs can move suddenly if calibration is wrong. |
| After software or parts change | Record versions and replaced part serials; compare the same approved test with the earlier baseline. Stop on new errors or unexpected movement. |
| At manufacturer service intervals | Use the documented interval and authorized service procedures. No universal calendar or lubricant is assumed. |
| At end of service | Ask about spare-part availability, data removal, battery take-back and local electronics recycling. |
What is not established by the published files
The project documentation must provide any claimed rated service life, battery cycle endurance, duty limits, warranty and repair intervals for the exact hardware. Without a cited endurance test, report those values as not established, not zero and not an estimate. For a DIY build, keep a parts-replacement log and report conditions when measuring reliability.
Original documentation
- Project status notice
- Official assembly and setup
- Hardware and Fusion 360 links
Found a changed specification? Submit a correction with its source ↗