Gripper Get Model Configuration
SUMMARY
Get Model Configuration returns the joint configuration of the gripper's URDF model, one value per driver joint. Two companion queries return the configuration at a joint-travel fraction or a physical opening, without reading or changing the gripper.
UNITS
URDF units: radians for revolute joints, meters for prismatic joints. opening_width takes unit of "mm" or "m".
The Skill
python
q = gripper.get_model_configuration()
q = gripper.get_model_configuration_at_joint_travel_fraction(0.5)
q = gripper.get_model_configuration_at_opening_width(30.0, unit="mm")The Code
python
"""
Demonstrates how to read the URDF joint configuration of a gripper kinematics
model for the Synapse SDK.
Supports all.
Usage:
python get_model_configuration.py
"""
from loguru import logger
from telekinesis.synapse.tools.parallel_grippers import onrobot
def main() -> None:
"""Reads the model configuration of an OnRobot gripper, then queries other openings."""
#===================== Create Gripper ======================================
gripper = onrobot.OnRobotRG6()
# ==================== Run Skill ===========================================
q = gripper.get_model_configuration()
logger.success(f"Model configuration (URDF units): {q}")
# The same model queried at other openings, without changing the gripper.
q_half = gripper.get_model_configuration_at_joint_travel_fraction(0.5)
q_30mm = gripper.get_model_configuration_at_opening_width(30.0, unit="mm")
logger.info(f"Halfway through joint travel: {q_half}")
logger.info(f"At a 30 mm opening: {q_30mm}")
if __name__ == "__main__":
main()Running the Example
bash
python get_model_configuration.pyFor all options:
bash
python get_model_configuration.py --helpParameter Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
fraction | float | required | get_model_configuration_at_joint_travel_fraction: fraction of joint travel toward open in [0.0, 1.0] (0.0 closed, 1.0 open). |
opening_width | float | required | get_model_configuration_at_opening_width: jaw opening in unit. |
unit | str | required | get_model_configuration_at_opening_width: "mm" or "m". |
Returns
| Type | Description |
|---|---|
np.ndarray | Driver-joint configuration, shape (nq,). Mimic joints are not included; they follow their driver joint. |
Raises
| Exception | Condition |
|---|---|
TypeError | The fraction, opening or unit has an invalid type |
ValueError | The fraction is outside [0.0, 1.0], or the unit is unsupported, or the opening is outside the model's physical range |
NotImplementedError | The gripper has no URDF model |
How to Tune the Parameters
get_model_configuration follows the measured opening: it updates on connect and after every move, open and close. The two _at_ queries assume jaw width is linear in joint travel; calibrate the model for grippers with nonlinear linkages.
Where to Use the Skill
- Visualization - Pass the configuration to Rerun or a planning scene.
- What-if geometry - Place the fingers at an opening before commanding it.
When Not to Use the Skill
- You need the measured opening - use Gripper Get Current Position.