This is a Tool to Control steering and throttle of a R/C car via MQTT with Raspberry Pi 3B.
- You can read my simple instruction at here.
- Hardware is almost same as a Donkey Car.
- I bought below parts. The cost is about $130.
We have several ways to connect Host PC and Raspberry Pi in outside.
- Setting Raspberry Pi as an access point. (documentation)
- Put a smart phone on a R/C car, and tethering both of them.
- Put a mobile wifi router on a R/C car.
After setup access points,
$ sudo ssh pi@raspberrypi.local
Momo is a powerfuil WebRTC Native Client. You can follow my instraction at here.
$ cd ~/
$ git clone https://github.com/shirokunet/RCVehiclePy
$ sudo apt-get remove python-pip python3-pip
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
- Python 3.5.x
- numpy 1.16.1
- PyYAML 3.12
$ cd ~/RCVehiclePy/
$ sudo pip3 install -r requirements.txt
$ sudo apt-get install python3-numpy
$ sudo apt-get install python3-yaml
$ ifconfig
wlan0: flags=4163 mtu 1500
inet xx.xx.xx.xx netmask 255.255.255.0
Then chenge config file
$ cd ~/RCVehiclePy/
$ vi config.yml
pi_ip: 'xx.xx.xx.xx'
$ cd ~/RCVehiclePy/
$ python3 pi_main.py
Same as the step of the Raspberry Pi.
$ cd ~/RCVehiclePy/
$ python3 pc_main.py
Just push key "UP" or "DOWN" or "LEFT" or "RIGHT" on the terminal.
Type 'Ctrl' + 'c' in both terminals.
The latency is about 100~300msec. It can be controlled easily even if you watch only the camera streaming.
- Actuator layer is built upon autorope/donkeycar. Thank you!
This project is licensed under the Apache License 2.0 - see the LICENSE file for details