diff --git a/robohive/robot/robot.py b/robohive/robot/robot.py index db8b7bd5..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() @@ -419,9 +422,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