DonkeyCar for JetRacer ROS Tutorial VI: Training Data

From Waveshare Wiki
Jump to: navigation, search

DonkeyCar for JetRacer ROS Tutorial

Training Data

  • As it is slow to train Jetson Nano, we need to transfer the data to the PC for training.
  • In this chapter, we will introduce how to train the data in a PC.
  • Open a new terminal in the PC, transfer the data of Jetson Nano to the copied data file of PC by rsync.
 rsync -rv --progress --partial 5@<your_pi_ip_address>:~/mycar/data/  ~/mycar/data/

Among which, use the actual IP address of Jetson Nano to replace <your_pi_ip_address>.

  • Training model
conda activate /home/jetson/miniconda3/envs/donkey   #Enter donkey virtual environment
python ~/mycar/manage.py train --tub <tub folder names comma separated> --model ./models/mypilot.h5

Where <tub folder names comma separated> is replaced with the actual path, such as ./data/* or ./data/tub_?_20-01-18.
DonkeyCar for Jetson Nano 7-1.png

  • The training data may cost you a long time, please be patient.
  • After training, you can get the training data model. We can transfer it back to the Jetson Nano so as to test whether the trained model can drive autonomously.
rsync -rv --progress --partial ~/mycar/models/ jetson@<your_ip_address>:~/mycar/models/