From 64f23f2e9d048e9790f33d7243dec4904ce42393 Mon Sep 17 00:00:00 2001 From: Andrea Prestia <67275846+andreh1111@users.noreply.github.com> Date: Thu, 2 Jul 2026 18:04:52 -0400 Subject: [PATCH 1/2] fix time_wall update --- robohive/robot/robot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robohive/robot/robot.py b/robohive/robot/robot.py index db8b7bd5..81d0666c 100644 --- a/robohive/robot/robot.py +++ b/robohive/robot/robot.py @@ -419,9 +419,6 @@ def get_sensors(self, noise_scale=None, random_generator=None): # cache sensors self._sensor_cache.append(current_sen) - # Update time - self.time_wall = time.time()-self.time_start - return current_sen @@ -710,6 +707,9 @@ def step(self, ctrl_desired, step_duration, ctrl_normalized=True, realTimeSim=Fa elif time_left_in_step < 0.0: prompt("Step duration %0.4fs, Step took %0.4fs, Time left %0.4f"% (step_duration, (time_now-self.time_wall), time_left_in_step), type=Prompt.WARN) + # Update time + self.time_wall = time.time()-self.time_start + if _ROBOT_VIZ: global timing_SRV_t0 timing_SRV_t = time.time() From e5cfe1704a3cabfa8f95929fa2f7e96103c3dfb7 Mon Sep 17 00:00:00 2001 From: Andrea Prestia <67275846+andreh1111@users.noreply.github.com> Date: Thu, 2 Jul 2026 18:33:40 -0400 Subject: [PATCH 2/2] fix prev commit --- robohive/robot/robot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robohive/robot/robot.py b/robohive/robot/robot.py index 81d0666c..2636920a 100644 --- a/robohive/robot/robot.py +++ b/robohive/robot/robot.py @@ -383,6 +383,9 @@ def get_sensors(self, noise_scale=None, random_generator=None): current_sen={} noise_scale = self._noise_scale if noise_scale is None else noise_scale + # Update time + self.time_wall = time.time()-self.time_start + if self.is_hardware: # record sensor*device['scale']+device['offset'] current_sen = self.hardware_get_sensors() @@ -707,9 +710,6 @@ def step(self, ctrl_desired, step_duration, ctrl_normalized=True, realTimeSim=Fa elif time_left_in_step < 0.0: prompt("Step duration %0.4fs, Step took %0.4fs, Time left %0.4f"% (step_duration, (time_now-self.time_wall), time_left_in_step), type=Prompt.WARN) - # Update time - self.time_wall = time.time()-self.time_start - if _ROBOT_VIZ: global timing_SRV_t0 timing_SRV_t = time.time()