novaphy.UrdfImportOptions¶
Per-import options consumed by SceneBuilderEngine.build_from_urdf. Toggles control floating-base treatment, self-collision filtering, fixed-joint collapse, and the visual / inertial fallbacks used when a URDF link is under-specified.
Attributes¶
| Attribute | Description |
|---|---|
floating_base |
If True, the root link is given a 6-DOF free joint to the world. Default: False. |
enable_self_collisions |
If True, collisions between links of the same articulation are kept; otherwise the builder filters all intra-articulation pairs. Default: False. |
collapse_fixed_joints |
Merge children of <joint type="fixed"> into the parent link, rebasing visuals / collisions / inertia. Default: True. |
use_visual_collision_fallback |
When a <link> has visuals but no <collision>, build collision shapes from the visual mesh. Default: False. |
ignore_inertial_definitions |
Discard URDF <inertial> blocks and let add_shape_* derive mass / inertia from shape geometry + density. Default: False. |
root_transform |
Transform applied to the root link (positions the robot in the world). Default: identity. |
Example¶
import numpy as np
import novaphy
opts = novaphy.UrdfImportOptions()
opts.floating_base = True
opts.collapse_fixed_joints = True
opts.enable_self_collisions = False
opts.root_transform = novaphy.Transform.from_translation(
np.array([0.0, 0.0, 1.0], dtype=np.float32)
)
engine = novaphy.SceneBuilderEngine()
result = engine.build_from_urdf(parsed_urdf, opts)