TECHNIAHQROBOT / INDEPENDENT ROBOTICS REPORTINGENGLISH EDITION / 24 November 2026
ROBOTICS / OPEN PROJECTMobile Robots

DonkeyCar: RC Chassis Assembly, Printed Roll Cage and Calibration

DonkeyCar turns a small RC car into a camera-guided robot. Its official guide describes compatible chassis, a Raspberry Pi, camera, motor-control electronics and optional printed roll bars. Software supports driving-data collection and a simulator, but mechanical assembly and steering calibration remain separate tasks.

Source repository Documentation CAD and design files
Editorial source check · Project documentation and public files; no physical test claimedRevision and parts availability may change
THE TECHNICAL DOSSIERDonkeyCar
DONKEYCAR / COMPLETE CONSTRUCTION AND DRIVING MANUAL

Build a DonkeyCar, calibrate the steering, collect camera data and train an autonomous driving policy

DonkeyCar is an open-source educational platform for an RC car with a Raspberry Pi, camera, steering servo and motor ESC. The operator first drives it on a controlled course. Camera frames, steering and throttle are recorded so an imitation-learning autopilot can later reproduce the demonstrated behavior.

This tutorial focuses on the steering-servo-and-ESC drivetrain. A differential-drive car with L298N or another controller has different wiring and calibration requirements. All photos and wiring illustrations on this page are taken from the official DonkeyCar documentation.

1. Required hardware and supported drive layout

PartPurpose
Compatible 1/16-scale RC car chassisWheels, chassis, steering linkages and transmission
Raspberry Pi 4 or 5Camera capture and software control
64-bit Raspberry Pi OS microSD card, preferably 128 GBOperating system and driving data
Raspberry Pi-compatible cameraForward view of driving track
PCA9685 I2C PWM board, or an explicitly compatible RC controllerSteering and ESC PWM outputs
RC steering servoLeft/right wheel angle
Electronic speed controller (ESC)Brushed/brushless drive motor control as appropriate
Propulsion batteryMotor and ESC power
Separate compatible Raspberry Pi supplyStable computer power
Printed top plate, roll cage and camera mountMechanical supports and vibration control
Spacers, screws, Velcro ties and cablesSecure mounting and clean electrical routing

Documented RC chassis families include WL Toys, Exceed and HSP, but brackets and motor electronics vary. Match the STL to the exact chassis and use the correct battery, servo and ESC specifications. Never connect RC motor power to Raspberry Pi GPIO.

2. Complete electronics and control architecture

Diagram 1 - Camera, controller, propulsion and steering

Camera image
→
Raspberry Pi / DonkeyCar
←
Web browser or gamepad
↓ I2C commands
PCA9685 PWM controller
→
CH0: motor ESC
→
Propulsion motor
↓ additional PWM output
CH1: steering servo
RC propulsion battery → ESC
Separate Pi power supply → Raspberry Pi
Show the complete Mermaid diagram source
flowchart TD
 A["Front camera"] --> B["Raspberry Pi / DonkeyCar"]
 C["Web browser or gamepad"] --> B
 D["Trained driving model"] --> B
 B --> E["I2C SDA and SCL"]
 E --> F["PCA9685 PWM board"]
 F -->|"CH0"| G["Motor ESC"]
 F -->|"CH1"| H["Steering servo"]
 I["RC propulsion battery"] --> G
 G --> J["Motor and drivetrain"]
 K["Dedicated Raspberry Pi supply"] --> B
This is the documented steering-servo / ESC architecture. Differential motor-driver vehicles require different outputs.

3. Get the software source and select the correct 3D-print files

Bash - official Python framework
git clone https://github.com/autorope/donkeycar.git
cd donkeycar

The software repository is not the complete mechanical kit. Choose the printable mounting parts for the particular RC chassis from the official build-hardware resources. Typical prints are an electronics top plate, camera roll cage and chassis adapter. For the older reference construction, the roll cage was printed in PLA at 0.3 mm layer height using a 0.5 mm nozzle; newer mounts may require different settings.

  1. Identify the car chassis and select its corresponding mounting plate and print files.
  2. Open each STL in the slicer and verify hole spacing and physical scale before printing.
  3. Print a short bracket test if the car's mounting-hole positions are uncertain.
  4. Print the top electronics plate, camera mount and needed spacers.
  5. Verify that battery and wiring can be secured without touching moving linkages.

4. Assemble the RC chassis and camera mount

Diagram 2 - Physical assembly route

Inspect RC chassis
→
Fix printed top plate
→
Mount Pi + PWM board
↓
Install front camera
→
Secure battery and harnesses
→
Raised-wheels test
Show the Mermaid source
flowchart TD
 A["RC car chassis"] --> B["Check wheels, servo and drivetrain"]
 B --> C["Fasten printed plate"]
 C --> D["Install Raspberry Pi and PCA9685"]
 D --> E["Mount camera roll cage"]
 E --> F["Connect camera ribbon cable"]
 F --> G["Secure battery and wiring"]
 G --> H["Verify car with wheels raised"]
Always check mechanical fit without power before testing steering or throttle outputs.
  1. Inspect suspension, steering linkage and transmission while the RC car is powered off.
  2. Secure the printed mounting plate to the chassis with the correct fasteners.
  3. Mount the Raspberry Pi on standoffs; keep ports accessible.
  4. Fix the PCA9685 board away from rotating parts or metal contacts.
  5. Mount the camera facing down the track, with the lens undamaged and cable clear of shocks.
  6. Connect the CSI camera ribbon with the Pi powered off.
  7. Attach the battery and Pi supply using appropriate restraints.
  8. Bundle the wiring away from tires, steering arms and drive shafts.

5. Wire the Raspberry Pi, PCA9685, ESC and steering servo

Original DonkeyCar PCA9685 and Raspberry Pi wiring drawing from official documentation
Original DonkeyCar wiring illustration. Check controller revision and voltage before following its connections.
Raspberry Pi physical pinPCA9685 function
Pin 1, 3.3 VLogic VCC
Pin 3, SDASDA
Pin 5, SCLSCL
Pin 9, groundGND
PCA9685 CH0Motor ESC PWM input in the reference vehicle
PCA9685 CH1Steering servo PWM input in the reference vehicle

Separate the logic and motor supply. The Pi is not the RC motor power source. The PCA9685's servo-power rail must be supplied correctly for the specific servo/ESC and any BEC. Confirm a common ground where required, connector polarity and safe ESC neutral before energizing hardware.

6. Install Raspberry Pi OS and DonkeyCar software

The official November 2026 documentation identifies DonkeyCar 5.4 with 64-bit Raspberry Pi OS Trixie and the system Python 3.13. Its page also retains older Bookworm and Buster instructions. Do not mix a legacy DonkeyCar 4.x environment with 5.x assumptions.

Use Raspberry Pi Imager to configure Wi-Fi, SSH and a device name such as donkeycar, then connect:

Terminal - Raspberry Pi
ssh username@donkeycar.local
sudo apt update
sudo apt upgrade -y
sudo apt install -y git i2c-tools python3-libcamera python3-picamera2
sudo raspi-config

In raspi-config, turn on I2C and restart. Do not activate the legacy camera driver again.

Bash - install uv and the matching current Python environment
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv ~/env --python 3.13 --system-site-packages
source ~/env/bin/activate
uv pip install "donkeycar[pi]"

For development against the framework source rather than the published package:

Bash - alternative editable installation
mkdir -p ~/projects
cd ~/projects
git clone https://github.com/autorope/donkeycar.git
cd donkeycar
uv pip install -e ".[pi,dev]"

The editable source install is an alternative to the PyPI command above, not a required duplicate. Confirm importability and the ML dependency:

Bash - read-only software checks
python -c "import donkeycar; print(donkeycar.__file__)"
python -c "import tensorflow; print(tensorflow.__version__)"

7. Test the camera and I2C interface

Bash - camera tests
rpicam-hello
rpicam-jpeg -o camera-test.jpg

If using SSH without a display, the JPEG command can be used even when the preview is unavailable. Check the result and make sure the lens includes the intended track ahead of the vehicle.

Bash - check I2C servo controller
sudo i2cdetect -y 1

The default PCA9685 address is often 0x40. If it is missing, inspect SDA, SCL, logic power, grounds and bus enabling before trying any motor commands.

8. Create and configure the DonkeyCar project

Bash - create the driving application
donkey createcar --path ~/mycar
cd ~/mycar
ls
nano myconfig.py
PathRole
manage.pyDriving loop, hardware connection and web interface
config.pyDefault settings
myconfig.pyPer-vehicle overrides: camera, drivetrain, throttle and steering
data/Recorded demonstration tubs
models/Saved trained autopilot weights

Set the drivetrain, camera and PWM definitions for your actual car. The PCA9685 calibration commands below apply to the legacy channel-based I2C_SERVO arrangement; newer pin-based PWM configurations use their own pin specifiers.

9. Calibrate ESC neutral and servo steering with raised wheels

Live hardware warning: Raise all driven wheels off the floor, leave the track clear and keep an accessible vehicle power cutoff. During calibration, incorrect PWM may accelerate the motor unexpectedly or push the steering linkage past its stop.

For a legacy PCA9685 controller configured with channel-based I2C_SERVO outputs, the official calibration workflow uses these commands:

Bash - steering servo on CH1
donkey calibrate --channel 1 --bus 1
Bash - motor ESC on CH0
donkey calibrate --channel 0 --bus 1

Determine full-left and full-right steering endpoints without mechanical whining or forcing the linkage. Determine reverse, neutral and forward throttle according to your specific ESC manual, with no wheel contact with the floor. Record measured values in myconfig.py, including STEERING_LEFT_PWM and STEERING_RIGHT_PWM for legacy drivetrains. Confirm zero throttle produces zero wheel creep.

For newer PWM_STEERING_THROTTLE and other pin-specifier configurations, use donkey calibrate --pwm-pin=... with the actual pin specification; do not copy the legacy --channel command onto an unrelated actuator board. An L298N differential drivetrain does not use this ESC neutral procedure.

10. Start manual driving through a web browser or gamepad

Bash - launches real car drive application
cd ~/mycar
source ~/env/bin/activate
python manage.py drive

When the browser server is running, open the car's local hostname at http://donkeycar.local:8887 or the IP address and port reported by the application. Select User mode. Start with the vehicle raised and verify steering, throttle and stopping. Then test on an isolated slow-speed track.

Official DonkeyCar web driving interface with control and recording options
DonkeyCar web driving interface from its official documentation.
Web controller / keyboardAction
spaceStop car and recording
rToggle recording
i / kIncrease / decrease throttle
j / lSteer left / right
Web touchscreen / joystickSteering and throttle in User mode

For an attached supported physical gamepad, start the controller mode:

Bash - gamepad mode
cd ~/mycar
python manage.py drive --js

If steering goes the wrong way, stop and revisit the physical endpoints and sign configuration. Do not try to compensate for motor wiring errors by increasing throttle.

11. Record and inspect a DonkeyCar training dataset

Drive on a closed course in User mode. The recording pipeline associates each camera image with the steering and throttle used when it was captured. The output is a DonkeyCar tub dataset in the application's data/ folder.

Diagram 3 - Camera data, behavioral cloning and inference

Human driving
→
Frames + steering + throttle
→
Tub dataset
↓
Clean bad demonstrations
→
Train CNN using DonkeyCar
→
Model weights
↓
Camera on track
→
Predicted steering / throttle
→
Supervised driving
Show the Mermaid source
flowchart TD
 A["Human drives manually"] --> B["Camera image + steering + throttle"]
 B --> C["Recorded DonkeyCar tub"]
 C --> D["Remove faulty segments"]
 D --> E["Train behavior-cloning CNN"]
 E --> F["Saved autopilot model"]
 F --> G["Run model on new frames"]
 G --> H["Steering / throttle prediction"]
 H --> I["Supervised driving on closed track"]
Imitation learning learns to reproduce demonstrated actions; model training does not certify safe driving.
  1. Drive several careful practice laps before activating recording.
  2. Keep a stable camera angle and consistent track lighting.
  3. Record manual driving with tight corners, straight sections and appropriate recovery examples.
  4. Stop recording when the vehicle crashes or drives off the track; remove these mistakes.
  5. Review camera frames and corresponding actions before sending the dataset for training.

The tutorial's older reference workflow suggests 10-20 clean laps, around 5,000-20,000 camera frames. This is an example collection size, not a guaranteed training threshold. Review training quality before deciding how many additional laps to record.

Bash - clean recordings using official tub tool
cd ~/mycar
donkey tubclean data

12. Transfer the data to a training computer and fit the autopilot

For a more powerful Linux training computer with a DonkeyCar installation compatible with the car's version, copy the tub data:

Bash - data transfer
rsync -rv --progress --partial \
  username@donkeycar.local:~/mycar/data/ \
  ~/mycar/data/

The official training guide documents the following command. It is an example from a documentation section that also contains older Keras and TFLite instructions. For a current Keras 3 installation, verify the output extension reported by the installed CLI and use its supported native model format if required.

Bash - documented training example
cd ~/mycar
donkey train --help
donkey train \
  --tub ./data \
  --model ./models/mypilot.h5

The current package's release notes describe the transition to Keras 3 and support for the .keras format. Do not assume an old .tflite checkpoint remains compatible after a major release change; regenerate it using the installed version if the supported workflow provides conversion.

Consistent image cropping, masking, camera orientation, and model type are essential. Use the same settings on both the training computer and the Raspberry Pi.

Bash - return models to the vehicle
rsync -rv --progress \
  ~/mycar/models/ \
  username@donkeycar.local:~/mycar/models/

13. Run a learned driving model and evaluate it

Start with a valid trained file in the models/ folder. The official legacy example is:

Bash - physically capable model inference
cd ~/mycar
python manage.py drive \
  --model ~/mycar/models/mypilot.h5

For a matching supported TFLite model in that documentation generation:

Bash - historical TFLite pilot example
python manage.py drive \
  --model ~/mycar/models/mypilot.tflite \
  --type tflite_linear

Always inspect the installed DonkeyCar version's supported model format and pilot type before running either command. Start in User mode and then select the limited pilot steering mode on a controlled circuit. The user should retain control of throttle or a physical stop during initial autonomous tests.

Diagram 4 - Supervised autonomy gate

Check calibrated steering
→
Review recorded data
→
Train compatible model
↓
Evaluate on replay / simulator
→
Low-speed closed track
→
Manual stop always available
Show the Mermaid source
flowchart TD
 A["Calibrate steering / ESC"] --> B["Review tub data"]
 B --> C["Train compatible model"]
 C --> D["Replay / simulator evaluation"]
 D --> E["Low-speed closed-course pilot"]
 E --> F{"Stays on track?"}
 F -- No --> G["Stop, inspect labels and geometry"]
 G --> B
 F -- Yes --> H["Repeat supervised trials"]
A working model file is not proof the vehicle will stay within its lane.

14. Practical Python tool: inspect recorded dataset files

This script examines files in local tub folders without commanding steering or throttle. DonkeyCar tub storage layouts vary by version, so it reports legacy JSON counts but does not assume all datasets use separate JSON records.

Python - save as inspect_donkey_data.py
from pathlib import Path

data_dir = Path.home() / "mycar" / "data"

if not data_dir.exists():
    raise SystemExit("No tub directory was found.")

tubs = [p for p in data_dir.iterdir() if p.is_dir()]
print("Tub directories:", len(tubs))

for tub in sorted(tubs):
    images = list(tub.glob("*.jpg"))
    legacy_records = list(tub.glob("record_*.json"))
    catalogs = list(tub.glob("*catalog*"))

    print(
        tub.name,
        "JPG:", len(images),
        "legacy JSON records:", len(legacy_records),
        "catalog files:", len(catalogs),
    )

print("File counts do not measure demonstration quality.")
Bash - run the analyzer
python inspect_donkey_data.py

15. Diagnosing DonkeyCar hardware and learned driving

ProblemWhat to inspect
Camera cannot startCSI ribbon orientation, Picamera2 and camera-driver compatibility
Missing 0x40 in I2C scanLogic power, SDA, SCL and turn on I2C
Wheels do not turnBattery, ESC arming state and PWM calibration
Steering operates backwardsServo channel, steering endpoints and sign mapping
Servo whines at lockSteering endpoint exceeds linkage's physical travel
Car moves while throttle is neutralESC neutral calibration; stop before track driving
Application does not startPython environment, package dependencies and myconfig.py
Browser cannot connectHostname, IP address, Wi-Fi and port 8887
Autopilot leaves trackTraining labels, lighting, camera angle, crop and model format
Steering oscillatesThrottle speed, oversensitive pilot or insufficient clean demonstrations

Never test autonomous DonkeyCar driving on public roads or around people. The first valid result is a car that can start, show camera frames, respond to safe manual steering and throttle commands, and complete an isolated lap with no unexpected motor behavior.

Reference material: official DonkeyCar documentation, DonkeyCar framework README, Raspberry Pi camera setup, calibration, driving and training manuals. Electronic examples are for the specified ESC-and-servo drivetrain. No physical vehicle was assembled or tested for this article.

BUILD / PROGRAM / TEST

Complete practical guide: DonkeyCar

DonkeyCar is a small wheeled vehicle that learns a driving policy from camera images and recorded steering and throttle. The data is only useful when the camera and manual control calibration remain consistent.

1. Files, parts and fabrication

  1. Choose the documented RC chassis, steering servo, ESC, camera, controller and Raspberry Pi. Fit the camera with a rigid mount and record its angle.
  2. Secure the Pi, battery and controller; route cables away from wheels and steering linkage. Use printed mounting parts only as specified for your chassis.
  3. Raise the powered wheels off the ground before connecting the drive controller.

2. Software installation and configuration

  1. Install DonkeyCar with the Python environment and hardware dependencies listed for the selected release. Create a project with donkey createcar --path ~/mycar.
  2. Edit myconfig.py for the actual drive hardware and camera. Calibrate throttle neutral, minimum and maximum and steering centre and travel with the documented procedure.
  3. Start manual driving with python manage.py drive from the project directory. Use the supported browser or gamepad controls; verify camera frames and steering feedback.

Commissioning diagram

  1. 1Camera frame
  2. 2Manual steer and throttle
  3. 3Recorded tub
  4. 4Trained model
  5. 5Simulated then supervised driving
The recording ties camera images to human steering. Changes in camera angle or steering scale affect the learned policy.
Mermaid diagram source
flowchart TD
  N0["Camera frame"]
  N1["Manual steer and throttle"]
  N2["Recorded tub"]
  N3["Trained model"]
  N4["Simulated then supervised driving"]
  N0 --> N1
  N1 --> N2
  N2 --> N3
  N3 --> N4

3. Power-on preparation and first movement

  1. On a raised chassis verify neutral throttle, steering centre and controlled stop. Do not proceed if the wheels creep at neutral.
  2. Drive slowly on a closed route using the manual interface; establish a consistent line before recording.
  3. Record short clean episodes and review frames and steering values. Remove unusable recordings before training.

4. Programming exercise

Use the documented project and training commands. Train only after data review and confirm the installed CLI syntax with donkey train --help.

Bash Documented development workflow
donkey createcar --path ~/mycar
cd ~/mycar
# Configure and calibrate hardware before driving.
python manage.py drive
# On a compatible training computer after recording:
donkey train --help
# Example with a reviewed dataset and matching model format:
donkey train --tub ./data --model ./models/mypilot.h5

The driving app provides manual control and recordings; training produces a model file for the matching runtime. Model creation alone is not evidence of safe autonomy.

5. Progress to practical operation

  1. Review driving samples for consistent camera position and clean steering labels. Collect more manual examples of difficult turns rather than retaining bad runs.
  2. Test the learned model in the supported simulator and monitor steering behavior before physical deployment.
  3. Use a supervised closed track and restricted throttle for initial autonomous laps; retain immediate manual stop access.

6. Software and hardware diagnostics

Car creeps with zero command
Recalibrate ESC neutral and verify it on the raised chassis.
Camera recording blank or delayed
Check the camera configuration, connection and frame rate.
Model repeatedly leaves track
Inspect recordings, camera mount and steering calibration; retrain after correcting data.

Technical basis: DonkeyCar installation, calibration, recording and training documentation. Programming examples are identified as simulation, offline analysis or documented interface instructions. No physical commissioning test is claimed.

BUILD ROUTE

DonkeyCar roll cage and RC chassis calibration

Documented RC-based autonomous vehicle

Start with a compatible RC chassis or documented preassembled platform; the software cannot replace its steering and ESC hardware.

From parts to first test 5 steps

  1. Buy a supported chassis and electronics

    Use the build guide shopping list to select the RC platform, Pi, compatible camera, steering/ESC controller, battery and mounting hardware.

    Reference 2 ↓
  2. Install the physical components

    Follow the build guide: fit the roll cage/camera mount, secure the Pi and servo shield/controller, then connect the steering servo and ESC to their documented channels.

    Reference 2 ↓
  3. Install the vehicle software

    Use the DonkeyCar repository's installation guide for the board and Python version, and create the car configuration based on the documented hardware template.

    Reference 1 ↓
  4. Calibrate steering and throttle

    Lift the drive wheels off the floor. For a Donkey Hat, use donkey calibrate --pwm-pin=PIGPIO.BCM.13 for steering and donkey calibrate --pwm-pin=PIGPIO.BCM.18 for throttle; other shields require their own channel arguments. Record endpoints and neutral values in myconfig.py; verify neutral throttle before driving.

    Reference 4 ↓
  5. Collect manual driving data before autonomy

    Run the documented driving workflow on a safe course, verify camera recording and command response, then use the project's training and deployment procedure for the collected data.

    Reference 1 ↓

Parts, files and official manuals 4 references

WORKSHOP / HANDS-ON GUIDE

RC chassis and camera learning loop

Practical implementation notes for DonkeyCar. Use the exact hardware and software revision specified in the project documentation.

Tools and equipment

  • RC tools
  • screwdriver
  • microSD writer
  • multimeter
  • supported Pi and camera
  • steering servo
  • ESC and Donkey-compatible controller

Component illustration

  1. 1Camera mount
  2. 2Pi / controller
  3. 3Steering servo
  4. 4Rear drive
Functional component schematic, not a physical photograph, dimensional drawing or complete wiring pinout. Match actual components to the released mechanical drawings.

Control architecture

  1. 01Camera / driver input
  2. 02DonkeyCar vehicle loop
  3. 03Servo / ESC output
  4. 04RC car
Logical command path for this revision. Feedback, safety limits and power connections must be checked against the original documentation.

Mechanical preparation and assembly

Secure the Pi, camera and controller to the chassis. Fix the camera angle before recording data; route the steering and ESC connectors to the correct controller outputs. Raise the vehicle so the driven wheels can rotate without moving it.

Electrical setup and calibration

Install the correct vehicle configuration and identify your PWM controller. Calibrate steering and throttle independently; find neutral throttle before putting the car down. Store calibrated settings in myconfig.py and keep battery power disconnected during wiring.

Software setup and programming

Create the DonkeyCar application in the installed Python environment. Run the manual driving application and record steering, throttle and camera frames on a closed course. After reviewing the recorded examples, train an autopilot using the matching framework and test it in the simulator before physical autonomy.

First test and acceptance criteria

Check camera alignment and neutral throttle on every startup. Stop data collection if the camera moves or control commands are inconsistent; such records train incorrect steering behavior.

Programming and configuration example

Manual drive command may activate hardware; run only with correct neutral throttle and supported vehicle. The training command is commented until recordings are ready.

BASH Revision-specific example
donkey createcar --path ~/mycar
cd ~/mycar
# Configure and calibrate the actual drive hardware first.
python manage.py drive
# On the training machine, after transferring a reviewed dataset:
# donkey train --tub ./data --model ./models/mypilot.h5

Troubleshooting

A car that creeps at zero command needs throttle recalibration before driving. A camera frame that lacks the track center or a shifted camera angle makes recorded labels unreliable.

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.

A robot body based on an RC chassis

The build guide recommends selecting a supported RC car before printing attachments. The top plate and roll bar mount to that chassis; some variants need their own printed adapters and different screw lengths.

The parts list includes a Raspberry Pi, camera, battery, servo driver or HAT and fasteners. A printer-only parts calculation excludes most of the electronics.

Print and mount the camera cage

The original hardware guide describes printing a roll cage and top plate, cleaning holes and fastening the assembly to the car. Printing parameters in archived examples vary; follow the model-specific settings rather than copying a single material recipe.

A loose camera or power cable causes unstable video and sometimes mechanical steering interference. Secure these before running a drive loop.

Calibration depends on drivetrain electronics

DonkeyCar's calibration guide defines steering PWM endpoints and forward, neutral and reverse ESC values. Some L298N-style drivetrains use duty-cycle control and do not need the same throttle calibration procedure.

The current Python package uses uv-based environment setup; older tutorials may use legacy virtualenv or pip assumptions. Keep camera and package versions aligned with your Raspberry Pi OS.

03 / PRACTICAL QUESTIONS

STL variants, steering PWM and simulator use

Answers are based on published source material and project documentation. Their order does not represent search volume.

01Can I use any RC car chassis?

DonkeyCar supports custom builds, but printed mounts and steering connections differ. The official guide recommends several tested starting chassis.

Sources Official project documentation

02Where are the STL files for the roll cage?

The hardware guide links printable roll bars, top plates and adapters. Select the files matching your car model rather than printing a generic set.

Sources Official project documentation

03Why does the car steer in the wrong direction?

Check servo channel wiring and steering PWM endpoints with the DonkeyCar calibration process before changing autonomous control settings.

Sources Official project documentation

04Does every drivetrain need ESC throttle calibration?

No. The official calibration guide distinguishes servo/ESC PWM from L298N differential drives that use duty-cycle control.

Sources Official project documentation

05Can I train a model without a physical DonkeyCar?

The core project includes a simulator. A trained simulator policy does not guarantee safe driving on the real chassis.

Sources Official project documentation

06What Python environment is required now?

The current project README uses uv and platform-specific dependencies. Older venv or camera tutorials may need updating.

Sources Official project documentation

DonkeyCar: 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.

ItemProject record
Cost record / BOM targetParts list varies by chassis and Pi version; historical list is not a current quote
Software licenceMIT (core DonkeyCar repo)
Hardware licence3D body is variant-dependent; inspect part-specific license
Simulation availabilityOfficial self-driving simulator supported for software experiments
Build difficultyIntermediate

How to obtain the robot or its parts

Use the DonkeyCar 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: Camera mount → Pi / controller → Steering servo → Rear drive.

Operational signal path (conceptual); not a manufacturer circuit diagram.
  1. Camera / driver input
  2. DonkeyCar vehicle loop
  3. Servo / ESC output
  4. RC car

Feedback, fault detection and the approved stop function constrain the command path.

Create the DonkeyCar application in the installed Python environment. Run the manual driving application and record steering, throttle and camera frames on a closed course. After reviewing the recorded examples, train an autopilot using the matching framework and test it in the simulator before physical autonomy.

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: Check camera alignment and neutral throttle on every startup. Stop data collection if the camera moves or control commands are inconsistent; such records train incorrect steering behavior.

Power, battery replacement and cycle life

Use the RC chassis pack and charger specified for your build; account separately for the Pi supply.

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

WhenInspection and evidence
Before operationCheck steering center, camera mount, ESC calibration and wheel traction; rerun the same recorded driving test after replacing chassis parts.
After a fault or impactInstall the correct vehicle configuration and identify your PWM controller. Calibrate steering and throttle independently; find neutral throttle before putting the car down. Store calibrated settings in myconfig.py and keep battery power disconnected during wiring.
After software or parts changeRecord versions and replaced part serials; compare the same approved test with the earlier baseline. Stop on new errors or unexpected movement.
At manufacturer service intervalsUse the documented interval and authorized service procedures. No universal calendar or lubricant is assumed.
At end of serviceAsk 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.

05 / SOURCES

Original documentation

  1. Current installation instructions
  2. Official assembly and setup
  3. Hardware and printed part guide
  4. Steering / throttle calibration

Found a changed specification? Submit a correction with its source ↗

← Back to the open-source index

How to install the software mentioned on this page

Choose only the tools required for your project. The commands below describe development and simulation setup, not proof of compatibility with a specific physical robot. Match the versions in the original project and test offline before connecting hardware.

Python Windows, macOS, Linux

Install the Python release required by your robot or library. On Windows use the official installer; on Ubuntu use the distribution package. Create a separate virtual environment for each project.

Installation / setup commands

python -m venv .venv
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1
# Linux or macOS:
source .venv/bin/activate

Verify the installation

python --version python -m pip --version

Official instructions: https://www.python.org/downloads/

Git Windows, macOS, Linux

Install Git from the official download page or your package manager. On Ubuntu the commands below install the command-line client; on Windows run Git for Windows.

Installation / setup commands

sudo apt update
sudo apt install git

Verify the installation

git --version

Official instructions: https://git-scm.com/downloads

TensorFlow Supported Python and OS

Check the official platform requirements for GPU support; Windows native GPU support differs by release.

Installation / setup commands

python -m pip install tensorflow

Verify the installation

python -c "import tensorflow; print('Import OK')"

Official instructions: https://www.tensorflow.org/install/pip

Donkeycar Supported Linux host or Windows WSL; supported robot computer

Use the official setup page for your host and robot computer. The Windows route uses WSL. Install the documented Python environment and robot-specific dependencies. Use the simulator first.

Verify the installation

donkey --help

Official instructions: https://docs.donkeycar.com/guide/install_software/

ROS (version to confirm) Platform depends on the ROS distribution

Confirm whether the project requires ROS 1 or ROS 2 before installing. For a new project use a supported ROS 2 release; the Jazzy example requires Ubuntu 24.04. Follow the distro-specific repository instructions.

Verify the installation

For ROS 2 run ros2 --help after sourcing the setup file.

Official instructions: https://docs.ros.org/en/jazzy/Installation.html