Get Visual Model
SUMMARY
Get Visual Model returns the pinocchio.GeometryModel populated from the URDF's <visual> tags.
SUPPORTED ROBOTS
Available on all supported manipulators.
The Skill
python
visual_model = robot.get_visual_model()The Code
python
"""
Read the Pinocchio visual geometry model for the Synapse SDK.
``get_visual_model`` returns the Python Pinocchio ``GeometryModel``
populated with the robot's visual geometries from the URDF.
Universal Robots (UR10e) is used here purely for illustration. It supports all robots.
Usage:
python get_visual_model.py
"""
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main():
"""Read the Pinocchio visual geometry model and log a summary."""
# Create the robot (no connect required — runs on the kinematic model)
robot = universal_robots.UniversalRobotsUR10E()
# Read the Pinocchio visual GeometryModel
visual_model = robot.get_visual_model()
logger.info(f"Number of visual geometries: {len(visual_model.geometryObjects)}")
for geom in visual_model.geometryObjects:
logger.info(f" - {geom.name}")
if __name__ == "__main__":
main()The Explanation of the Code
python
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. No connect() is required - runs against the kinematic model.
python
visual_model = robot.get_visual_model()Return the pinocchio.GeometryModel built from the URDF's <visual> tags - the high-poly meshes intended for rendering. The model is built lazily on first access and cached on the robot.
python
for geom in visual_model.geometryObjects:
logger.info(f" - {geom.name}")Iterate geometryObjects to enumerate each visual geometry. Hand the whole model to any Pinocchio-aware visualizer to render the robot.
Return Value
| Type | Description |
|---|---|
pinocchio.GeometryModel | Visual GeometryModel built from the URDF's <visual> declarations. Built lazily on first access and cached on the robot. |
Where to Use the Skill
- Pinocchio-native visualizers - Hand the visual model to any visualizer that expects a
GeometryModel. - Custom rendering - Drive any renderer that consumes Pinocchio geometry objects.
- Companion to Get Model and Get Collision Model when a library expects the full
(model, collision_model, visual_model)triple.
When Not to Use the Skill
- You use a raw-array visualizer - prefer Get Visual Meshes Data + Get Visual Mesh Transforms, which return NumPy arrays directly.
- You need collision geometries - call Get Collision Model instead.
- Pinocchio is not installed - the first call raises
ImportError.

