mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
Simulator: fix metadrive (#31104)
fix metadrive old-commit-hash: 81516216b154bbf8c713aa6b4b538d3a2e0ae0b5
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