RobotModel.forward_kinematics

RobotModel.forward_kinematics(joint_state, link_name=None)[source]

Calculate the robot’s forward kinematic.

Parameters:
joint_stateConfiguration | 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_namestr, optional

The name of the link we want to calculate the forward kinematics for. Defaults to the end-effector link name.

Returns:
Frame

The frame at the end-effector link in the world coordinate system.

Examples

>>> robot = RobotModel.ur5()
>>> config = robot.zero_configuration()
>>> frame = robot.forward_kinematics(config)
>>> frame.point
Point(x=0.817, y=0.191, z=-0.005)
>>> frame.xaxis
Vector(x=-0.000, y=1.000, z=0.000)
>>> frame.yaxis
Vector(x=1.000, y=0.000, z=0.000)