Difference between revisions of "2021WinterTeam7"

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to navigation Jump to search
Line 48: Line 48:
'''Instructions to get Triton-Racer-Sim to work with UCSD GPU cluster'''
'''Instructions to get Triton-Racer-Sim to work with UCSD GPU cluster'''


1. Install miniconda --> reference: [https://dev.to/waylonwalker/installing-miniconda-on-linux-from-the-command-line-4ad7 https://dev.to/waylonwalker/installing-miniconda-on-linux-from-the-command-line-4ad7]
Step 1. Install miniconda --> reference: [https://dev.to/waylonwalker/installing-miniconda-on-linux-from-the-command-line-4ad7 https://dev.to/waylonwalker/installing-miniconda-on-linux-from-the-command-line-4ad7]
   
   


2.  
Step 2.  
  conda create -n tritonracer python=3.8
  conda create -n tritonracer python=3.8


3.  
Step 3.  
  conda activate tritonracer
  conda activate tritonracer


4.  
Step 4.  
  pip install docopt pyserial tensorflow==2.3.0 pillow keras==2.3.0 opencv-python opencv-contrib-python pygame==2.0.0.dev10 Shapely simple-pid
  pip install docopt pyserial tensorflow==2.3.0 pillow keras==2.3.0 opencv-python opencv-contrib-python pygame==2.0.0.dev10 Shapely simple-pid


5.  
Step 5.  
  conda install scikit-learn
  conda install scikit-learn


6. Copy car program (FROM the jetson nano terminal for now):
Step 6. Copy car program (FROM the jetson nano terminal for now):
  cd ~/projects
  cd ~/projects
  scp -r car_templates <ucsd username>.dsmlp-login.ucsd.edu:~/projects
  scp -r car_templates <ucsd username>.dsmlp-login.ucsd.edu:~/projects
   
   
7. Copy helper files:
Step 7. Copy helper files:
  cd ~/tritonracer
  cd ~/tritonracer
  scp -r Triton-Racer-Sim <ucsd username>.dsmlp-login.ucsd.edu:~
  scp -r Triton-Racer-Sim <ucsd username>.dsmlp-login.ucsd.edu:~
Line 73: Line 73:
'''When in the Virtual environment''':
'''When in the Virtual environment''':


8. Install helper packages:
Step 8. Install helper packages:
  conda install -c anaconda cudatoolkit=10.1
  conda install -c anaconda cudatoolkit=10.1
  conda install cudnn=7.6.0
  conda install cudnn=7.6.0
  conda install tensorflow-gpu
  conda install tensorflow-gpu


9. Get the proper path for ~/projects/manage.py :
Step 9. Get the proper path for ~/projects/manage.py :
  pwd (in the terminal of virtual machine)
  pwd (in the terminal of virtual machine)
  Ex: /datasets/home/28/528/<user_name>/
  Ex: /datasets/home/28/528/<user_name>/


10. Edit manage.py :
Step 10. Edit manage.py :
     Edit the path in manage.py with the path from Step 9
     Edit the path in manage.py with the path from Step 9


11. Launch GPU cluster:
Step 11. Launch GPU cluster:
  launch-148-gpu.sh
  launch-148-gpu.sh


12. Have fun!
Step 12. Have fun!
  Activate environment:
  Activate environment:
  conda activate tritonracer
  conda activate tritonracer

Revision as of 01:56, 15 March 2021

Team

Ardel Alegre - CSE, Senior

Jesus Fausto - ECE, Senior

Jesi Miranda - ECE, Senior

Jacob Plata - MAE, Senior

Objective

In previous years, the cars used by groups in this class controlled the motor by sending throttle information only in the form of voltage. This is fine if the battery levels stay the same. However, an issue arises as battery levels increase or decrease. The power being sent by the battery varies and subsequently the speed of the motor varies as well. Our goal is to implement the TritonAI framework as well as their low level hardware and software to train based on velocity rather than throttle.

Hardware

Jetson Nano: to do high level controls

Teensy 4.0: to do low level controls

Motor: EZRUN 3660SL G2, Brushless sensored DC motor

Chassis:

Circuitry:

Image: 750 pixels

3D Designs

Base Plate: Designed to hold the Jetson Nano, camera, and other components and was mounted to the chassis of the car.

Image: 600 pixels

Camera Mount: The camera is mounted directly to this with the lens sticking through the hole. The curved end was designed to allow the most adjustability in terms of camera angle.

Image: 250 pixels

Camera Base: The camera mount attached to one of the three sets of holes at the top of this piece allowing for multiple camera heights if necessary.

Image: 250 pixels

Software

Our project is the first time the TritonAI framework has been implemented on actual hardware. Their work can be found at https://github.com/Triton-AI/Triton-Racer-Sim

This framework is designed to work with the existing donkey gym framework (https://github.com/tawnkramer/gym-donkeycar).

Additional Documentation

Instructions to get Triton-Racer-Sim to work with UCSD GPU cluster

Step 1. Install miniconda --> reference: https://dev.to/waylonwalker/installing-miniconda-on-linux-from-the-command-line-4ad7


Step 2.

conda create -n tritonracer python=3.8

Step 3.

conda activate tritonracer

Step 4.

pip install docopt pyserial tensorflow==2.3.0 pillow keras==2.3.0 opencv-python opencv-contrib-python pygame==2.0.0.dev10 Shapely simple-pid

Step 5.

conda install scikit-learn

Step 6. Copy car program (FROM the jetson nano terminal for now):

cd ~/projects
scp -r car_templates <ucsd username>.dsmlp-login.ucsd.edu:~/projects

Step 7. Copy helper files:

cd ~/tritonracer
scp -r Triton-Racer-Sim <ucsd username>.dsmlp-login.ucsd.edu:~

When in the Virtual environment:

Step 8. Install helper packages:

conda install -c anaconda cudatoolkit=10.1
conda install cudnn=7.6.0
conda install tensorflow-gpu

Step 9. Get the proper path for ~/projects/manage.py :

pwd (in the terminal of virtual machine)
Ex: /datasets/home/28/528/<user_name>/

Step 10. Edit manage.py :

    Edit the path in manage.py with the path from Step 9

Step 11. Launch GPU cluster:

launch-148-gpu.sh

Step 12. Have fun!

Activate environment:
conda activate tritonracer
    
Start Training: (In the ~/projects/car_templates folder)     
python manage.py train --tub data/<data_tub_name>  --model ./models/<model_name>.h5