Skip to main content
Donkeycar supports three distinct autopilot approaches, each suited for different racing scenarios and skill levels.

Autopilot Types

1. Deep Learning Autopilot

The most popular approach, using neural networks trained on driving data to predict steering and throttle. How it works:
  • Collect training data by manually driving your car
  • Train a neural network model using TensorFlow or PyTorch
  • Deploy the trained model for autonomous driving
Best for:
  • Complex tracks with varying conditions
  • Racing scenarios requiring smooth control
  • Users comfortable with machine learning workflows
See: Deep Learning Training

2. Computer Vision Autopilot

Uses OpenCV and traditional computer vision techniques to follow lines or detect features. How it works:
  • Configure color thresholds and image processing parameters
  • Use PID controllers to follow detected lines
  • No training data required
Best for:
  • Simple line-following tasks
  • Testing and prototyping
  • Environments where collecting training data is difficult
  • Users who want immediate results without training
See: Computer Vision Autopilot

3. GPS Path Following Autopilot

Records and follows GPS waypoint paths using position sensors like GPS modules or Intel RealSense T265. How it works:
  • Drive manually to record a path of waypoints
  • Save the path with position and optionally throttle data
  • Follow the recorded path using PID control and cross-track error
Best for:
  • Outdoor racing with GPS coverage
  • Precise path following
  • Repeatable autonomous missions
  • Indoor odometry with wheel encoders or T265
See: GPS Path Following

Choosing an Autopilot Type

CriteriaDeep LearningComputer VisionGPS Path Following
Training RequiredYes (20+ min driving)NoYes (1 lap)
Setup ComplexityMediumLowMedium-High
Track AdaptabilityHighLowMedium
Hardware RequiredCameraCameraGPS/T265/Encoders
PerformanceExcellentGoodExcellent
Tuning RequiredMinimalSignificantModerate

Data Collection

For both deep learning and GPS path following, you’ll need to collect training data: Deep Learning:
  • Drive smoothly for 10-20 minutes
  • Collect diverse examples (centerline, recovery, turns)
  • Aim for 10,000-20,000 frames
GPS Path Following:
  • Drive one complete lap of your track
  • Maintain consistent speed
  • Start and end at approximately the same position
See: Data Collection Guide

Training Workflow

Typical deep learning training workflow:
  1. Collect Data - Drive manually to record training data
  2. Review Data - Clean and filter bad frames using donkey tubclean
  3. Train Model - Run donkey train to create a model
  4. Test Model - Deploy and test in autopilot mode
  5. Iterate - Collect more data or adjust hyperparameters

Model Architectures

Donkeycar includes several pre-built model architectures:
  • Linear - Simple CNN outputting continuous steering/throttle
  • Categorical - CNN with categorical outputs (discrete bins)
  • LSTM - Recurrent network using temporal sequences
  • 3D CNN - 3D convolutions over image sequences
  • IMU - Multi-input model combining camera and IMU data
  • Behavioral - Conditional model for multiple driving behaviors

Next Steps

Data Collection

Learn how to collect high-quality training data

Deep Learning

Train neural network models with TensorFlow/PyTorch

Computer Vision

Configure line-following with OpenCV

GPS Autopilot

Record and follow GPS waypoint paths

Build docs developers (and LLMs) love