Skip to content

Get Inverse Kinematics Has Solution

SUMMARY

Get Inverse Kinematics Has Solution queries the robot controller's built-in IK solver to determine whether a valid joint configuration exists for a given Cartesian pose. Returns True if a solution is reachable within the specified tolerance, False otherwise.

Use this skill as a lightweight reachability check before commanding the robot to a target pose.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
has_solution = robot.get_inverse_kinematics_has_solution(pose)

The Code

Example: Check IK Reachability for the Current Pose

Use the current TCP pose as the target and check whether an IK solution exists.

python
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots

robot_ip = "192.168.1.2"  # replace with your robot's IP

robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)

current_pose = robot.get_cartesian_pose()
logger.info(f"Current Cartesian pose: {current_pose}")

has_solution = robot.get_inverse_kinematics_has_solution(current_pose)
logger.success(f"IK solution exists for current pose: {has_solution}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_inverse_kinematics_has_solution calls the controller's built-in IK solver for the given pose ([x, y, z, rx, ry, rz] in meters and radians) and returns a boolean indicating whether a valid joint configuration was found. The optional qnear parameter biases the solver toward a specific configuration, which is useful for selecting among multiple IK solutions. The tolerance parameters control how closely the solution must match the target pose.

How to Tune the Parameters

ParameterTypeDefaultDescription
poselist[float]Target Cartesian pose [x, y, z, rx, ry, rz] [m, rad].
qnearlist[float][]6-element joint configuration to bias the IK solver toward a preferred solution.
max_position_errorfloat1e-10Maximum acceptable position error [m].
max_orientation_errorfloat1e-10Maximum acceptable orientation error [rad].

Return Value

TypeDescription
boolTrue if a valid IK solution exists within the specified tolerances, False otherwise.

Where to Use the Skill

  • Reachability pre-check — Validate target poses before issuing motion commands to avoid runtime errors
  • Path planning — Filter waypoints for reachability before executing a Cartesian path
  • Workspace boundary checks — Determine whether a computed pose falls within the robot's reachable workspace

When Not to Use the Skill

Do not use Get Inverse Kinematics Has Solution when:

  • You need the actual joint configuration — use Inverse Kinematics to retrieve the full IK solution