feathersdk.robot.urdf_loader Module

Load a robot URDF into Pinocchio and extract drive-wheel geometry.

class feathersdk.robot.urdf_loader.WheelGeometry(name, center, radius, width)

Bases: object

Geometric properties of a drive wheel extracted from URDF visual meshes.

Parameters:
name: str

URDF link / geometry name prefix for this wheel.

center: ndarray

Wheel mesh center in the URDF world/base frame at neutral configuration, meters.

radius: float

Wheel radius in meters (extent in the plane perpendicular to the axle).

width: float

Wheel width in meters (extent along the axle / world Y at neutral).

to_json_dict()

Serialize this geometry to a JSON-compatible dictionary.

Return type:

Dict[str, Any]

classmethod from_json_dict(data)

Deserialize geometry from a JSON dictionary produced by to_json_dict.

Parameters:

data (Dict[str, Any])

Return type:

WheelGeometry

class feathersdk.robot.urdf_loader.URDFLoader(urdf_path, robot)

Bases: object

Loads a robot URDF into a Pinocchio model and derives swerve-wheel geometry.

Parameters:
  • urdf_path (PathLike) – Path to the URDF file to load.

  • robot (FeatherRobot) – The robot instance; used to read actuator urdf_link_name values for wheel extraction.

urdf_path: Path | None

The path to the loaded URDF file.

property pin_import: ModuleType

The pinocchio module (imported lazily so it is not required unless used).

property pin_all_models: Tuple[Any, Any, Any]

Tuple of the pinocchio (model, collision_model, visual_model).

property pin_model: Any

The pinocchio kinematic model.

property pin_collision_model: Any

The pinocchio collision geometry model.

property pin_visual_model: Any

The pinocchio visual geometry model.

property wheel_geometries: Dict[str, WheelGeometry]

Drive-wheel geometries keyed by urdf_link_name.