In Joint Limits
SUMMARY
In Joint Limits checks whether a candidate joint configuration is strictly inside the robot's configured per-joint lower and upper bounds. Use it as a guard before sending a joint target to the controller or before running motion planning.
SUPPORTED ROBOTS
Available on all supported manipulators.
UNITS
Input joint configuration q in degrees. Returns a boolean.
The Skill
ok = robot.in_joint_limits(q=q, verbose=False)The Code
Example 1: Guard a Joint Target
Validate a candidate joint configuration before commanding the controller.
import numpy as np
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()
robot.connect(ip=robot_ip)
q_target = np.array([0.0, -90.0, 90.0, -90.0, -90.0, 0.0])
if robot.in_joint_limits(q_target):
robot.set_joint_positions(q=q_target.tolist())
logger.success("Joint target accepted and commanded.")
else:
logger.error("Joint target is outside the configured limits - aborting.")
robot.disconnect()Example 2: Validate an IK Solution Verbosely
Run IK and log details for any joint that violates a limit.
import numpy as np
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
robot = universal_robots.UniversalRobotsUR10E()
target_pose = [0.4, 0.0, 0.3, 180.0, 0.0, 0.0]
q = robot.inverse_kinematics(target_pose=target_pose)
# Verbose mode logs which joint(s) are out of bounds
if not robot.in_joint_limits(np.asarray(q), verbose=True):
logger.warning("IK solution violates joint limits - rejecting.")
else:
logger.success(f"IK solution is within limits: {q}")The Explanation of the Code
in_joint_limits reads the per-joint lower and upper bounds from robot.joint_limits and returns True only when every value in q is strictly between its bounds (lower < q < upper). Values exactly at the lower or upper bound are reported as out-of-limit, to avoid commanding the controller right at the edge of its motion envelope.
The input vector must be a 1D NumPy array in degrees whose length matches the number of joints on the robot. A ValueError is raised otherwise.
When verbose=True, the method also logs a warning per joint that violates its bounds, with the joint name, index, and the lower/upper bound. This is useful when diagnosing why an IK solution or planned waypoint is being rejected.
How to Tune the Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
q | np.ndarray | - | 1D joint configuration in degrees. Length must match the number of joints on the robot. |
verbose | bool | False | If True, log a warning for each joint value that violates its limit. |
Return Value
| Type | Description |
|---|---|
bool | True if every joint value is strictly inside its configured [lower, upper] bounds, False otherwise. |
Where to Use the Skill
- Pre-flight validation - Reject joint targets that would violate the configured limits before sending them to the controller
- IK post-processing - Filter IK solutions to keep only configurations inside the joint envelope
- Motion planning - Validate sampled or interpolated waypoints during planning
- Diagnostics - Use
verbose=Trueto surface which joint is the offender when a target is rejected
When Not to Use the Skill
Do not use In Joint Limits when:
- You need workspace-level safety checks - for Cartesian-space safety bounds, use Is Pose Within Safety Limits.
- You need controller-side safety status - use Is Joints Within Safety Limits to query the controller's live safety state instead of the URDF limits.

