Get TCP Speed
SUMMARY
Get TCP Speed returns the TCP twist [vx, vy, vz, ωx, ωy, ωz] - linear in m/s, angular in deg/s, expressed in the robot base frame.
Reads from the manipulator state - live values when connected, zero-filled offline.
SUPPORTED ROBOTS
Available on all supported manipulators in offline mode. Live hardware readings are currently supported only on Universal Robots.
UNITS
Returns TCP twist [vx, vy, vz, ωx, ωy, ωz] - linear in m/s, angular in deg/s.
The Skill
tcp_speed = robot.get_tcp_speed()The Code
"""
Read TCP velocity (twist) example for the Synapse SDK.
Returns the TCP twist ``[vx, vy, vz (m/s), ωx, ωy, ωz (deg/s)]``. With
``--ip``, reads live hardware state. Without ``--ip``, reads from the
internal commanded cache (no connection made) and logs a warning.
Currently supported only for Universal Robots (UR10e).
Usage:
python get_tcp_speed.py [--ip <ROBOT_IP>]
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str | None = None):
"""Log the current TCP velocity [m/s, deg/s]."""
robot = universal_robots.UniversalRobotsUR10E()
if ip is not None:
robot.connect(ip=ip)
else:
logger.warning(
"No --ip provided; reading offline commanded-cache state, "
"not live hardware readings."
)
try:
logger.success(f"tcp_speed [m/s, deg/s]: {robot.get_tcp_speed()}")
finally:
if ip is not None:
robot.disconnect()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Read TCP velocity Synapse example")
parser.add_argument("--ip", type=str, default=None, help="UR robot IP address (optional)")
args = parser.parse_args()
main(ip=args.ip)The Explanation of the Code
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.
if ip is not None:
robot.connect(ip=ip)Connect to the robot at the given IP. When no --ip is passed, no connection is made and the getter returns from the offline commanded-cache (zero-filled) instead of live hardware.
logger.success(f"tcp_speed [m/s, deg/s]: {robot.get_tcp_speed()}")Read the TCP twist [vx, vy, vz, ωx, ωy, ωz] in the base frame, linear in m/s and angular in deg/s. When connected this is the live controller value; offline the cache is zero-filled.
finally:
if ip is not None:
robot.disconnect()Always release the controller link in a finally block so a failure mid-read still cleans up the connection.
Return Value
| Type | Description |
|---|---|
list[float] | TCP twist [vx, vy, vz, ωx, ωy, ωz]. Linear in m/s, angular in deg/s, expressed in the robot base frame. Zero-filled offline. |
Where to Use the Skill
- Speed monitoring - Verify the TCP is moving at the commanded speed during a Cartesian move.
- Stop detection - Confirm the TCP has come to rest before initiating the next step.
- Velocity-based control - Use TCP speed as feedback in a Cartesian impedance controller.
When Not to Use the Skill
- You need joint velocities - use Get Joint Velocities instead.
- You need TCP force - use Get TCP Force instead.

