Skip to content

Get Model

SUMMARY

Get Model returns the standard pinocchio.Model object built from the robot's URDF.

SUPPORTED ROBOTS

Available on all supported manipulators.

The Skill

python
model = robot.get_model()

The Code

python
"""
Read the Pinocchio kinematic model for the Synapse SDK.

``get_model`` returns the standard ``pinocchio.Model`` object built from
the robot's URDF. 

Universal Robots (UR10e) is used here purely for illustration. It supports all robots.

Usage:
    python get_model.py
"""

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main():
    """Read the Pinocchio kinematic model and log a few summary fields."""

    # Create the robot (no connect required — runs on the kinematic model)
    robot = universal_robots.UniversalRobotsUR10E()

    # Read the Pinocchio kinematic model
    model = robot.get_model()
    logger.success(f"Model: {model}")
    logger.info(f"Model name: {model.name}")
    logger.info(f"nq (configuration dim): {model.nq}")
    logger.info(f"nv (velocity dim): {model.nv}")
    logger.info(f"Number of joints: {model.njoints}")
    logger.info(f"Number of frames: {model.nframes}")


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
model = robot.get_model()

Return the standard pinocchio.Model built from the robot's URDF, ready to hand off to any third-party library that expects a Pinocchio model. The model is built lazily on first access and cached on the robot.

python
logger.info(f"nq (configuration dim): {model.nq}")
logger.info(f"nv (velocity dim): {model.nv}")
logger.info(f"Number of joints: {model.njoints}")
logger.info(f"Number of frames: {model.nframes}")

Inspect the model directly via Pinocchio attributes - nq/nv for the configuration and velocity dimensions, plus joint and frame counts.

Return Value

TypeDescription
pinocchio.ModelThe Python Pinocchio kinematic model built from the URDF. Built lazily on first access and cached on the robot.

Where to Use the Skill

  • Custom rigid-body algorithms - Run any algorithm in pinocchio (RNEA, CRBA, ABA, centroidal momentum, …) directly against the robot's model.
  • Research / prototyping - Build new IK or planning algorithms on top of Pinocchio's data structures.
  • Third-party integration - Hand the model to libraries that expect a pinocchio.Model instance.
  • Geometry companions - Pair with Get Collision Model and Get Visual Model for the matching collision and visual GeometryModels.

When Not to Use the Skill

  • A high-level Synapse skill exists - prefer the dedicated skills (Forward Kinematics, Inverse Kinematics, …) for common operations. They wrap unit conventions and TCP frames consistently.
  • Pinocchio is not installed - the first call raises ImportError if the pinocchio package is missing.