Simulator: fix metadrive (#31104)

fix metadrive
old-commit-hash: 81516216b1
chrysler-long2
Justin Newberry 1 year ago committed by GitHub
parent 4a03691a20
commit 831826d3e5
  1. 5
      tools/sim/bridge/metadrive/metadrive_process.py

@ -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

Loading…
Cancel
Save