skrobot.assembly.Port
- class skrobot.assembly.Port(name: str, description: str = '', port_type: str = 'bidirectional', compatible_types: List[str] = <factory>, z_axis: Tuple[float, float, float]=(0.0, 0.0, 1.0), xyz: Tuple[float, float, float]=(0.0, 0.0, 0.0), rpy: Tuple[float, float, float]=(0.0, 0.0, 0.0))[source]
Represents a connection port on a robot module.
A port is a link in the URDF that can be connected to another module’s port. Typically these are “dummy_link” elements in the URDF files.
- Parameters:
name (str) – The link name in the URDF that serves as a connection point.
description (str, optional) – Human-readable description of this port’s purpose.
port_type (str, optional) – Type of port: “input”, “output”, or “bidirectional”. - “input”: Can only receive connections (e.g., base_link) - “output”: Can only provide connections (e.g., end effector) - “bidirectional”: Can be used as either input or output
compatible_types (List[str], optional) – List of compatible port type names for connection validation.
z_axis (Tuple[float, float, float], optional) – The Z-axis direction of this port in the module’s root frame. Used for automatic port alignment when connecting modules. Default is (0, 0, 1) meaning Z points “up”.
xyz (Tuple[float, float, float], optional) – The port position in the module’s root frame (composed from the joint origins along the root-to-port chain at the zero pose).
rpy (Tuple[float, float, float], optional) – The port orientation (URDF roll-pitch-yaw) in the module’s root frame, so a port is a full SE(3) frame – like a keyed connector, mating is then fully determined.
Methods
- __eq__(other)
Return self==value.
- __ne__(value, /)
Return self!=value.
- __lt__(value, /)
Return self<value.
- __le__(value, /)
Return self<=value.
- __gt__(value, /)
Return self>value.
- __ge__(value, /)
Return self>=value.
Attributes