TNEX is a Python program that can drive a vehicle in the CARLA simulator. It employs similar techniques used in state-of-the-art self-driving cars, howbeit with simpler algorithms. The goal of this project is to learn how autonomous vehicles work by building one.
TNEX controls the motion of the ego vehicle along its longitudinal axis (i.e gas and brakes) using PID while lateral control (steering) is done manually.
See demo video and ROS bag (2.7GB) for more info.
[WIP]
[WIP]
Tested with Python 3.7 and Carla 0.9.11
-
Install CARLA https://carla.readthedocs.io/en/latest/start_quickstart/#a-debian-carla-installation
-
Run CARLA
cd /opt/carla-simulator
./CarlaUE4.sh -opengl -fps=30
-
Install ROS Noetic http://wiki.ros.org/noetic/Installation/Ubuntu
-
Build TNEX
source /opt/ros/noetic/setup.bash
cd path/to/tnex
catkin_make
- Change workspace
source ./devel/setup.bash # you may save this in your ~/.bashrc
- Install dependencies
sudo apt install \
ros-noetic-rosbridge-suite \
ros-noetic-cv-bridge \
ros-noetic-ros-numpy \
python3.7-tk # or python3-tk
mkvirtualenv -p python3.7 tnex # optional (PS: have virtualenv wrapper installed)
pip install -r requirements.txt
- Run TNEX
roslaunch tnex_driver main.launch
While running TNEX, you can record all the ROS topics with
rosbag record -o data/rosbags/tnex -a
.
- Pull Docker image
docker pull cruise/webviz
- Run Webviz
docker run --name tnex-webviz -p 8080:8080 cruise/webviz
You can make use of this layout config.