Difference between revisions of "2021WinterTeam7"

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to navigation Jump to search
Line 46: Line 46:
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]
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.  
2.  
     conda create -n tritonracer python=3.8
     conda create -n tritonracer python=3.8


3.  
3.  
conda activate tritonracer
    conda activate tritonracer


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
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


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


6. copy car program (FROM the jetson nano terminal for now):
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:
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:~

Revision as of 01:23, 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:

Chassis:

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

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


2.

   conda create -n tritonracer python=3.8

3.

   conda activate tritonracer

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

5.

   conda install scikit-learn

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

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

7. Copy helper files:

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

When in the Virtual environment:

8. Install helper packages:

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

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

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

10. Edit manage.py :

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

11. Launch GPU cluster:

    launch-148-gpu.sh

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