DonkeyCar for Jetson Nano-Setup Jetson Nano

From Waveshare Wiki
Jump to: navigation, search

Guides of DonkeyCar

Step 1. Install libraries

Please make sure that you have installed the image and that it could start normally. Open the terminal and install the libraries as below

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential python3 python3-dev python3-pip python3-pandas python3-opencv python3-h5py libhdf5-serial-dev hdf5-tools nano ntp

Step 2. Setup virtual environment

sudo pip3 install virtualenv
python3 -m virtualenv -p python3 env
echo "source env/bin/activate" >> ~/.bashrc
source ~/.bashrc

Step 3. Install DonkeyCar Python codes

  • Clone donkey car codes from GitHub
cd ~/projects
cd donkeycar
git checkout master
pip install -e .[nano]
pip install --extra-index-url tensorflow-gpu==1.13.1+nv19.3

Step 4. Create DonkeyCar

  • Create donkeycar example
donkey createcar --path ~/mycar

After running, files will be generated and saved in the directly ~/mycar

  • Open the file and modify the camera parameters.
  • The camera we use is based on Sony IMX219, so we need to change it to CSIC and set the resolution to 224*224
IMAGE_W = 224
IMAGE_H = 224