Get Visual Mesh Transforms
SUMMARY
Get Visual Mesh Transforms is the rendering-ready version of Get Link Transforms: link frames composed with the URDF <visual><origin> mesh offset, filtered to only the links that actually have a visual mesh.
UNITS
Returns a dict of mesh name → 4×4 SE(3) homogeneous transform in meters (translation column).
The Skill
python
transforms = robot.get_visual_mesh_transforms()The Code
python
"""
Read per-link visual mesh world transforms for a manipulator.
Supports Universal Robots (UR), Epson, and virtual.
Usage:
python get_visual_mesh_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 visual-mesh world transform at the current joint configuration."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
# ==================== Run Skill ============================================
transforms = robot.get_visual_mesh_transforms()
logger.info(f"Number of links with visual meshes: {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] | {link_name: world_T_visual_mesh} - each value is a 4×4 homogeneous transform at which the corresponding visual mesh should be rendered. Links without a usable mesh are omitted. |
Raises
| Exception | Condition |
|---|---|
RuntimeError | The robot's state has not been initialized (the derived class did not call _initialize_state_and_publishers()) |
ImportError | trimesh is not installed, surfaced from the underlying get_visual_meshes_data() call on the first invocation only (subsequent calls hit the cache) |
Where to Use the Skill
- Visualization - Render the robot's URDF visual meshes at the correct world poses in any 3D visualizer. Pair with Get Visual Meshes Data for the raw vertex / triangle arrays.
- Digital twin - Stream live mesh poses to a remote viewer for monitoring or teleoperation.
- Synthetic data generation - Drive an offline renderer at known robot configurations.
When Not to Use the Skill
- You only need link frames - call Get Link Transforms to skip the mesh-origin composition and keep every frame (including ones without a visual).