Get Link Transforms
SUMMARY
Get Link Transforms returns a 4×4 homogeneous matrix per frame in the kinematic model. Useful for visualization, attaching coordinate axes, or computing relative transforms between arbitrary frames without calling Forward Kinematics per frame.
UNITS
Returns a dict of link name → 4×4 SE(3) homogeneous transform.
The Skill
python
transforms = robot.get_link_transforms()The Code
python
"""
Read per-link world transforms for a manipulator.
Supports Universal Robots (UR), Epson, and virtual.
Usage:
python get_link_transforms.py
"""
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
from telekinesis.synapse import utils
def main():
"""Read every link's world transform at the current joint configuration."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
# ==================== Run Skill ============================================
transforms = robot.get_link_transforms()
logger.info(f"Number of frames: {len(transforms)}")
# Convert each 4x4 transformation matrix to a pose [x, y, z, rx, ry, rz] (m, deg)
for name, T in transforms.items():
pose = utils.transformation_matrix_to_pose(T, rot_type="deg")
logger.success(f"{name}: pose [m, deg] = {pose}")
if __name__ == "__main__":
main()Parameter Configuration
This skill takes no input parameters.
Returns
| Type | Description |
|---|---|
dict[str, np.ndarray] | {frame_name: world_T_link} - each value is a 4×4 homogeneous transform at the current joint configuration. Excludes "universe". |
Raises
| Exception | Condition |
|---|---|
RuntimeError | The robot's state has not been initialized (the derived class did not call its internal state/publisher setup before this method runs). |
Where to Use the Skill
- Visualization - Stream every link's pose to a 3D visualizer without running FK per frame.
- Sensor attachment - Look up the world pose of any named frame for calibration of the sensor.
- Relative transforms - Compose
world_T_aandworld_T_bfrom the same call to geta_T_bwithout two extra FK calls.
When Not to Use the Skill
- You only need the TCP pose - call Forward Kinematics or Get Cartesian Pose; both avoid the per-frame overhead.
- You need rendered mesh poses - use Get Visual Mesh Transforms, which composes each link's URDF
<visual><origin>offset.