RobotModel.compute_transformations

RobotModel.compute_transformations(joint_state, link=None, parent_transformation=None)[source]

Recursive function to calculate the transformations of each joint.

Parameters
  • joint_state (Configuration | dict[str, float]) – A configuration instance or a dictionary with joint names and joint values in radians and meters (depending on the joint type).

  • link (Link, optional) – Link instance to calculate the child joint’s transformation.

  • parent_transformation (Transformation, optional) – The transfomation of the parent joint. Defaults to the identity matrix.

Returns

dict[str, Transformation] – A dictionary with the joint names as keys and values are the joint’s respective transformation.

Examples

>>> robot = RobotModel.ur5()
>>> config = robot.random_configuration()
>>> transformations = robot.compute_transformations(config)