RobotModel.iter_chain

RobotModel.iter_chain(start=None, end=None)[source]

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

Parameters
  • start (str or None) – Name of the starting element of the chain. Defaults to the root link name.

  • end (str or None) – Name of the final element of the chain. Defaults to the name of the last element.

Returns

Iterator of the chain of links and joints (names).

Examples

>>> list(robot.iter_chain('world', 'link2'))
['world', 'joint1', 'link1', 'joint2', 'link2']