Thanks to visit codestin.com
Credit goes to github.com

Skip to content

qwertz747/overdrive

 
 

Repository files navigation

OVERDRIVE

Teensy 4.0 RC/LED Controller

Requirement for rc car autonomous driving

  • Teensy 4.0
  • 4ch or 3ch rc receiver/transmitter (test with Futaba R334SBS-E/Futaba 7PX)
  • Jetson Nano (I don't test on raspberry pi3/4.)

Requirement for rc car led decoration

  • Teensy 4.0
  • 4ch or 3ch rc receiver/transmitter
  • USB mobile battery
  • 5V 20mA single connected LEDs. (for beta1)

Youtube

run

Known issue

  • sometime i2c error occures with PCA9685 emulator.
    --> Check battery, issue seems to appears when the motor draws to much current.
    --> Check that the pin19(Teensy) is connected with pin5(Nano)and that pin18(Teensy)is connected to pin3(Nano)
    --> Check that the Teensy is connected via USB to the Nano.
  • Some motors seem to be affected by noise. (maybe tired motor)
    • If you feels bad signal with throttle on, try polishing the commutator and brush of the motor.

Teensy Setup

Arduino IDE
Teensyduino
teensy4_i2c

  • Install Arduino IDE.
  • Install Teensyduino.
  • Install teensy4_i2c.
  • Setup Arduino IDE

Install Arduino IDE.

Download ARDUINO 1.8.12 Windows ZIP file for non admin install.
unzip it.

Install Teensyduino.

Download Teensyduino 1.51 Windows XP/7/8/10 Installer.
execute and install.

Install teensy4_i2c.

git clone and copy the directory into arduino libraries.

git clone https://github.com/Richard-Gemmell/teensy4_i2c
cp -r teensy4_i2c arduino/hardware/teensy/avr/libraries/

Setup Arduino IDE

  • Tools Board: "Teensy 4.0"
    USB Type: "Serial + Keyboard + Mouse + Joystick"
    CPU Speed: "600 MHz"
    Optimize: "Faster"

DonkeyCar Setup

  • donkeycar 3.1.2 overdrive simulator
  • donkeycar 3.1.1

donkeycar 3.1.2 overdrive simulator

Requirements: Experience installing donkeycar simulator.
donkeycar_sim-racer directory in this repo will be delete. Because I created overdrive branch in my forked donkeycar repo.

cd ~/project
git clone https://github.com/naisy/donkeycar
cd donkeycar
git checkout overdrive
pip install -e .[pc]
donkey createcar ~/sim_racer

and use myconfig.py

cd ~/project
git clone https://github.com/naisy/overdrive
cp overdrive/donkeycar_overdrive/cfg* ~/sim_racer

Normal recording.

python manage.py drive --js --myconfig=cfg_manual_server.py

Normal autonomous driving.

python manage.py dirve --model=myrnn.h5 --myconfig=cfg_auto_server.py

Assist recording.

python manage.py drive --js --model=myrnn.h5 --myconfig=cfg_assist_server.py

Assist data generate.

wget https://raw.githubusercontent.com/naisy/donkeycar_tools/master/make_ai_to_train_data.py
python make_ai_to_train_data.py
mv data data_assist_org
mv data_ai data
python train.py --model=myrnn2.h5 --type=rnn

donkeycar 3.1.1

This part will be update to latest version after pandemic.

cp donkeycar311/*.py ~/project/donkeycar/donkeycar/parts/
cp donkeycar311/myconfig.py.nano_120fps ~/mycar/myconfig.py

4ch Transmitter Settings

Steering and throttle: These are normal rc car setting.

  • ch1
    • steering
  • ch2
    • throttle
  • ch3
    • manual - auto mode change.
  • ch4
    • delete record.

Futaba 7PX



3ch Transmitter Settings

Steering and throttle: These are normal rc car setting.

  • ch1
    • steering
  • ch2
    • throttle
  • ch3
    • manual - auto mode change.

Tamiya TTU-08 (FINESPEC 2.4G)

3ch Wireing


Record training data

  • Transmitter ch3 auto mode.
  • Transmitter ch3 manual mode. (change from auto to manual mode is one of flags)
  • Transmitter ch2 throttle on. (start recording)
  • Transmitter ch3 auto mode. (stop recording)
  • Transmitter ch4 delete records. (delete 120 records.)

Autonomous driving

  • Transmitter ch3 auto mode.
    If you think your rc car will crash, apply the brakes immediately. Overdrive gives priority to manual operation.
    One second after you release your hand, it switches to automatic mode.

Teensy 4.0 OVERDRIVE beta1

See Teensy 4.0 OVERDRIVE beta1

ROADMAP

Teensy 4.0 OVERDRIVE beta2 (in 2020)

  • Breadboard
    • LED update. Add more LEDs.
  • I2C
    • Add new virtual I2C device for RC control instead of PCA9685 emulator. It will be optimized for the RC setting more than PCA9685.
  • Support high speed digital servo. (Manual mode in beta1 is already optimized. But PCA9685 mode is not optimized yet.)

About

RC/LED PWM Controller for AI RC Car

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.8%
  • C++ 21.2%