openpilot0/tools/sim
Hoang Bui c17fc021e9 Enable variable pass between test and metadrive processes (#30961)
pass started between processes
old-commit-hash: 1da08460cb
2024-01-10 18:13:21 -08:00
..
bridge metadrive: Change camera position to reflect typical height of a vehicle (#30831) 2024-01-01 14:36:37 -08:00
lib Simulator: fix keyboard ctrl messing with pytest (#30827) 2023-12-20 15:10:11 -08:00
tests Enable variable pass between test and metadrive processes (#30961) 2024-01-10 18:13:21 -08:00
Dockerfile.sim locationd: remove models unused in openpilot (#30481) 2023-11-22 13:25:29 -08:00
Dockerfile.sim_nvidia
README.md Simulator: --simulator is no longer an argument (#30700) 2023-12-12 09:45:34 -08:00
__init__.py
build_container.sh
launch_openpilot.sh Simulator: set params enabled (#30195) 2023-10-05 22:19:38 -07:00
rgb_to_nv12.cl sim: Converting RGB frames to NV12 format in OpenCL (#26169) 2022-10-29 13:20:37 -07:00
run_bridge.py Simulator: remove carla (#30690) 2023-12-11 20:38:37 -08:00
start_openpilot_docker.sh Simulator: remove carla (#30690) 2023-12-11 20:38:37 -08: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