Skip to content

Set Cartesian Pose in Joint Space

SUMMARY

Set Cartesian Pose in Joint Space drives the TCP to a target Cartesian pose [x, y, z, rx, ry, rz] (meters + Euler XYZ degrees) using a trajectory that is linear in joint space.

SUPPORTED ROBOTS

Available on all supported manipulators in offline mode. Hardware execution is currently supported only on Universal Robots.

UNITS

cartesian_pose is [x, y, z, rx, ry, rz] in meters and Euler XYZ degrees. speed in deg/s, acceleration in deg/s² (joint-space limits drive the interpolation).

OFFLINE

To run set_cartesian_pose_in_joint_space purely on the kinematic model and visualize the result in Rerun, follow the Synapse Quickstart - one offline example is shipped for every supported brand.

The Skill

python
robot.set_cartesian_pose_in_joint_space(
    cartesian_pose=target_pose,
    speed=60,
    acceleration=80,
    asynchronous=False,
)

The Code

Safety first!

A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.

Operating real hardware is at your own risk.

Drive a real UR10e to an absolute Cartesian pose via joint-space interpolation. The synchronous call blocks until the TCP reaches the target.

python
"""
Set Cartesian Pose in Joint Space example for the Synapse SDK.

Drives a real robot to a Cartesian pose using joint-space motion in synchronous
mode, then commands the same move asynchronously and interrupts it mid-trajectory
with ``stop_joint_motion``.

Currently supported only for Universal Robots (UR10e).

Usage:
    python set_cartesian_pose_in_joint_space_advanced.py --ip <ROBOT_IP>
"""

import argparse

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(robot_ip: str):
    """Move the TCP to a target Cartesian pose via joint-space motion."""

    # Create robot instance
    robot = universal_robots.UniversalRobotsUR10E()

    # Target Cartesian pose [x, y, z (m), rx, ry, rz (deg)]
    target_pose = [-0.25, 0.25, 0.93, 90, 0, -104]

    # Safety warning before commanding real motion
    logger.warning(
        f"About to move real robot to target pose {target_pose}. "
        "Make sure it's safe to move there, otherwise use the advanced example."
    )

    # Connect to the robot
    robot.connect(ip=robot_ip)

    try:
        robot.set_cartesian_pose_in_joint_space(
            cartesian_pose=target_pose,
            speed=20,
            acceleration=20,
        )
        logger.info(f"Moved to target Cartesian pose: {target_pose}")
    finally:
        robot.disconnect()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description="UR10e set_cartesian_pose_in_joint_space example"
    )
    parser.add_argument("--ip", type=str, required=True, help="IP address of the UR robot")
    args = parser.parse_args()

    main(args.ip)

The Explanation of the Code

python
from telekinesis.synapse.robots.manipulators import universal_robots

robot = universal_robots.UniversalRobotsUR10E()

Create the robot. UR10e is used here for illustration; the same pattern works for every supported brand.

python
robot.connect(ip=robot_ip)

Connect to the robot at the given IP - required for hardware execution.

python
robot.set_cartesian_pose_in_joint_space(
    cartesian_pose=target_pose,
    speed=20,
    acceleration=20,
)

Drive the TCP to the target Cartesian pose using a trajectory interpolated in joint space - the TCP traces a non-linear curve in Cartesian space, smoother through large reorientations than a Cartesian-linear move. speed and acceleration are in joint units (deg/s, deg/s²). With asynchronous=False (default) the call blocks until the move completes.

python
finally:
    robot.disconnect()

Release the controller link in a finally block so a fault mid-motion still cleans up the connection.

Advanced usage

For relative moves, asynchronous execution, mid-motion stop_joint_motion, and live Rerun visualization, follow the same patterns shown in the Set Cartesian Pose examples - just swap set_cartesian_pose for set_cartesian_pose_in_joint_space and stop_cartesian_motion for stop_joint_motion.

How to Tune the Parameters

ParameterTypeDefaultDescription
cartesian_poselist[float] | np.ndarray-Target pose [x, y, z, rx, ry, rz]. Position in meters; orientation as Euler XYZ in degrees.
speedfloat60Leading joint speed in deg/s. Start conservative (20-30) when validating; raise after the path is verified.
accelerationfloat80Leading joint acceleration in deg/s². Tune in tandem with speed.
asynchronousboolFalseIf True, the call returns immediately. Use Stop Joint Motion to interrupt the move before it completes.

WARNING

Targets near kinematic singularities or outside the reachable workspace will raise a RuntimeError. Verify reachability with Inverse Kinematics before commanding motion, and wrap the call in a try/except block in production code.

Where to Use the Skill

  • Large reorientations - Joint-space interpolation avoids the singularities and large joint accelerations that can occur with Cartesian-linear moves.
  • Homing to a Cartesian pose - Return to a known safe pose without precomputing the joint configuration.
  • State transitions - Move between operating poses efficiently when the TCP path shape is not critical.

When Not to Use the Skill

  • A straight TCP path is required - joint interpolation does not produce a linear tool path; use Set Cartesian Pose instead.
  • Precise Cartesian speed control is needed - use Set Cartesian Pose, which commands TCP speed directly.
  • You already have the target in joint space - use Set Joint Positions to skip the internal IK solve.