Skip to content

Commit 2219758

Browse files
authored
Update mobile_robot.py (#680)
fix: correct arm reference in sensor functions
1 parent 2ebb2a0 commit 2219758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

robosuite/robots/mobile_robot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def base_quat(obs_cache):
322322
for arm in self.arms:
323323

324324
@sensor(modality=modality)
325-
def base_to_eef_pos(obs_cache):
325+
def base_to_eef_pos(obs_cache, arm=arm):
326326
eef_pos = np.array(self.sim.data.site_xpos[self.eef_site_id[arm]])
327327
base_pos = np.array(
328328
self.sim.data.site_xpos[self.sim.model.site_name2id(self.robot_model.base.correct_naming("center"))]
@@ -339,7 +339,7 @@ def base_to_eef_pos(obs_cache):
339339
return base_to_eef_pos
340340

341341
@sensor(modality=modality)
342-
def base_to_eef_quat(obs_cache):
342+
def base_to_eef_quat(obs_cache, arm=arm):
343343
"""
344344
Args:
345345
obs_cache (dict): A dictionary containing cached observations.
@@ -376,7 +376,7 @@ def base_to_eef_quat(obs_cache):
376376
return T.mat2quat(base_to_eef_mat)
377377

378378
@sensor(modality=modality)
379-
def base_to_eef_quat_site(obs_cache):
379+
def base_to_eef_quat_site(obs_cache, arm=arm):
380380
"""
381381
Args:
382382
obs_cache (dict): A dictionary containing cached observations.

0 commit comments

Comments
 (0)