mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 13:32:04 +08:00
@@ -38,7 +38,7 @@ class MetaDriveWorld(World):
|
||||
self.should_reset = False
|
||||
|
||||
def apply_controls(self, steer_angle, throttle_out, brake_out):
|
||||
if (time.monotonic() - self.reset_time) > 5:
|
||||
if (time.monotonic() - self.reset_time) > 2:
|
||||
self.vc[0] = steer_angle
|
||||
|
||||
if throttle_out:
|
||||
@@ -50,6 +50,7 @@ class MetaDriveWorld(World):
|
||||
self.vc[1] = 0
|
||||
|
||||
self.controls_send.send([*self.vc, self.should_reset])
|
||||
self.should_reset = False
|
||||
|
||||
def read_sensors(self, state: SimulatorState):
|
||||
while self.state_recv.poll(0):
|
||||
|
||||
Reference in New Issue
Block a user