Skip to content

Set Cartesian Pose in Joint Space

SUMMARY

Set Cartesian Pose in Joint Space moves the robot to a target Cartesian pose using a trajectory that is linear in joint space (movej in UR terminology).

This skill produces smooth joint motion to a Cartesian target. It is faster and more predictable than Cartesian-interpolated motion for large reorientations, but does not guarantee a straight TCP path.

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
robot.set_cartesian_pose_in_joint_space(
    cartesian_pose=target_pose,
    speed=60,
    acceleration=80,
    asynchronous=False,
)

The Code

Example 1: Synchronous Cartesian Pose in Joint Space

Read the current TCP pose, shift it 10 cm along the Z-axis, and block until the robot reaches the target.

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)

initial_pose = robot.get_cartesian_pose()

target_pose = initial_pose[:]
target_pose[2] -= 0.1

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

# Disconnect
robot.disconnect()

Example 2: Asynchronous Cartesian Pose in Joint Space with Early Stop

Start the motion without blocking, wait briefly, then stop the robot before it reaches the target.

python
import time
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)

actual_pose = robot.get_cartesian_pose()

target_pose = actual_pose[:]
target_pose[2] += 0.1

robot.set_cartesian_pose_in_joint_space(
    cartesian_pose=target_pose,
    speed=20,
    acceleration=40,
    asynchronous=True,
)
time.sleep(0.5)
robot.stop_joint_motion(stopping_speed=20)
logger.info(f"Stopped joint motion before reaching: {target_pose}")

# Disconnect
robot.disconnect()

The Explanation of the Code

set_cartesian_pose_in_joint_space commands the robot controller to reach a Cartesian target using a joint-interpolated trajectory. The controller solves IK internally and moves all joints simultaneously, resulting in the smoothest possible joint motion while arriving at the desired end-effector pose.

Cartesian pose. cartesian_pose is a 6-element list [x, y, z, rx, ry, rz]. Position is in meters; orientation is expressed as Euler angles in degrees.

Speed and acceleration. speed is the leading joint speed in deg/s; acceleration is the leading joint acceleration in deg/s².

Asynchronous mode. When asynchronous=True, the call returns immediately and the robot moves in the background. Use stop_joint_motion(stopping_speed) to decelerate and halt before the target is reached.

How to Tune the Parameters

ParameterTypeDefaultDescription
cartesian_poselist[float] or np.ndarrayTarget pose [x, y, z, rx, ry, rz] in meters and degrees.
speedfloat60Leading joint speed in deg/s.
accelerationfloat80Leading joint acceleration in deg/s².
asynchronousboolFalseIf True, return immediately without waiting for the motion to complete.

Return Value

TypeDescription
NoneReturns when the robot reaches the target (synchronous) or immediately (asynchronous).

Where to Use the Skill

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

When Not to Use the Skill

Do not use Set Cartesian Pose in Joint Space when:

  • 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 to command TCP speed directly