This README will walk the reader through the steps to setup the ROS workspace for this project and how to Launch the Car. This tutorial is intended for unix-based terminals.
It is assumed that ROS-melodic is installed on the Jetson.
SSH into the Jetson or connect keyboard, mouse and monitor to the Jetson and open a terminal in the the Linux GUI and follow these steps:
- Clone this repository into a folder on the Jetson
$ cd ~/sandbox (or whatever folder you want to work in)
$ git clone https://github.com/jepp5220/f1tenth.git- Create workspace
$ mkdir -p f1tenth_ws/src
$ cp -r f1tenth_system f1tenth_ws/src/- Install additional ROS packages
$ sudo apt-get update
$ sudo apt-get install ros-melodic-driver-base- Make Python scripts executeable
$ cd f1tenth_ws
$ find . -name “*.py” -exec chmod +x {} \;- Move to workspace folder and compile the code
$ catkin_make- Source directory
$ source devel/setup.bashNow we are ready to launch the car.
- Start roscore
$ roscore- In another terminal, move to workspace folder and source the bash file as such:
$ source devel/setup.bash- To launch the car, use the following command:
$ roslaunch racecar drive.launchNow we can activate the different kinds of control.
For external control, run these three Python scripts in seperate terminals:
$ python3 f1tenthv2/f1tenth_ws/src/f1tenth_system/racecar/racecar/
scripts/lidarMQ.py
$ python3 f1tenthv2/f1tenth_ws/src/f1tenth_system/racecar/racecar/
scripts/odomMQ.py
$ python3 f1tenthv2/f1tenth_ws/src/f1tenth_system/racecar/racecar/
scripts/recieveinputMQ.pyHere it is noted that the external controller also needs to comsume and send input to actually activate the external control.
For Manual control, run this Python script in a seperate terminal:
$ python3 f1tenthv2/f1tenth_ws/src/f1tenth_system/racecar/racecar/
scripts/manual_controller.pyFor Pure Pursuit control, run this Python script in a seperate terminal:
$ python3 f1tenthv2/f1tenth_ws/src/f1tenth_system/racecar/racecar/
scripts/purepursuit.py