Skip to content

Commit

Permalink
fix default command output behavior for joint controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Dec 14, 2024
1 parent 6275ab9 commit 42e1d9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions omnigibson/controllers/joint_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ def __init__(
command_output_limits=command_output_limits,
)

def _generate_default_command_output_limits(self):
# Use motor type instead of default control type, since, e.g, use_impedances is commanding joint positions
# but controls low-level efforts
return (
self._control_limits[ControlType.get_type(self._motor_type)][0][self.dof_idx],
self._control_limits[ControlType.get_type(self._motor_type)][1][self.dof_idx],
)

def _update_goal(self, command, control_dict):
# If we're using delta commands, add this value
if self._use_delta_commands:
Expand Down

0 comments on commit 42e1d9d

Please sign in to comment.