Skip to content

Commit

Permalink
add trunk action idx
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Oct 18, 2024
1 parent 94deb2e commit 15c58c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions omnigibson/robots/articulated_trunk_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def trunk_control_idx(self):
"""
return th.tensor([list(self.joints.keys()).index(name) for name in self.trunk_joint_names])

@property
def trunk_action_idx(self):
controller_idx = self.controller_order.index("trunk")
action_start_idx = sum([self.controllers[self.controller_order[i]].command_dim for i in range(controller_idx)])
return th.arange(action_start_idx, action_start_idx + self.controllers["trunk"].command_dim)

@property
def _default_controllers(self):
# Always call super first
Expand Down

0 comments on commit 15c58c0

Please sign in to comment.