Now the official Donkey Car is no longer provided with a lazy person's version, so this time we will share the process of installing Donkey Car on a Raspberry Pi (Raspberry Pi 3 B+).
How to flash install Raspberry Pi, here is no more.
Assume you have already installed the Raspberry Pi system and can connect to the network, you can choose to connect to the display directly (this example's operation mode), or remotely SSH. You like it.
After a long wait, it will be installed, if an error occurs, please run it again.
(If the problem is still not resolved, please share the problem you encountered in the comments section, and post your system version, as much information as possible, so we can help you.)
After running the above commands, the command line will have a (env) prefix, indicating that we are operating in an environment called env.
The purpose of the virtual environment is to avoid errors in other projects when updating a dependency or automatically clearing a dependency on the Raspberry Pi running multiple projects.
Now, every time the Raspberry Pi starts, it will automatically enter the env virtual environment. If you want to exit, enter the command line: deactivate .
Then, start a long wait, because the speed of github in China is not fast, please be patient, if it doesn't work, run it again.
Note: If you are familiar with command line instructions, you can use the scp command to download some software projects after packaging, and upload them to the current directory of the Raspberry Pi. For specific usage, please search for it yourself.
When git clone (clone) is complete, we use the following command to operate:
pip install tensorflow==1.13.1
Note:
– When running pip install -e .[pi] installation, if an error occurs, you can try to run it again.
– When running pip install tensorflow==1.13.1 , it may prompt that the downloaded file's hash code is incorrect, causing it to be unable to download. You can manually use the wget command to download it according to the error prompt, download it, and then use pip install 「downloaded file name」 to install it.
Now the official Donkey Car is no longer provided with a lazy person's version, so this time we will share the process of installing Donkey Car on a Raspberry Pi (Raspberry Pi 3 B+).
How to flash install Raspberry Pi, here is no more.
Assume you have already installed the Raspberry Pi system and can connect to the network, you can choose to connect to the display directly (this example's operation mode), or remotely SSH. You like it.
After a long wait, it will be installed, if an error occurs, please run it again.
(If the problem is still not resolved, please share the problem you encountered in the comments section, and post your system version, as much information as possible, so we can help you.)
After running the above commands, the command line will have a (env) prefix, indicating that we are operating in an environment called env.
The purpose of the virtual environment is to avoid errors in other projects when updating a dependency or automatically clearing a dependency on the Raspberry Pi running multiple projects.
Now, every time the Raspberry Pi starts, it will automatically enter the env virtual environment. If you want to exit, enter the command line: deactivate .
Then, start a long wait, because the speed of github in China is not fast, please be patient, if it doesn't work, run it again.
Note: If you are familiar with command line instructions, you can use the scp command to download some software projects after packaging, and upload them to the current directory of the Raspberry Pi. For specific usage, please search for it yourself.
When git clone (clone) is complete, we use the following command to operate:
pip install tensorflow==1.13.1
Note:
– When running pip install -e .[pi] installation, if an error occurs, you can try to run it again.
– When running pip install tensorflow==1.13.1 , it may prompt that the downloaded file's hash code is incorrect, causing it to be unable to download. You can manually use the wget command to download it according to the error prompt, download it, and then use pip install 「downloaded file name」 to install it.
Using Colab requires a VPN, and also needs to upload data to Google, the upload time varies from person to person, I uploaded it for about 2-3 minutes, the rest is executing the code and training. The first execution of the code needs to understand what the principle is, and the subsequent execution basically does not take much time, but the training time using GPU, I have 6k images, training about 30-40 epochs early, the training time is less than 1 minute! Each Epoch only needs 1-2 seconds.
Then using my Macbook Pro training, because of the lack of GPU, each Epoch needs 30-50 seconds, training down, it takes about 40 minutes to 1 hour to complete.
Convenience
If you don't have a VPN, of course, Colab is not a choice, I know Baidu also provides some limited free servers, which can be tested later, but with a VPN, Google Colab is the best choice. Below is how to start training
I used mycar as the project name, you can change it, but you need to modify the code after renamingIn [5]:
!donkey createcar --path /content/mycar
using donkey v3.1.0 ...
Creating car folder: /content/mycar
making dir /content/mycar
Creating data & model folders.
making dir /content/mycar/models
making dir /content/mycar/data
making dir /content/mycar/logs
Copying car application template: complete
Copying car config defaults. Adjust these before starting your car.
Copying train script. Adjust these before starting your car.
Copying my car config overrides
Donkey setup complete.
Using Colab requires a VPN, and also needs to upload data to Google, the upload time varies from person to person, I uploaded it for about 2-3 minutes, the rest is executing the code and training. The first execution of the code needs to understand what the principle is, and the subsequent execution basically does not take much time, but the training time using GPU, I have 6k images, training about 30-40 epochs early, the training time is less than 1 minute! Each Epoch only needs 1-2 seconds.
Then using my Macbook Pro training, because of the lack of GPU, each Epoch needs 30-50 seconds, training down, it takes about 40 minutes to 1 hour to complete.
Convenience
If you don't have a VPN, of course, Colab is not a choice, I know Baidu also provides some limited free servers, which can be tested later, but with a VPN, Google Colab is the best choice. Below is how to start training
I used mycar as the project name, you can change it, but you need to modify the code after renamingIn [5]:
!donkey createcar --path /content/mycar
using donkey v3.1.0 ...
Creating car folder: /content/mycar
making dir /content/mycar
Creating data & model folders.
making dir /content/mycar/models
making dir /content/mycar/data
making dir /content/mycar/logs
Copying car application template: complete
Copying car config defaults. Adjust these before starting your car.
Copying train script. Adjust these before starting your car.
Copying my car config overrides
Donkey setup complete.
Donkey Car is an open-source, small-scale DIY autonomous driving platform, and it might be your best entry-level AI learning platform. Donkey is a high-level autonomous driving library written in Python, characterized by its ability to help you quickly learn machine learning, experiment rapidly, and integrate applications of computer vision and machine learning tools (such as tornado, keras, tensorflow, opencv, etc.).
Donkey Car is a Python-based open-source project designed to help users build and train autonomous vehicles. It is intended to allow users to easily experiment with autonomous driving technology at home or in a lab. The hardware part of Donkey Car typically consists of a small remote-controlled car, a Raspberry Pi, a camera, and a battery. The software part is a powerful Python library that supports multiple machine learning frameworks.
Easy to Get Started: Donkey Car is designed to be very intuitive, allowing even those without programming experience to get started quickly. It provides detailed documentation and tutorials to guide users through the entire process from hardware assembly to software configuration.
Community Support: As an open-source project, Donkey Car has an active community. Whatever issues you encounter, you can find answers or seek help within the community.
Flexibility: Donkey Car supports multiple machine learning frameworks, such as TensorFlow and Keras, allowing users to choose the right tools for their experiments based on their needs.
Cost-Effective: Compared to other autonomous driving platforms, Donkey Car is relatively low-cost, making it ideal for hobbyists and educational institutions.
To start using Donkey Car, you need to prepare the following materials:
A small remote-controlled car
Raspberry Pi
Camera
Battery
3D printed car frame (optional)
Next, you can follow the official documentation to assemble the hardware and install the software. Donkey Car's official GitHub page provides detailed installation steps and example code to help you quickly build your own autonomous vehicle.
Donkey Car is a project well-suited for AI beginners. Through this platform, you can learn the basic principles of autonomous driving and master the fundamentals of machine learning and computer vision. Whether you want to enter the AI field or are simply interested in autonomous driving technology, Donkey Car is an ideal starting point.
I hope this article helps you better understand Donkey Car and inspires your interest in autonomous driving technology. Join the Donkey Car community and start your AI learning journey today!
Donkey Car is an AI autonomous driving model car project led by Adam Conway (Twitter) since October 2016. With the rise of AI and autonomous driving technologies in recent years, this project has attracted more enthusiasts, forming the DonkeyCar community.
This tutorial aims to help DonkeyCar beginners get started quickly. If you have any questions or suggestions, feel free to provide feedback.
The original Donkey Car was modified from the "Exceed" brand 1/16 four-wheel-drive toy car. The official documentation recommends the following models:
These cars have the same electronic drive modules, differing only in tires and body mounting methods. Note that the Desert Monster, Short Course Truck, and Blaze require an adapter to secure the Donkey Car motherboard and handle, which can be purchased or 3D printed. These cars are standard configurations, mostly plug-and-play. They come in brushed and brushless motor versions; the author suggests using the brushed motor version as it's easier to train, better for rough surfaces, and cheaper.
Later, enthusiasts began modifying 1/10 scale toy cars, making them larger and upgrading to the Donkey Car Pro version. The Pro version offers better performance but at a higher cost. Supported models include:
Donkey Car has two versions based on the mainboard: one using Raspberry Pi and the other using Jetson Nano. Apart from the mainboard, the required parts and software installation differ.
If you need to buy parts individually, refer to the author's links. Note that if you assemble it yourself, you'll need to 3D print Donkey Car parts. If you don't have a 3D printer, consider buying one from Beets3D.
For specific printed parts, refer to the official documentation, link.
For faster performance, choose Jetson Nano with a GPU as the mainboard. Besides changing the mainboard, you'll need a Jetson Nano adapter, network card, and compatible camera (see this article).
Jetson Nano Adapter
Note that Jetson Nano's pin layout is opposite to Raspberry Pi's, so be careful when using other expansion boards.
If you don't have a 3D printer, buy printed parts from our store or find a third-party printer. For PLA printing, set layer height to 2mm and infill to 30%. Printing a set of parts takes about 2 days. Here's the model download link.
The installation is straightforward; use M3 screws to connect the baseplate and handle. Ensure the screws are tight, as you'll use the handle to lift the car.
At this point, insert the pre-burned SD card into the Raspberry Pi slot. Then, mount the Raspberry Pi and servo controller on the baseplate using screws. Use M2.6 screws.
Donkey Car is an open-source, small-scale DIY autonomous driving platform, and it might be your best entry-level AI learning platform. Donkey is a high-level autonomous driving library written in Python, characterized by its ability to help you quickly learn machine learning, experiment rapidly, and integrate applications of computer vision and machine learning tools (such as tornado, keras, tensorflow, opencv, etc.).
Donkey Car is a Python-based open-source project designed to help users build and train autonomous vehicles. It is intended to allow users to easily experiment with autonomous driving technology at home or in a lab. The hardware part of Donkey Car typically consists of a small remote-controlled car, a Raspberry Pi, a camera, and a battery. The software part is a powerful Python library that supports multiple machine learning frameworks.
Easy to Get Started: Donkey Car is designed to be very intuitive, allowing even those without programming experience to get started quickly. It provides detailed documentation and tutorials to guide users through the entire process from hardware assembly to software configuration.
Community Support: As an open-source project, Donkey Car has an active community. Whatever issues you encounter, you can find answers or seek help within the community.
Flexibility: Donkey Car supports multiple machine learning frameworks, such as TensorFlow and Keras, allowing users to choose the right tools for their experiments based on their needs.
Cost-Effective: Compared to other autonomous driving platforms, Donkey Car is relatively low-cost, making it ideal for hobbyists and educational institutions.
To start using Donkey Car, you need to prepare the following materials:
A small remote-controlled car
Raspberry Pi
Camera
Battery
3D printed car frame (optional)
Next, you can follow the official documentation to assemble the hardware and install the software. Donkey Car's official GitHub page provides detailed installation steps and example code to help you quickly build your own autonomous vehicle.
Donkey Car is a project well-suited for AI beginners. Through this platform, you can learn the basic principles of autonomous driving and master the fundamentals of machine learning and computer vision. Whether you want to enter the AI field or are simply interested in autonomous driving technology, Donkey Car is an ideal starting point.
I hope this article helps you better understand Donkey Car and inspires your interest in autonomous driving technology. Join the Donkey Car community and start your AI learning journey today!
Donkey Car is an AI autonomous driving model car project led by Adam Conway (Twitter) since October 2016. With the rise of AI and autonomous driving technologies in recent years, this project has attracted more enthusiasts, forming the DonkeyCar community.
This tutorial aims to help DonkeyCar beginners get started quickly. If you have any questions or suggestions, feel free to provide feedback.
The original Donkey Car was modified from the "Exceed" brand 1/16 four-wheel-drive toy car. The official documentation recommends the following models:
These cars have the same electronic drive modules, differing only in tires and body mounting methods. Note that the Desert Monster, Short Course Truck, and Blaze require an adapter to secure the Donkey Car motherboard and handle, which can be purchased or 3D printed. These cars are standard configurations, mostly plug-and-play. They come in brushed and brushless motor versions; the author suggests using the brushed motor version as it's easier to train, better for rough surfaces, and cheaper.
Later, enthusiasts began modifying 1/10 scale toy cars, making them larger and upgrading to the Donkey Car Pro version. The Pro version offers better performance but at a higher cost. Supported models include:
Donkey Car has two versions based on the mainboard: one using Raspberry Pi and the other using Jetson Nano. Apart from the mainboard, the required parts and software installation differ.
If you need to buy parts individually, refer to the author's links. Note that if you assemble it yourself, you'll need to 3D print Donkey Car parts. If you don't have a 3D printer, consider buying one from Beets3D.
For specific printed parts, refer to the official documentation, link.
For faster performance, choose Jetson Nano with a GPU as the mainboard. Besides changing the mainboard, you'll need a Jetson Nano adapter, network card, and compatible camera (see this article).
Jetson Nano Adapter
Note that Jetson Nano's pin layout is opposite to Raspberry Pi's, so be careful when using other expansion boards.
If you don't have a 3D printer, buy printed parts from our store or find a third-party printer. For PLA printing, set layer height to 2mm and infill to 30%. Printing a set of parts takes about 2 days. Here's the model download link.
The installation is straightforward; use M3 screws to connect the baseplate and handle. Ensure the screws are tight, as you'll use the handle to lift the car.
At this point, insert the pre-burned SD card into the Raspberry Pi slot. Then, mount the Raspberry Pi and servo controller on the baseplate using screws. Use M2.6 screws.