Skip to main content
Ctrl+K
Logo image

COMPAS docs

  • Introduction
  • Installation
  • Tutorial
  • Examples
  • API Reference
    • API Reference
  • License
COMPAS.dev
  • API Reference
  • ToolModel
  • ToolModel.iter_link_chain

ToolModel.iter_link_chain

ToolModel.iter_link_chain(link_start_name=None, link_end_name=None)[source]

Iterator over the chain of links between a pair of start and end links.

Parameters:
link_start_namestr, optional

Name of the starting link of the chain. Defaults to the root link name.

link_end_namestr, optional

Name of the final link of the chain. Defaults to the last link’s name.

Returns:
Iterator of the chain of links.

Notes

This method differs from iter_links() 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

>>> robot = RobotModel.ur5()
>>> [l.name for l in robot.iter_link_chain("world", "forearm_link")]
['world', 'base_link', 'shoulder_link', 'upper_arm_link', 'forearm_link']
On this page
  • ToolModel.iter_link_chain()

© Copyright COMPAS Association.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.13.3.