Important: Before you run anything, make sure your car is alleviated from the surface, i.e., make sure the wheels of the car does not touch anything.
Note: You need to first clone this repository and checkout to branch fix-jetson-control in your Jetson Nano (Since you are reading this markdown file, I will assume you already did so).
Demo: Here is the link to the video: Jetson Control demo.
To run the Jetson-Control from the terminal, you need to update Arduino code first. Below are the specific instructions:
-
Connect LiPo battery and make sure the voltage is 5.1 volts
-
Open up
ROAR_NODE_V4.inoinside ArduinoIDE -
Select
Arduino Due(Programming Port)inTools -> Board: "..."(if you are not able to seeArduino Duein the Board, follow pert's instructions under this topic: Installing Arduino SAM boards on Arduino IDE for Arm64; if you do not want to mess up with Jetson, you can choose to upload Arduino code from other computer) -
Select
/dev/ttyACM0(Arduino Due(Programming Port))inTools -> Port -> "..."(the specific port name may varies, but make sure you select the Programming Port) -
Click
Uploadbutton (the righthand arrow) to upload the code to the board -
Check the front wheels of the car are in neutral position (if not, then you are in
TESTING_STATE, change the first line ofROAR_NODE_V4.inotobool TESTING_STATE = falseand re-upload the code)
Now you are ready to run the Jetson-Control from the terminal. Below are the specific instructions:
-
Open up TRAXXAS XL5 ESC (the blue box on the side of the car)
-
Turn on your radio controller and try throttle/steering (make sure they are function correctly, if not, follow the instructions here: How to Calibrate Traxxas Electronic Speed Controls)
-
Important: Turn off your radio controller
-
In your terminal, make sure you are inside the repository, i.e.,
cd ROAR_Jetson -
Run
python3 roar-vr.py -c -
After you see
Starting vehicle..., type in two numbers between [-1, 1] (with space in between), and hitenteron your keyboard, then you should see the termianl reports your comand and the wheels of your car start changing (Note: the current program will ignore the identical commands to the previous ones)
- when the input throttle is small, the car is not responding
- when the new steering angle is close to the previous one, the car is not responding