Get TCPs
SUMMARY
get_tcps reads every TCP frame currently registered on the robot, returning a mapping of TCP name to its transform. Use it to inspect what's been registered with Add TCP, before deciding what to pass to Change Active TCP, Update TCP, or Delete TCP.
UNITS
Each transform value is [x, y, z, rx, ry, rz] - translation in meters, orientation as Euler XYZ degrees, relative to the default TCP frame.
The Skill
python
tcps = robot.get_tcps()The Code
python
"""
Reads all registered TCP frames and reports the active TCP.
Supports Universal Robots (UR), Epson, virtual, and Isaac Sim.
Usage:
python get_tcps.py [--ip <ROBOT_IP>] [--prim_path <PRIM_PATH>]
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str | None, prim_path: str | None) -> None:
"""Read all registered TCPs from the robot and report the active TCP."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
try:
#===================== Connect Robot ==========================================
if ip:
robot.connect(ip=ip)
elif prim_path:
robot.connect(simulation_prim_path=prim_path)
robot.set_joint_positions(robot.default_joint_configuration)
# ==================== Run Skill ============================================
tcps = robot.get_tcps()
logger.info(f"Registered TCPs: {tcps}")
logger.info(f"Active TCP: {robot.active_tcp}"
f" \nActive TCP transform: {robot.get_active_tcp_transform()}"
f" \n TCP pose: {robot.get_cartesian_pose()}")
except (ConnectionError, OSError) as e:
logger.error(f"Error occurred: {e}")
finally:
robot.disconnect()
robot.shutdown()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="List all registered TCPs on the robot")
parser.add_argument("--ip", type=str, default=None,
help="UR robot IP address for real hardware, e.g. 192.168.1.100")
parser.add_argument("--prim_path", type=str, default=None,
help='Isaac Sim articulation prim path, e.g. "/World/ur10e"')
args = parser.parse_args()
main(ip=args.ip, prim_path=args.prim_path)Running the Example
bash
python get_tcps.pybash
python get_tcps.py --prim_path /World/ur10ebash
python get_tcps.py --ip 192.168.1.100For all options:
bash
python get_tcps.py --helpParameter Configuration
This skill takes no input parameters.
Returns
| Type | Description |
|---|---|
dict | Maps each registered TCP name (str) to its transform [x, y, z, rx, ry, rz] (list[float]), relative to the default TCP frame. |
Where to Use the Skill
- Inspecting configuration - Check which TCPs have already been registered before adding a new one or picking a name to Change Active TCP to.
- Debugging - Confirm that Add TCP, Update TCP, or Delete TCP produced the expected set of frames.
- Building UI/tooling - Populate a list of selectable tool frames for an operator interface.
When Not to Use the Skill
- You only need the active TCP's transform - use
robot.get_active_tcp_transform()directly instead of filtering the full mapping. - You need the resulting Cartesian pose, not the frame definitions - use Get Cartesian Pose.
- You want to change which TCP is active - use Change Active TCP;
get_tcpsonly reads, it never switches anything.