This is the very early stage of an implementation of Donkey Car components in modern C++.
- Donkey Car is a self-driving car platform for hobby remote-control cars.
- Why? Good times.
![]() |
- Polymorphic architecture between
VehicleandPart(Parts are cameras, networks, computer vision components, etc). - Smart-pointer, generic, polymorphic architecture for
Partinput and output data. The implementation of a Part may operate on a specific data type, e.g. adonkeycar::Imageor may need to be generic to operate on multiple data types, e.g.NetworkPublisherMqtt<Pose>,NetworkPublisherMqtt<Image>. This is supported. - Native, managed, thread support within Parts. A Part is a
pthreadthat can be paused, resumed and joined with grace and care. - Thread-safe, locked hashtable for Part I/O data passing, sharing and storage.
- Architecture between
VehicleandPart - Architecture for
Partinput and output data. - Parts as managed threads
- Part I/O data storage and sharing
- Initial Support for Camera Parts:
ImageListCamera(for iterating overTubjpegs from disk) and a generic webcamWebCamera - Throttle the
Vehiclerun loop to a specified frequency - Significant unit-test coverage (always a WIP)
-
.clang-formatall code - Autonomy support for CV-based line-following
- Autonomy support for Advanced CV-based line-following (WIP)
- Autonomy support for the Imitation Learning keras/TF-lite model (WIP)
- Support for Network Parts (mqtt and zmq with pub/sub semantics)
- Support for Tub_v2
- GPIO HW support
- ...
Docker is effectively required, unless you're already working with:
- Tensorflow v2.13.0
- OpenCV >= 4.6.0
# Build the image
./docker/build-image.sh
# Edit the paths within this script, then run the container
./docker/run-image.sh
# Build donkeycarGT by making a build directory (i.e. `build/`), run `cmake` in that dir, and then use `make` to build the desired target.
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=[Debug | Coverage | Release] -DTFLITE_ENABLE_XNNPACK=OFF
# or to modify the graph at runtime with the TFLite GPU delegate
# cmake .. -DCMAKE_BUILD_TYPE=[Debug | Coverage | Release] -DTFLITE_ENABLE_XNNPACK=OFF -DTFLITE_ENABLE_GPU=ON
make
./donkeyCarGT
make test # Makes and runs the tests.
make coverage # Generate a coverage report.
make doc # Generate html documentation.