openpilot0/tools/sim
JaSpa99 dc73e6e2aa
Make SimulatorBridge picklable (MacOS support) (#34023)
* remove unused

* make Params (un)serializable

* move initialization after spawn

_thread.lock objects can't be pickled
2024-11-14 10:25:50 -08:00
..
bridge Make SimulatorBridge picklable (MacOS support) (#34023) 2024-11-14 10:25:50 -08:00
lib visionipc: remove RGB support (#33739) 2024-10-07 13:24:57 -07:00
tests ci: faster sim test (#33888) 2024-10-29 16:59:48 -07:00
README.md remove navigation (#32773) 2024-06-19 19:14:13 -07:00
__init__.py
launch_openpilot.sh replace python with python3 (#33303) 2024-08-14 15:14:31 -07:00
rgb_to_nv12.cl
run_bridge.py fix bash + python3 shebangs (#33287) 2024-08-13 21:22:13 -07:00

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