Simulator: fix metadrive tick frequency (#30043)

sim rate fix
old-commit-hash: 98451611be
test-msgs
Justin Newberry 2 years ago committed by GitHub
parent 99f4592513
commit 00302ba898
  1. 6
      tools/sim/bridge/common.py

@ -32,7 +32,7 @@ class SimulatorBridge(ABC):
set_params_enabled() set_params_enabled()
self.params = Params() self.params = Params()
self.rk = Ratekeeper(100) self.rk = Ratekeeper(100, None)
msg = messaging.new_message('liveCalibration') msg = messaging.new_message('liveCalibration')
msg.liveCalibration.validBlocks = 20 msg.liveCalibration.validBlocks = 20
@ -90,8 +90,6 @@ class SimulatorBridge(ABC):
100, self._exit_event)) 100, self._exit_event))
self.simulated_car_thread.start() self.simulated_car_thread.start()
rk = Ratekeeper(100, print_delay_threshold=None)
# Simulation tends to be slow in the initial steps. This prevents lagging later # Simulation tends to be slow in the initial steps. This prevents lagging later
for _ in range(20): for _ in range(20):
self.world.tick() self.world.tick()
@ -162,4 +160,4 @@ class SimulatorBridge(ABC):
self.started = True self.started = True
rk.keep_time() self.rk.keep_time()

Loading…
Cancel
Save