RobotModel.iter_joint_chain
- RobotModel.iter_joint_chain(link_start_name=None, link_end_name=None)[source]
Iterator over the chain of joints between a pair of start and end links.
- Parameters
link_start_name (str or
None
) – Name of the starting link of the chain. Defaults to the root link name.link_end_name (str or
None
) – Name of the final link of the chain. Defaults to the last link’s name.
- Returns
Iterator of the chain of joints.
Notes
This method differs from
iter_joints()
in that it returns the chain respecting the tree structure, hence if one link branches into two or more joints, only the branch matching the end link will be returned.Examples
>>> [j.name for j in robot.iter_joint_chain('world', 'link2')] ['joint1', 'joint2']