Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolve #27284
pip install torch
in order to engage (see onnx_runner.py).After you build openpilot, run
./tools/streamer/launch_sim.sh
Press h on the game widow for control description.
I - ignition
E - Enable
T - Takeover (WASD control). Takeover is on by default so you need to press t to allow OP to drive.
up/down arrow - +/-5km/h cruise set point
This creates a simple simulator car port in openpilot. This uses wide + road camera. This makes it easy to tune and i guess it could also be easier to test new OP features without knowing the intricacies of the various brand ports. This uses metadrive game window for user input. Starts 2 new processes, streamer.py and gamerunner.py. Metadrive sends the games render window over zmq to the streamer.py where the frames are processed and sent to openpilot. I feel that this is the best way to do a simulator in openpilot as far as debugging and user experience goes but I am biased! I spent a good amount of time on this so your consideration is appreciated and I think its good alternative to the way the sim is currently handled in openpilot. I believe there is also a pathway forward to running this on comma 3 with some changes to the camerad function (PC runs the game and streams frames to C3).