Skip to content

Commit e582aea

Browse files
committed
Add method to get joint types from list of joint names
1 parent 9ddef9a commit e582aea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/compas_fab/robots/robot.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,20 @@ def get_configurable_joints(self, group=None):
355355
else:
356356
return self.model.get_configurable_joints()
357357

358+
def get_joint_types_by_names(self, names):
359+
"""Returns a list of joint types for a list of joint names.
360+
361+
Parameters
362+
----------
363+
name: list of str
364+
The names of the joints.
365+
366+
Returns
367+
-------
368+
list of str
369+
"""
370+
return [self.get_joint_by_name(n).type for n in names]
371+
358372
def get_joint_by_name(self, name):
359373
"""Returns the joint in the robot model matching its name.
360374

0 commit comments

Comments
 (0)