novaphy.UrdfGeometry¶
URDF geometry payload. Carries the geometry type plus the single set of
parameters relevant to that type. Box uses size, sphere uses radius,
cylinder uses radius + length, mesh uses mesh_filename (+ optional
mesh_scale).
Attributes¶
| Attribute | Description |
|---|---|
type |
UrdfGeometryType discriminator. |
size |
Box dimensions (sx, sy, sz) [m] when type == Box (per URDF spec, full extents). |
radius |
Sphere or cylinder radius [m]. |
length |
Cylinder length along its local axis [m]. |
mesh_filename |
Mesh path when type == Mesh (resolved relative to the URDF file). |
mesh_scale |
(sx, sy, sz) mesh scale factor. Defaults to (1, 1, 1). |
Example¶
import novaphy
g = novaphy.UrdfGeometry()
g.type = novaphy.UrdfGeometryType.Cylinder
g.radius = 0.05
g.length = 0.3
Notes¶
- Only the field that matches
typeis read; other fields keep their default values and are ignored. - The pair
radius/lengthis shared between sphere and cylinder for storage efficiency. When you settype = Sphere, onlyradiusis read.