pub struct MjcfLoaderOptions {Show 13 fields
pub create_colliders_from_collision_shapes: bool,
pub create_colliders_from_visual_shapes: bool,
pub apply_imported_mass_props: bool,
pub enable_joint_collisions: bool,
pub make_roots_fixed: bool,
pub trimesh_flags: TriMeshFlags,
pub shift: Pose,
pub scale: f32,
pub collider_blueprint: ColliderBuilder,
pub rigid_body_blueprint: RigidBodyBuilder,
pub contact_filter_mode: ContactFilterMode,
pub skip_plane_geoms: bool,
pub disable_joint_motors: bool,
}Expand description
Configuration for MjcfRobot::from_model.
Fields§
§create_colliders_from_collision_shapes: boolBuild colliders for <geom> elements that participate in contact
(contype != 0 or conaffinity != 0). Default true.
create_colliders_from_visual_shapes: boolBuild colliders for <geom> elements that don’t participate in
contact (visual-only, contype == 0 && conaffinity == 0). Default
false.
apply_imported_mass_props: boolUse the model’s <inertial> elements (or compiler-derived inertias)
to set the rigid-body’s mass properties. Default true.
enable_joint_collisions: boolAllow contacts between two bodies sharing a joint. Default false.
make_roots_fixed: boolIf true, the rigid-bodies at the root of the kinematic chains are
initialized as RigidBodyType::Fixed. Default false.
trimesh_flags: TriMeshFlagsTrimesh flags applied to mesh colliders when the default mesh converter is used.
shift: PoseTransform appended to every created rigid-body (default identity).
scale: f32Uniform scale applied to lengths read from the MJCF (default 1.0).
collider_blueprint: ColliderBuilderBlueprint applied to every collider created by the loader (default
has density 0 — physical mass comes from <inertial>).
rigid_body_blueprint: RigidBodyBuilderBlueprint applied to every rigid-body created by the loader (default
dynamic — root bodies are fixed if Self::make_roots_fixed).
contact_filter_mode: ContactFilterModeHow to encode contype/conaffinity into rapier InteractionGroups.
skip_plane_geoms: boolIf true, <geom type="plane"> elements are skipped entirely (no
collider is created, the geom doesn’t contribute to derived inertia,
and the body it belonged to is unaffected).
Default true.
disable_joint_motors: boolIf true, skip the per-joint motor setup that the loader
normally applies for <joint stiffness>, <joint springdamper>,
and <joint frictionloss> attributes (springs and Coulomb-friction
approximations).
<joint damping> is intentionally not affected by this flag —
per-DoF damping is a dynamics-level friction term, not a motor, and
the multibody-joint insertion path still routes <joint damping>
values through the multibody’s per-DoF damping vector. (The
impulse-joint path has no per-DoF damping buffer, so damping is
lost there when this flag is on.)
The joint kinematic structure (type, axis, anchor, limits) is still honored. Useful when:
- you want pure kinematic dynamics for debugging,
- the model declares spring stiffness that’s too high for your simulation timestep,
- you intend to drive every joint yourself through
MjcfRobotHandles::apply_controlsand don’t want the loader’s default motors fighting your controller.
Default false.
Trait Implementations§
Source§impl Clone for MjcfLoaderOptions
impl Clone for MjcfLoaderOptions
Source§fn clone(&self) -> MjcfLoaderOptions
fn clone(&self) -> MjcfLoaderOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MjcfLoaderOptions
impl Debug for MjcfLoaderOptions
Auto Trait Implementations§
impl !RefUnwindSafe for MjcfLoaderOptions
impl !UnwindSafe for MjcfLoaderOptions
impl Freeze for MjcfLoaderOptions
impl Send for MjcfLoaderOptions
impl Sync for MjcfLoaderOptions
impl Unpin for MjcfLoaderOptions
impl UnsafeUnpin for MjcfLoaderOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.