Skip to content

Commit

Permalink
Add a method to return the number of joints in the arm
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeschmitt-tr committed Oct 31, 2024
1 parent 5cd2038 commit 6cc0c62
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,15 @@ def get_joint_efforts(self) -> List[float]:
for name in self.group_info.joint_names
]

def get_number_of_joints(self) -> int:
"""
Get the number of joints in the arm group.
:return: number of joints
"""
self.core.get_node().logdebug('Getting number of joints')
return self.group_info.num_joints

def _update_Tsb(self) -> None:
"""Update transform between the space and body frame from the current joint commands."""
self.core.get_node().logdebug('Updating T_sb')
Expand Down

0 comments on commit 6cc0c62

Please sign in to comment.