Skip to content

Forward Kinematics

SUMMARY

Forward Kinematics computes the robot tool pose from a given joint configuration.

This skill is used to validate robot poses, generate Cartesian outputs from joint states, and support downstream planning and control tasks.

The Skill

python
import numpy as np
from telekinesis.synapse.robots.manipulators import universal_robots

robot = universal_robots.UniversalRobotsUR10E()

q = np.asarray([0, -np.pi / 2 - 0.1, -np.pi / 2, 0, np.pi / 2, 0])

pose = robot.forward_kinematics(q, rot_type="rad")

The Code

python
import numpy as np
from telekinesis.synapse.robots.manipulators import universal_robots

# Instantiate the robot model
robot = universal_robots.UniversalRobotsUR10E()

# Define a 6-DOF joint configuration in radians
q = np.asarray([0, -np.pi / 2 - 0.1, -np.pi / 2, 0, np.pi / 2, 0])

# Compute the end-effector pose
pose = robot.forward_kinematics(q, rot_type="rad")

print(pose)

The Explanation of the Code

This example shows how to use the forward_kinematics skill to compute the end-effector pose from a joint configuration on a Universal Robots UR10e.

The robot model is instantiated without connecting to physical hardware — forward kinematics is a purely kinematic computation that does not require a live robot connection.

python
from telekinesis.synapse.robots.manipulators import universal_robots

robot = universal_robots.UniversalRobotsUR10E()

The joint configuration q is a NumPy array with one value per joint, ordered from base to end-effector. The UR10e has 6 joints, so q has 6 elements. Values are in radians because rot_type="rad" is specified.

python
q = np.asarray([0, -np.pi / 2 - 0.1, -np.pi / 2, 0, np.pi / 2, 0])

forward_kinematics applies the robot's kinematic chain to q and returns a pose describing the end-effector position and orientation in the robot's base frame.

python
pose = robot.forward_kinematics(q, rot_type="rad")

How to Tune the Parameters

q:

  • NumPy array of joint angles, one per joint (base to end-effector)
  • Length must match the robot's DOF count (6 for UR10e)
  • Values must be within the robot's joint limits; out-of-range values will produce poses outside the reachable workspace

rot_type:

  • "rad" — joint values in radians (default; recommended for programmatic use)
  • "deg" — joint values in degrees (useful when values come from a UI or human-readable config)

TIP

Use rot_type="deg" if you are reading joint values from a teach pendant or configuration file that stores angles in degrees, to avoid manual conversion errors.

Where to Use the Skill

Forward Kinematics is commonly used in the following scenarios:

  • Pose validation — Confirm that a planned joint configuration reaches the intended Cartesian target before issuing a motion command
  • State logging and analysis — Convert recorded joint trajectories to Cartesian paths for visualization or post-processing
  • Offline planning — Seed task-space planners or grasp pose solvers with Cartesian poses derived from known joint states
  • Simulation cross-checking — Verify that the kinematic model matches expected end-effector positions during development

When Not to Use the Skill

Do not use Forward Kinematics when:

  • You need joint values from a target Cartesian pose — use Inverse Kinematics instead
  • You need the live end-effector pose during execution — read it directly from the robot state rather than computing FK on every cycle
  • The joint values are unvalidated — check joint limits before passing values in, as out-of-range inputs will silently produce unreachable poses