Simulator: fix metadrive (#31104)

fix metadrive
old-commit-hash: 81516216b154bbf8c713aa6b4b538d3a2e0ae0b5
This commit is contained in:
Justin Newberry
2024-01-21 17:34:26 -08:00
committed by GitHub
parent 4a03691a20
commit 831826d3e5
@@ -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