openpilot/tools/sim
Adeeb Shihadeh 6d645b4ce9
Scripts for containerized CARLA (#1987)
* run carla in container

* launch script

* fix launch script

* update carla
2020-08-06 13:26:25 -07:00
..
lib fix counter mismatch in sim 2020-08-06 13:23:20 -07:00
.gitignore Cleanup simulator and add usage instructions (#1050) 2020-02-04 19:46:57 -08:00
README.md Clarify shortcut usage in Carla simulation mode (#1724) 2020-06-17 17:53:17 -07:00
bridge.py Sim hw type is grey panda now 2020-06-12 10:57:30 -07:00
launch_openpilot.sh Scripts for containerized CARLA (#1987) 2020-08-06 13:26:25 -07:00
start_carla.sh Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
start_carla_docker.sh Scripts for containerized CARLA (#1987) 2020-08-06 13:26:25 -07:00

README.md

openpilot in simulator

Needs Ubuntu 16.04

Checkout openpilot

cd ~/
git clone https://github.com/commaai/openpilot.git

# Add export PYTHONPATH=$HOME/openpilot to your bashrc
# Have a working tensorflow+keras in python3.7.3 (with [packages] in openpilot/Pipfile)

Install (in terminal 1)

cd ~/openpilot/tools/sim
./start_carla.sh  # install CARLA 0.9.7 and start the server

openpilot (in terminal 2)

cd ~/openpilot/selfdrive/
PASSIVE=0 NOBOARD=1 ./manager.py

bridge (in terminal 3)

# links carla to openpilot, will "start the car" according to manager
cd ~/openpilot/tools/sim
./bridge.py

Controls

Now put the focus on the terminal running bridge.py and you can control openpilot driving in the simulation with the following keys

key functionality
1 Cruise up 5 mph
2 Cruise down 5 mph
3 Cruise cancel
q Exit all