Skip to content

Set Cartesian Pose

SUMMARY

Set Cartesian Pose commands the robot end-effector to a target pose in Cartesian space.

This skill is used for precise task-space motion in applications such as pick-and-place, assembly, and tool positioning.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only.

The Skill

python
robot.set_cartesian_pose(
    cartesian_pose=target_pose,
    speed=0.25,
    acceleration=0.25,
    asynchronous=False,
)

The Code

Example 1: Synchronous Cartesian motion

Read the current TCP pose, shift the end-effector 0.2 m downward, 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()
robot.connect(ip=robot_ip)

initial_tcp_pose = robot.get_cartesian_pose()

new_tcp_pose = initial_tcp_pose[:]
new_tcp_pose[2] -= 0.2

robot.set_cartesian_pose(
    cartesian_pose=new_tcp_pose,
    speed=0.25,
    acceleration=0.25,
    asynchronous=False,
)
logger.info(f"Moved to target Cartesian pose: {new_tcp_pose}")

robot.disconnect()

Example 2: Asynchronous Cartesian motion with early stop

Start the same 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()
robot.connect(ip=robot_ip)

actual_tcp_pose = robot.get_cartesian_pose()

new_tcp_pose = actual_tcp_pose[:]
new_tcp_pose[2] += 0.2

robot.set_cartesian_pose(
    cartesian_pose=new_tcp_pose,
    speed=0.1,
    acceleration=0.1,
    asynchronous=True,
)
time.sleep(0.5)
robot.stop_cartesian_motion(stopping_speed=0.1)
logger.info(f"Stopped Cartesian motion before reaching: {new_tcp_pose}")

robot.disconnect()

The Explanation of the Code

set_cartesian_pose commands the robot controller to move the TCP (tool center point) to the specified target pose along a straight line in Cartesian space. The call is blocking by default — it returns only after the TCP reaches the target.

Pose format. cartesian_pose is a list or array [x, y, z, rx, ry, rz] where position is in metres and orientation is expressed as Euler angles in degrees. Use get_cartesian_pose() to read the current state and build a relative offset, as shown above.

Speed and acceleration. speed is the TCP speed in m/s and acceleration is the TCP acceleration in m/s². Typical values are in the range 0.05–0.5 m/s for most tasks.

Asynchronous mode. When asynchronous=True, the call returns immediately and the robot moves in the background. Use stop_cartesian_motion(stopping_speed) to decelerate and halt the TCP before the target is reached. stopping_speed controls the deceleration rate (in m/s).

How to Tune the Parameters

ParameterTypeDefaultDescription
cartesian_poselist[float] or np.ndarrayTarget pose [x, y, z, rx, ry, rz]. Position in metres; orientation in degrees.
speedfloat1.05TCP speed in m/s. The default is a conservative safety value; see the examples above for typical usage.
accelerationfloat1.4TCP acceleration in m/s². The default is a conservative safety value; see the examples above for typical usage.
asynchronousboolFalseIf True, return immediately without waiting for the motion to complete.

Choosing speed and acceleration

Use lower speed values (e.g. speed=0.05) near obstacles or during contact tasks. Increase speed only after validating the motion path in a safe environment.

WARNING

Poses near kinematic singularities or outside the reachable workspace will raise a RuntimeError. Wrap calls in a try/except block in production code, and verify target poses with Inverse Kinematics before commanding motion.

Where to Use the Skill

  • Pick-and-place — Move the TCP to approach, grasp, and release poses defined in Cartesian space
  • Assembly — Insert a part along a straight-line path in the task frame
  • Tool positioning — Place a welding tip, camera, or sensor at a precise location in the workspace
  • Relative offsets — Apply small corrections (e.g. from vision feedback) by offsetting the current TCP pose

When Not to Use the Skill

Do not use Set Cartesian Pose when:

  • You need to reach a specific joint configuration — use Set Joint Positions to command joint space directly
  • The target pose is near a kinematic singularity — Cartesian motion through or near a singularity will cause erratic behaviour; replan the path to avoid it
  • Collision avoidance along the straight-line path is required — Cartesian moves do not account for obstacles; plan the trajectory upstream before commanding motion
  • You only know the target in joint space — use Forward Kinematics to convert joints to a pose if needed