Adeeb Shihadeh bd2b09c7b6 Deprecate controlsState state fields (#33437) 1 month ago
..
bridge bd2b09c7b6 Deprecate controlsState state fields (#33437) 1 month ago
lib bd2b09c7b6 Deprecate controlsState state fields (#33437) 1 month ago
tests bd2b09c7b6 Deprecate controlsState state fields (#33437) 1 month ago
README.md 3b8ed67aa3 remove navigation (#32773) 4 months ago
__init__.py 4ed3a158af Simulator Tests (#24274) 2 years ago
launch_openpilot.sh 8c8a4b4961 replace python with python3 (#33303) 2 months ago
rgb_to_nv12.cl bf27021719 sim: Converting RGB frames to NV12 format in OpenCL (#26169) 2 years ago
run_bridge.py c551f1d239 fix bash + python3 shebangs (#33287) 2 months ago

README.md

openpilot in simulator

openpilot implements a bridge that allows it to run in the MetaDrive simulator.

Launching openpilot

First, start openpilot.

# Run locally
./tools/sim/launch_openpilot.sh

Bridge usage

$ ./run_bridge.py -h
usage: run_bridge.py [-h] [--joystick] [--high_quality] [--dual_camera]
Bridge between the simulator and openpilot.

options:
  -h, --help            show this help message and exit
  --joystick
  --high_quality
  --dual_camera

Bridge Controls:

  • To engage openpilot press 2, then press 1 to increase the speed and 2 to decrease.
  • To disengage, press "S" (simulates a user brake)

All inputs:

| key  |   functionality       |
|------|-----------------------|
|  1   | Cruise Resume / Accel |
|  2   | Cruise Set    / Decel |
|  3   | Cruise Cancel         |
|  r   | Reset Simulation      |
|  i   | Toggle Ignition       |
|  q   | Exit all              |
| wasd | Control manually      |

MetaDrive

Launching Metadrive

Start bridge processes located in tools/sim:

./run_bridge.py