Skip to content

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: True.
enable_self_collisions If True, non-adjacent links in the same articulation may collide; shapes on the same surviving body and direct parent-child body pairs remain filtered. If False, all intra-articulation shape pairs are filtered. Default: True.
collapse_fixed_joints Merge children of <joint type="fixed"> into the parent link, rebasing visuals / collisions / inertia. Default: False.
use_visual_collision_fallback When a <link> has visuals but no <collision>, build one collision shape from the first visual's geometry (box, sphere, cylinder, or mesh). Default: False.
ignore_inertial_definitions Ignore the authored COM and inertia tensor, retain the URDF link mass, divide that mass evenly among collision entries, estimate each entry's inertia from its geometry, and combine the results. Links with no usable collision geometry fall back to the authored inertial data. Default: False.
mesh_collision_mode UrdfMeshCollisionMode policy for mesh collision import. Default: BoxFallback.
use_transmission_drive_defaults Apply parsed transmission metadata to default joint-drive settings when building from URDF. Default: False.
transmission_target_mode Target mode used when transmission drive defaults are enabled.
transmission_target_stiffness Default target stiffness used when transmission drive defaults are enabled.
transmission_target_damping Default target damping used when transmission drive defaults are enabled.
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)

See Also