Skip to content

Set Joint Position in Cartesian Space

SUMMARY

Set Joint Position in Cartesian Space moves the robot to a target joint configuration using a trajectory that is linear in Cartesian space (movel in UR terminology).

This skill produces a straight TCP path between the current pose and the pose implied by the target joint configuration. Use it when the shape of the tool path matters.

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_joint_position_in_cartesian_space(
    joint_positions=target_joint_positions,
    speed=0.25,
    acceleration=0.25,
    asynchronous=False,
)

The Code

Example 1: Synchronous Joint Position in Cartesian Space

Read the current joint positions, shift the first joint by −10°, and block until the robot reaches the target using a Cartesian-linear trajectory.

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_joint_positions = robot.get_joint_positions()

new_joint_positions = initial_joint_positions[:]
new_joint_positions[0] -= 10

robot.set_joint_position_in_cartesian_space(
    joint_positions=new_joint_positions,
    speed=0.25,
    acceleration=0.25,
    asynchronous=False,
)
logger.info(f"Moved to target joint positions: {new_joint_positions}")

# Disconnect
robot.disconnect()

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

Start the Cartesian-linear motion without blocking, wait briefly, then stop the robot.

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_joint_positions = robot.get_joint_positions()

new_joint_positions = actual_joint_positions[:]
new_joint_positions[0] += 10

robot.set_joint_position_in_cartesian_space(
    joint_positions=new_joint_positions,
    speed=0.25,
    acceleration=0.25,
    asynchronous=True,
)
time.sleep(0.5)
robot.stop_cartesian_motion(stopping_speed=0.25)
logger.info(f"Stopped Cartesian motion before reaching: {new_joint_positions}")

# Disconnect
robot.disconnect()

The Explanation of the Code

set_joint_position_in_cartesian_space commands the robot controller to solve the forward kinematics of the target joint configuration and then execute a Cartesian-linear move to that resulting TCP pose. The TCP follows a straight line in space.

Joint positions. joint_positions is a 1D list of joint angles in degrees, one per joint.

Speed and acceleration. speed is the TCP linear speed in m/s; acceleration is the TCP linear acceleration in m/s².

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

How to Tune the Parameters

ParameterTypeDefaultDescription
joint_positionslist[float] or np.ndarrayTarget joint angles in degrees, one per joint.
speedfloat1.05TCP linear speed in m/s.
accelerationfloat1.4TCP linear acceleration in m/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

  • Straight TCP paths to a joint-defined target — Use when you know the target in joint space but require a Cartesian-linear approach
  • Assembly and insertion tasks — Straight-line approach paths reduce the risk of collisions near fixtures

When Not to Use the Skill

Do not use Set Joint Position in Cartesian Space when: