mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-16 13:02:27 +08:00
Simulator: fix metadrive (#31104)
fix metadrive
old-commit-hash: 81516216b1
This commit is contained in:
@@ -34,12 +34,13 @@ def apply_metadrive_patches():
|
||||
EngineCore.add_image_sensor = add_image_sensor_patched
|
||||
|
||||
# we aren't going to use the built-in observation stack, so disable it to save time
|
||||
def observe_patched(self, vehicle):
|
||||
def observe_patched(self, *args, **kwargs):
|
||||
return self.state
|
||||
|
||||
ImageObservation.observe = observe_patched
|
||||
|
||||
def arrive_destination_patch(self, vehicle):
|
||||
# disable destination, we want to loop forever
|
||||
def arrive_destination_patch(self, *args, **kwargs):
|
||||
return False
|
||||
|
||||
MetaDriveEnv._is_arrive_destination = arrive_destination_patch
|
||||
|
||||
Reference in New Issue
Block a user