Stop Cartesian Motion
SUMMARY
Stop Cartesian Motion decelerates the robot and brings any active Cartesian (TCP-linear) motion to a complete stop.
This skill is the safe and controlled way to interrupt a Cartesian move that was launched with asynchronous=True.
SUPPORTED ROBOTS
Currently supported only on Universal Robots.
UNITS
stopping_speed in m/s² (deceleration magnitude).
The Skill
robot.stop_cartesian_motion(stopping_speed=0.5)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.
Example: Stop Cartesian Motion Mid-Move
Launch an asynchronous Cartesian move, wait briefly, then stop the robot before it reaches the target.
"""
Stop Cartesian Motion example for the Synapse SDK.
Commands an asynchronous Cartesian move and interrupts it mid-trajectory
with ``stop_cartesian_motion``. ``stopping_speed`` controls the
deceleration profile (m/s).
Currently supported only for Universal Robots (UR10e).
Usage:
python stop_cartesian_motion.py --ip <ROBOT_IP>
"""
import argparse
import time
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(robot_ip: str):
"""Start an async Cartesian move and interrupt it with stop_cartesian_motion."""
# Create robot instance
robot = universal_robots.UniversalRobotsUR10E()
# Connect to the robot
robot.connect(ip=robot_ip)
# Get initial Cartesian pose [x, y, z, rx, ry, rz] (m, deg)
actual_pose = robot.get_cartesian_pose()
# Asynchronous +15 cm move along Z
target_pose = actual_pose[:]
target_pose[2] += 0.15
robot.set_cartesian_pose(
cartesian_pose=target_pose,
speed=0.25,
acceleration=0.5,
asynchronous=True,
)
# Let the move run briefly, then interrupt it
time.sleep(0.3)
robot.stop_cartesian_motion(stopping_speed=0.25)
logger.info("Stopped Cartesian motion.")
# Disconnect
robot.disconnect()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="UR robot stop cartesian motion 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
stop_cartesian_motion sends a deceleration command to the robot controller, which smoothly brings any ongoing Cartesian move to a halt. The stopping_speed parameter controls how aggressively the robot decelerates - lower values yield gentler stops; higher values yield faster stops.
How to Tune the Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
stopping_speed | float | 0.5 | Deceleration target speed in m/s. Lower values produce gentler stops. |
Return Value
| Type | Description |
|---|---|
None | Returns after the stop command is sent. |
Where to Use the Skill
- Interrupt asynchronous Cartesian moves - Stop a
set_cartesian_poseorset_joint_position_in_cartesian_spacecall launched withasynchronous=True - Emergency path abort - Halt TCP motion immediately when a sensor or vision system detects an obstacle
When Not to Use the Skill
Do not use Stop Cartesian Motion when:
- The active motion is joint-interpolated - use Stop Joint Motion instead
- The motion is already synchronous - synchronous calls block until completion; there is no motion to interrupt

