Skip to content

Commit

Permalink
Add get joint modes (stepjam#217)
Browse files Browse the repository at this point in the history
* get joint modes

* Update robot_component.py
  • Loading branch information
lianghongzhuo authored Nov 2, 2020
1 parent 5958765 commit 7b2a75c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyrep/robots/robot_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ def set_joint_mode(self, value: JointMode) -> None:
[j.set_joint_mode(value) # type: ignore
for j in self.joints]

def get_joint_modes(self) -> List[JointMode]:
"""Gets the operation mode of the joint group.
:return: A list of joint modes.
"""
return [j.get_joint_mode() for j in self.joints]

def get_visuals(self) -> List[Object]:
"""Gets a list of the visual elements of this component.
Expand Down

0 comments on commit 7b2a75c

Please sign in to comment.