Skip to content

Commit

Permalink
[envs] Rename: get_sim_time -> get_time.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurooka committed Dec 21, 2024
1 parent afcdc3f commit 48cfab0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions robo_manip_baselines/common/DataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ def status(self, new_status):
if self.env is None:
self.status_start_time = 0.0
else:
self.status_start_time = self.env.unwrapped.get_sim_time()
self.status_start_time = self.env.unwrapped.get_time()

@property
def status_elapsed_duration(self):
"""Get the elapsed duration of the current status."""
return self.env.unwrapped.get_sim_time() - self.status_start_time
return self.env.unwrapped.get_time() - self.status_start_time
2 changes: 1 addition & 1 deletion robo_manip_baselines/envs/isaac/IsaacUR5eEnvBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def get_eef_wrench_from_obs(self, obs):
"""Get end-effector wrench (fx, fy, fz, nx, ny, nz) from observation."""
return obs["wrench"]

def get_sim_time(self):
def get_time(self):
"""Get simulation time. [s]"""
return self.gym.get_sim_time(self.sim)

Expand Down
2 changes: 1 addition & 1 deletion robo_manip_baselines/envs/mujoco/MujocoEnvBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_eef_wrench_from_obs(self, obs):
"""Get end-effector wrench (fx, fy, fz, nx, ny, nz) from observation."""
return obs["wrench"]

def get_sim_time(self):
def get_time(self):
"""Get simulation time. [s]"""
return self.data.time

Expand Down
4 changes: 2 additions & 2 deletions robo_manip_baselines/envs/real/RealEnvBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def get_eef_wrench_from_obs(self, obs):
"""Get end-effector wrench (fx, fy, fz, nx, ny, nz) from observation."""
return obs["wrench"]

def get_sim_time(self):
"""Get simulation time. [s]"""
def get_time(self):
"""Get real-world time. [s]"""
return time.time() - self.init_time

@property
Expand Down

0 comments on commit 48cfab0

Please sign in to comment.