motrixsim.msd#
警告
该模块仍处于早期开发中,API 还不稳定,随着版本更新可能会有大幅变动。
Classes:
|
|
The target type this actuator is applied to. |
|
This defines how to generate force by diff of control value and current value(actuator_length). |
|
Alpha blending mode for materials. |
|
Global ambient light that illuminates all surfaces uniformly. |
|
|
|
Attributes for procedurally generated textures (gradient, checker, flat). |
|
|
A camera definition with position, orientation, tracking, and projection settings. |
Convex approximation mode used by CoACD when building output hulls. |
|
CoACD convex decomposition parameters stored in MSD simulation options. |
|
Preprocess mode used by CoACD before convex decomposition. |
|
Collision mask for a collider. |
|
The equality constraint between two links. |
|
# Note |
|
Variants: |
|
Sensor to report contact information between objects. |
|
Type of contact data to report. |
|
Strategy for convex hull generation. |
|
Parameters for a directional (sun-like) light source. |
|
Descriptor for a dynamic texture whose pixel content is set at runtime. |
|
Contact force override model for constraint solving. |
|
Variants: |
|
A free-look camera defined by azimuth and elevation angles. |
|
Spring-damper parameters using natural frequency and damping ratio. |
|
Visual rendering attributes for a geometry (material, color, visibility group). |
|
|
|
attention: the height values here (in source_type.buffer.hfield) are real values stored in MuJoCo-compatible row-major order, with row 0 on the -Y side and columns increasing toward +X. |
|
Variants: |
|
There's always a head light for every camera. |
|
The scene hierarchy, including all bodies, geoms, lights, cameras and sites. |
|
The impedance model same with mujoco. |
|
Combination of spring-damper with impedance model. |
|
|
Inertial properties of a rigid body (mass, center of mass, principal inertia). |
|
|
The type of joint connecting two links. |
|
|
|
|
A texture layer within a material, binding a texture to a semantic role. |
|
A light source in the scene with position, direction, color, and type. |
Light source type for a scene light. |
|
|
|
|
|
|
Mesh data with vertex attributes. |
Variants: |
|
From mesh to geom, subtract position and inverse rotation to geom local |
|
Variants: |
|
Physical material properties governing contact force model and friction. |
|
Parameters for an omnidirectional point light source. |
|
The special parameters of position actuator. |
|
|
A reflection probe capturing environment reflections within a bounding volume. |
|
A numeric range defined by inclusive lower and upper bounds. |
Collection of all sensor types in a scene. |
|
When a primitive shape references a mesh, a geometric primitive of that type is fitted to the mesh. |
|
|
|
Parameters for a spot light with cone angle and range. |
|
Variants: |
|
Define a spring-damper system. |
|
The spring length type of the tendon. |
|
Spring-damper parameters using stiffness and damping coefficients. |
|
|
A texture asset with its source, type, and rendering properties. |
Source type for a texture. |
|
Tone mapping configuration controlling HDR-to-LDR conversion. |
|
Camera tracking mode relative to a parent body. |
|
|
|
Variants: |
|
|
Functions:
|
Build a world into a SceneModel ready for simulation. |
|
Load a model file and return a World for transformation and building. |
|
Load MSD from MessagePack binary data. |
|
Load string and return a World for transformation and building. |
- class motrixsim.msd.Actuator#
基类:
objectAttributes:
(Read/Write) Actuator behavior model used to generate output force.
(Read/Write) Optional control input range clamp.
(Read/Write) Optional output force range clamp.
(Read/Write) Transmission gear vector from actuator scalar to 6D generalized force.
(Read/Write) Optional unique actuator name.
(Read/Write) The target object driven by this actuator.
- actuator_type#
(Read/Write) Actuator behavior model used to generate output force.
- Type:
- gear#
(Read/Write) Transmission gear vector from actuator scalar to 6D generalized force.
- Type:
list[float]
- name#
(Read/Write) Optional unique actuator name.
- Type:
Optional[str]
- target#
(Read/Write) The target object driven by this actuator.
- Type:
- class motrixsim.msd.ActuatorTarget#
基类:
objectThe target type this actuator is applied to.
- Variants:
floating_base(str): e.g. freejoint or some 6 DOF target joint(str) tendon(str) link(str)
Methods:
floating_base(value)e.g. freejoint or some 6 DOF target.
joint(value)link(value)tendon(value)Attributes:
- static floating_base(value)#
e.g. freejoint or some 6 DOF target
- static joint(value)#
- static link(value)#
- static tendon(value)#
- value#
Associated data of the active variant.
- Type:
str
- variant#
Active variant name.
Possible values: "floating_base", "joint", "tendon", "link"
- Type:
str
- class motrixsim.msd.ActuatorType#
基类:
objectThis defines how to generate force by diff of control value and current value(actuator_length).
- Variants:
general(GeneralParam) motor position(PositionParam) velocity(float) adhesion(float)
Methods:
Attributes:
- static adhesion(value)#
- static general(value)#
- static motor()#
- static position(value)#
- static velocity(value)#
- value#
Associated data of the active variant.
Returns None for unit variants.
- Type:
GeneralParam | None | PositionParam | float
- variant#
Active variant name.
Possible values: "general", "motor", "position", "velocity", "adhesion"
- Type:
str
- class motrixsim.msd.AlphaMode#
基类:
objectAlpha blending mode for materials.
- Variants:
opaque mask(float) blend multiply
Methods:
Attributes:
- static blend()#
- static mask(value)#
- static multiply()#
- static opaque()#
- value#
Associated data of the active variant.
Returns None for unit variants.
- Type:
None | float
- variant#
Active variant name.
Possible values: "opaque", "mask", "blend", "multiply"
- Type:
str
- class motrixsim.msd.AmbientLight#
基类:
objectGlobal ambient light that illuminates all surfaces uniformly.
Attributes:
(Read/Write) Ambient light brightness.
(Read/Write) Ambient light RGB color.
- brightness#
(Read/Write) Ambient light brightness.
- Type:
float
- color#
(Read/Write) Ambient light RGB color.
- Type:
list[float]
- class motrixsim.msd.AssetSpecs#
基类:
objectAttributes:
(Read/Write) Height-field assets indexed by hfield name.
(Read/Write) for user defined materials, the key is the material name for in file materials, the key is the path#material_name
(Read/Write) Mesh assets indexed by mesh name.
(Read/Write) TextureType::Skybox texture doesn't need material element
(Read/Write) Texture assets indexed by texture name.
- hfields#
(Read/Write) Height-field assets indexed by hfield name.
- Type:
dict[str, HFieldSource]
- materials#
(Read/Write) for user defined materials, the key is the material name for in file materials, the key is the path#material_name
- Type:
dict[str, Material]
- meshes#
(Read/Write) Mesh assets indexed by mesh name.
- Type:
dict[str, MeshSource]
- skybox#
(Read/Write) TextureType::Skybox texture doesn't need material element
- Type:
Optional[str]
- class motrixsim.msd.BiasType#
基类:
objectAttributes:
- Affine = BiasType.Affine#
- None_ = BiasType.None_#
- class motrixsim.msd.Body#
基类:
objectAttributes:
(Read/Write) If assigned, the body will be treated as a free body and the joints of the base link will be ignored.
(Read/Write) The base link of the body.
(Read/Write) Whether this is a mocap body.
- free#
(Read/Write) If assigned, the body will be treated as a free body and the joints of the base link will be ignored.
- Type:
Optional[FreeJoint]
- mocap#
(Read/Write) Whether this is a mocap body. only work when the body is fixed type
- Type:
bool
- class motrixsim.msd.BuildinAttr#
基类:
objectAttributes for procedurally generated textures (gradient, checker, flat).
Attributes:
(Read/Write) Generated texture height in pixels.
(Read/Write) Marker pattern type.
(Read/Write) Marker color.
(Read/Write) Primary color used by generated texture.
(Read/Write) Secondary color used by generated texture.
(Read/Write) Generated texture width in pixels.
- height#
(Read/Write) Generated texture height in pixels.
- Type:
float
- markrgb#
(Read/Write) Marker color.
- Type:
list[float]
- rgb1#
(Read/Write) Primary color used by generated texture.
- Type:
list[float]
- rgb2#
(Read/Write) Secondary color used by generated texture.
- Type:
list[float]
- width#
(Read/Write) Generated texture width in pixels.
- Type:
float
- class motrixsim.msd.Camera(name=None, position=None, orientation=None, position_track=Ellipsis, rotation_track=Ellipsis, track_target=None, orthographic=False, fovy=45.0, depth_only=False, znear=0.0, zfar=0.0, track_position_speed=0.0, track_rotation_speed=0.0, resolution_x=1, resolution_y=1)#
基类:
objectA camera definition with position, orientation, tracking, and projection settings.
Attributes:
(Read/Write) Whether to render depth only.
(Read/Write) degrees
(Read/Write) The name of the camera.
(Read/Write) The local orientation of the camera.
(Read/Write) Whether to use orthographic projection.
(Read/Write) The local position of the camera.
(Read/Write) Position tracking behavior.
(Read/Write) The camera render resolution width.
(Read/Write) The camera render resolution height.
(Read/Write) Rotation tracking behavior.
(Read/Write) The speed of the camera to reach the target position.
(Read/Write) The speed of the camera to reach the target orientation.
(Read/Write) The track target name.
(Read/Write) The far clipping plane distance.
(Read/Write) The near clipping plane distance.
- depth_only#
(Read/Write) Whether to render depth only.
- Type:
bool
- fovy#
(Read/Write) degrees
- Type:
float
- name#
(Read/Write) The name of the camera.
- Type:
Optional[str]
- orientation#
(Read/Write) The local orientation of the camera.
- Type:
numpy.ndarray
- orthographic#
(Read/Write) Whether to use orthographic projection.
- Type:
bool
- position#
(Read/Write) The local position of the camera.
- Type:
numpy.ndarray
- position_track#
(Read/Write) Position tracking behavior.
- Type:
- resolution_x#
(Read/Write) The camera render resolution width.
- Type:
int
- resolution_y#
(Read/Write) The camera render resolution height.
- Type:
int
- rotation_track#
(Read/Write) Rotation tracking behavior.
- Type:
- track_position_speed#
(Read/Write) The speed of the camera to reach the target position. 0 means no speed limit.
- Type:
float
- track_rotation_speed#
(Read/Write) The speed of the camera to reach the target orientation. 0 means no speed limit.
- Type:
float
- track_target#
(Read/Write) The track target name. Currently only used for RotationTrack::LookAtLink.
- Type:
Optional[str]
- zfar#
(Read/Write) The far clipping plane distance. If 0, it will be computed from global config automatically.
- Type:
float
- znear#
(Read/Write) The near clipping plane distance. If 0, it will be computed from global config automatically.
- Type:
float
- class motrixsim.msd.CoACDApxMode#
基类:
objectConvex approximation mode used by CoACD when building output hulls.
Attributes:
- Box = CoACDApxMode.Box#
- Ch = CoACDApxMode.Ch#
- class motrixsim.msd.CoACDConfig#
基类:
objectCoACD convex decomposition parameters stored in MSD simulation options.
Attributes:
(Read/Write) Convex approximation mode used inside CoACD.
(Read/Write) Whether to decimate the mesh before decomposition.
(Read/Write) Whether to extrude thin structures before decomposition.
(Read/Write) Margin used by the extrusion pass.
(Read/Write) Maximum vertex count allowed for backend-generated convex hulls.
(Read/Write) Maximum number of hulls requested from the CoACD backend.
(Read/Write) Number of MCTS iterations used to search cutting planes.
(Read/Write) Maximum recursion depth for the MCTS search tree.
(Read/Write) Number of MCTS nodes explored per split step.
(Read/Write) Whether to merge output hulls after decomposition.
(Read/Write) Whether to apply PCA normalization before decomposition.
(Read/Write) Resolution used by the preprocess stage when remeshing is enabled.
(Read/Write) Whether CoACD should preprocess/remesh the input mesh before decomposition.
(Read/Write) Whether to interpret the threshold in scene units instead of normalized units.
(Read/Write) Number of samples used when evaluating concavity.
(Read/Write) Random seed used by CoACD.
(Read/Write) Error threshold used by CoACD to decide whether a part should keep splitting.
- apx_mode#
(Read/Write) Convex approximation mode used inside CoACD.
- Type:
- decimate#
(Read/Write) Whether to decimate the mesh before decomposition.
- Type:
bool
- extrude#
(Read/Write) Whether to extrude thin structures before decomposition.
- Type:
bool
- extrude_margin#
(Read/Write) Margin used by the extrusion pass.
- Type:
float
- max_ch_vertex#
(Read/Write) Maximum vertex count allowed for backend-generated convex hulls.
- Type:
int
- max_convex_hull#
(Read/Write) Maximum number of hulls requested from the CoACD backend.
- Type:
int
- mcts_iteration#
(Read/Write) Number of MCTS iterations used to search cutting planes.
- Type:
int
- mcts_max_depth#
(Read/Write) Maximum recursion depth for the MCTS search tree.
- Type:
int
- mcts_nodes#
(Read/Write) Number of MCTS nodes explored per split step.
- Type:
int
- merge#
(Read/Write) Whether to merge output hulls after decomposition.
- Type:
bool
- pca#
(Read/Write) Whether to apply PCA normalization before decomposition.
- Type:
bool
- prep_resolution#
(Read/Write) Resolution used by the preprocess stage when remeshing is enabled.
- Type:
int
- preprocess_mode#
(Read/Write) Whether CoACD should preprocess/remesh the input mesh before decomposition.
- Type:
- real_metric#
(Read/Write) Whether to interpret the threshold in scene units instead of normalized units.
- Type:
bool
- sample_resolution#
(Read/Write) Number of samples used when evaluating concavity.
- Type:
int
- seed#
(Read/Write) Random seed used by CoACD.
- Type:
int
- threshold#
(Read/Write) Error threshold used by CoACD to decide whether a part should keep splitting.
- Type:
float
- class motrixsim.msd.CoACDPreprocessMode#
基类:
objectPreprocess mode used by CoACD before convex decomposition.
Attributes:
- Auto = CoACDPreprocessMode.Auto#
- Off = CoACDPreprocessMode.Off#
- On = CoACDPreprocessMode.On#
- class motrixsim.msd.CollisionIgnores#
基类:
objectAttributes:
(Read/Write) The link name pairs that should be ignored in collision detection.
- link_pairs#
(Read/Write) The link name pairs that should be ignored in collision detection.
- Type:
list[list[str]]
- class motrixsim.msd.CollisionMask#
基类:
objectCollision mask for a collider. Used to filter which colliders can collide with each other.
Methods:
Create a CollisionMask that collides with all other colliders.
Create a CollisionMask that does not collide with anything.
Attributes:
(Read/Write) The collide group of the collider.
(Read/Write) The collide with mask of the collider.
- static collide_with_all()#
Create a CollisionMask that collides with all other colliders.
- static non_collidable()#
Create a CollisionMask that does not collide with anything.
- collide_group#
(Read/Write) The collide group of the collider.
- Type:
int
- collide_with#
(Read/Write) The collide with mask of the collider.
- Type:
int
- class motrixsim.msd.ColorSpace#
基类:
objectAttributes:
- Linear = ColorSpace.Linear#
- Srgb = ColorSpace.Srgb#
- class motrixsim.msd.CompileOptions#
基类:
objectAttributes:
(Read/Write) Fit primitive shapes to mesh's aabb or inertia box when a primitive shape references a mesh.
- class motrixsim.msd.ConnectConstraintType#
基类:
objectThe equality constraint between two links. Currently only support multibody.
- Variants:
link_anchor(link_a: str, link_b: Optional[str], anchor: numpy.ndarray) site_pair(site_a: str, site_b: str)
Methods:
link_anchor(link_a, anchor[, link_b])site_pair(site_a, site_b)Attributes:
- static link_anchor(link_a, anchor, link_b=None)#
- static site_pair(site_a, site_b)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict
- variant#
Active variant name.
Possible values: "link_anchor", "site_pair"
- Type:
str
- class motrixsim.msd.ConstraintForceModel#
基类:
object# Note
The variant with smaller order will have higher combine priority. e.g. ForceSpring combines with AccelerationSpring will always return ForceSpring.
- Variants:
hard(bounciness: float, erp: float) force_spring(StiffnessDamping) acceleration_spring(StiffnessDamping) impedance(ImpedanceSpring)
Methods:
acceleration_spring(value)force_spring(value)hard(bounciness, erp)impedance(value)Attributes:
- static acceleration_spring(value)#
- static force_spring(value)#
- static hard(bounciness, erp)#
- static impedance(value)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict | StiffnessDamping | ImpedanceSpring
- variant#
Active variant name.
Possible values: "hard", "force_spring", "acceleration_spring", "impedance"
- Type:
str
- class motrixsim.msd.ContactMatch#
基类:
object- Variants:
geom_pair(str, str) link_pair(str, str) subtree_pair(str, str)
Methods:
geom_pair(value_0, value_1)link_pair(value_0, value_1)subtree_pair(value_0, value_1)Attributes:
- static geom_pair(value_0, value_1)#
- static link_pair(value_0, value_1)#
- static subtree_pair(value_0, value_1)#
- value#
Associated data of the active variant.
- Type:
tuple[str, str]
- variant#
Active variant name.
Possible values: "geom_pair", "link_pair", "subtree_pair"
- Type:
str
- class motrixsim.msd.ContactSensor#
基类:
objectSensor to report contact information between objects.
Attributes:
(Read/Write) Define the contact pair to monitor.
(Read/Write) Maximum number of contacts to record.
(Read/Write) Optional contact sensor name.
(Read/Write) How to reduce the contacts
(Read/Write) Type of contact data to report.
- match_#
(Read/Write) Define the contact pair to monitor.
- Type:
- max_num#
(Read/Write) Maximum number of contacts to record.
- Type:
int
- name#
(Read/Write) Optional contact sensor name.
- Type:
Optional[str]
- reduce#
(Read/Write) How to reduce the contacts
- Type:
- report#
(Read/Write) Type of contact data to report.
- Type:
- class motrixsim.msd.ContactSensorReduce#
基类:
objectAttributes:
- MaxForce = ContactSensorReduce.MaxForce#
- MinDist = ContactSensorReduce.MinDist#
- NetForce = ContactSensorReduce.NetForce#
- None_ = ContactSensorReduce.None_#
- class motrixsim.msd.ContactSensorReport#
基类:
objectType of contact data to report. If multiple fields are requested, they are reported in the order:found(1)/force(3)/torque(3)/dist(1)/pos(3)/normal(3)/tangent(3).
Attributes:
(Read/Write) Report penetration distance (or signed distance).
(Read/Write) Report resultant contact force.
(Read/Write) Report whether any contact is found.
(Read/Write) Report contact normal direction.
(Read/Write) Report contact position.
(Read/Write) Report tangent direction.
(Read/Write) Report resultant contact torque.
- dist#
(Read/Write) Report penetration distance (or signed distance).
- Type:
bool
- force#
(Read/Write) Report resultant contact force.
- Type:
bool
- found#
(Read/Write) Report whether any contact is found.
- Type:
bool
- normal#
(Read/Write) Report contact normal direction.
- Type:
bool
- pos#
(Read/Write) Report contact position.
- Type:
bool
- tangent#
(Read/Write) Report tangent direction.
- Type:
bool
- torque#
(Read/Write) Report resultant contact torque.
- Type:
bool
- class motrixsim.msd.ConvexStrategy#
基类:
objectStrategy for convex hull generation.
# Key Features -
QuickConvex: Fast approximation algorithm (default) -QHull: Exact algorithm (only available if phys-collision has qhull feature)Attributes:
- QHull = ConvexStrategy.QHull#
- QuickConvex = ConvexStrategy.QuickConvex#
- class motrixsim.msd.DampingType#
基类:
objectAttributes:
- Dampratio = DampingType.Dampratio#
- Kv = DampingType.Kv#
- class motrixsim.msd.DirectionalLightDesc#
基类:
objectParameters for a directional (sun-like) light source.
Attributes:
(Read/Write) Illuminance in lux (lumens per square meter), representing the amount of light projected onto surfaces by this light source.
- illuminance#
(Read/Write) Illuminance in lux (lumens per square meter), representing the amount of light projected onto surfaces by this light source. Lux is used here instead of lumens because a directional light illuminates all surfaces more-or-less the same way (depending on the angle of incidence). Lumens can only be specified for light sources which emit light from a specific area.
- Type:
float
- class motrixsim.msd.DynType#
基类:
objectAttributes:
- Filter = DynType.Filter#
- FilterExact = DynType.FilterExact#
- Integrator = DynType.Integrator#
- None_ = DynType.None_#
- class motrixsim.msd.DynamicTextureDesc#
基类:
objectDescriptor for a dynamic texture whose pixel content is set at runtime.
Attributes:
3 (RGB) or 4 (RGBA).
(Read/Write)
(Read/Write) When true, each scene instance gets its own texture content via a TextureAtlas.
(Read/Write)
- channels#
3 (RGB) or 4 (RGBA).
- Type:
int
- Type:
(Read/Write) Number of channels
- height#
(Read/Write)
- Type:
int
- per_instance#
(Read/Write) When true, each scene instance gets its own texture content via a TextureAtlas. When false (default), all instances share the same texture.
- Type:
bool
- width#
(Read/Write)
- Type:
int
- class motrixsim.msd.EqualityConnect#
基类:
objectAttributes:
(Read/Write) Whether this equality constraint is enabled.
(Read/Write) Constraint mode and referenced objects for connect constraint.
(Read/Write) Optional unique constraint name.
(Read/Write) Soft-constraint spring/impedance parameters.
- active#
(Read/Write) Whether this equality constraint is enabled.
- Type:
bool
- connect_type#
(Read/Write) Constraint mode and referenced objects for connect constraint.
- Type:
- name#
(Read/Write) Optional unique constraint name.
- Type:
Optional[str]
- spring#
(Read/Write) Soft-constraint spring/impedance parameters.
- Type:
- class motrixsim.msd.EqualityConstraintSet#
基类:
objectAttributes:
(Read/Write) Connect constraints collection.
(Read/Write) Joint coupling constraints collection.
(Read/Write) Weld constraints collection.
- connects#
(Read/Write) Connect constraints collection.
- Type:
list[EqualityConnect]
- joints#
(Read/Write) Joint coupling constraints collection.
- Type:
list[EqualityJoint]
- welds#
(Read/Write) Weld constraints collection.
- Type:
list[EqualityWeld]
- class motrixsim.msd.EqualityJoint#
基类:
objectAttributes:
(Read/Write) Whether this equality constraint is enabled.
(Read/Write) Primary joint constrained by this polynomial relationship.
(Read/Write) Secondary joint constrained against joint_a.
(Read/Write) Optional unique constraint name.
(Read/Write) Polynomial coefficients for mapping joint_a position to joint_b.
(Read/Write) Soft-constraint spring/impedance parameters.
- active#
(Read/Write) Whether this equality constraint is enabled.
- Type:
bool
- joint_a#
(Read/Write) Primary joint constrained by this polynomial relationship.
- Type:
str
- joint_b#
(Read/Write) Secondary joint constrained against joint_a.
- Type:
Optional[str]
- name#
(Read/Write) Optional unique constraint name.
- Type:
Optional[str]
- polycoeff#
(Read/Write) Polynomial coefficients for mapping joint_a position to joint_b.
- Type:
list[float]
- spring#
(Read/Write) Soft-constraint spring/impedance parameters.
- Type:
- class motrixsim.msd.EqualityWeld#
基类:
objectAttributes:
(Read/Write) Whether this equality constraint is enabled.
(Read/Write) Optional unique constraint name.
(Read/Write) Soft-constraint spring/impedance parameters.
(Read/Write) Constraint mode and referenced objects for weld constraint.
- active#
(Read/Write) Whether this equality constraint is enabled.
- Type:
bool
- name#
(Read/Write) Optional unique constraint name.
- Type:
Optional[str]
- spring#
(Read/Write) Soft-constraint spring/impedance parameters.
- Type:
- weld_type#
(Read/Write) Constraint mode and referenced objects for weld constraint.
- Type:
- class motrixsim.msd.ForceOverride#
基类:
objectContact force override model for constraint solving.
- Variants:
hard(bounciness: float, erp: float) force_spring(StiffnessDamping) acceleration_spring(StiffnessDamping) impedance(spring: Optional[StiffnessDamping], impedance: Optional[Impedance])
Methods:
acceleration_spring(value)force_spring(value)hard(bounciness, erp)impedance([spring, impedance])Attributes:
- static acceleration_spring(value)#
- static force_spring(value)#
- static hard(bounciness, erp)#
- static impedance(spring=None, impedance=None)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict | StiffnessDamping
- variant#
Active variant name.
Possible values: "hard", "force_spring", "acceleration_spring", "impedance"
- Type:
str
- class motrixsim.msd.FrameSensor#
基类:
objectAttributes:
(Read/Write) Optional sensor name.
(Read/Write) Target object whose frame is sampled.
(Read/Write) Reference frame used to express output.
(Read/Write) Frame quantity to measure.
- name#
(Read/Write) Optional sensor name.
- Type:
Optional[str]
- object_type#
(Read/Write) Target object whose frame is sampled.
- Type:
- ref_frame#
(Read/Write) Reference frame used to express output.
- Type:
- sensor_type#
(Read/Write) Frame quantity to measure.
- Type:
- class motrixsim.msd.FrameSensorRef#
基类:
object- Variants:
local world object(ObjectType)
Methods:
Attributes:
- static local()#
- static object(value)#
- static world()#
- value#
Associated data of the active variant.
Returns None for unit variants.
- Type:
None | ObjectType
- variant#
Active variant name.
Possible values: "local", "world", "object"
- Type:
str
- class motrixsim.msd.FrameSensorType#
基类:
objectAttributes:
- FrameAngVel = FrameSensorType.FrameAngVel#
- FrameLinAcc = FrameSensorType.FrameLinAcc#
- FrameLinVel = FrameSensorType.FrameLinVel#
- FramePos = FrameSensorType.FramePos#
- FrameQuat = FrameSensorType.FrameQuat#
- XAxis = FrameSensorType.XAxis#
- YAxis = FrameSensorType.YAxis#
- ZAxis = FrameSensorType.ZAxis#
- class motrixsim.msd.FreeCamera#
基类:
objectA free-look camera defined by azimuth and elevation angles.
Attributes:
(Read/Write) initial azimuth around the vertical z-axis in degrees.
(Read/Write) initial elevation in degrees, rotation around camera's x-axis, negative correspond to moving the camera up from the horizontal plane
(Read/Write) vertical field of view(degrees)
(Read/Write) uses a perspective(default) projection or an orthographic projection
- azimuth#
(Read/Write) initial azimuth around the vertical z-axis in degrees. A value of 0 corresponds to looking in the positive x direction, while the default value of 90 corresponds to looking in the positive y direction.
- Type:
float
- elevation#
(Read/Write) initial elevation in degrees, rotation around camera's x-axis, negative correspond to moving the camera up from the horizontal plane
- Type:
float
- fovy#
(Read/Write) vertical field of view(degrees)
- Type:
float
- orthographic#
(Read/Write) uses a perspective(default) projection or an orthographic projection
- Type:
bool
- class motrixsim.msd.FreeJoint#
基类:
objectAttributes:
(Read/Write) Additional diagonal inertia on joint DoFs.
(Read/Write) Joint friction-loss magnitude.
(Read/Write) Optional free-joint name.
- armature#
(Read/Write) Additional diagonal inertia on joint DoFs.
- Type:
float
- friction_loss#
(Read/Write) Joint friction-loss magnitude.
- Type:
float
- name#
(Read/Write) Optional free-joint name.
- Type:
Optional[str]
- class motrixsim.msd.FrequencyDampingRatio#
基类:
objectSpring-damper parameters using natural frequency and damping ratio.
This is converted to StiffnessDamping internally: - k = w² - d = 2 * w * z
Attributes:
(Read/Write) The natural frequency of the spring-damper system.
(Read/Write) The damping ratio of the spring-damper system.
- w#
(Read/Write) The natural frequency of the spring-damper system.
- Type:
float
- z#
(Read/Write) The damping ratio of the spring-damper system.
When it is less than 1, the system is underdamped.
When it is 1, the system is critically damped.
When it is greater than 1, the system is overdamped.
- Type:
float
- class motrixsim.msd.GainType#
基类:
objectAttributes:
- Affine = GainType.Affine#
- Fixed = GainType.Fixed#
- class motrixsim.msd.GeneralParam#
基类:
objectAttributes:
(Read/Write) Whether to apply activation one step early.
(Read/Write) Optional activation state clamp range.
(Read/Write) Bias function type.
(Read/Write) Parameters for bias model.
(Read/Write) Parameters for dynamic model.
(Read/Write) Dynamic model type for activation state update.
(Read/Write) Gain function type.
(Read/Write) Parameters for gain model.
- actearly#
(Read/Write) Whether to apply activation one step early.
- Type:
bool
- biasprm#
(Read/Write) Parameters for bias model.
- Type:
numpy.ndarray
- dynprm#
(Read/Write) Parameters for dynamic model.
- Type:
numpy.ndarray
- gainprm#
(Read/Write) Parameters for gain model.
- Type:
numpy.ndarray
- class motrixsim.msd.GeomVisualAttrs#
基类:
objectVisual rendering attributes for a geometry (material, color, visibility group).
Attributes:
(Read/Write) The color of the geometry.
(Read/Write) By default, groups 0, 1 and 2 are visible, while all other groups are invisible.
(Read/Write) The render material name that used to get actual material data from Assets
- color#
(Read/Write) The color of the geometry.
- Type:
Optional[list[float]]
- group#
(Read/Write) By default, groups 0, 1 and 2 are visible, while all other groups are invisible. The max group is 7. See MAX_GROUP_SIZE.
- Type:
int
- material#
(Read/Write) The render material name that used to get actual material data from Assets
- Type:
Optional[str]
- class motrixsim.msd.Geometry#
基类:
objectAttributes:
(Read/Write) Collision filtering mask.
(Read/Write) Separation distance below margin that still keeps contact inactive.
(Read/Write) Referenced height-field asset name when shape is HField.
(Read/Write) Margin and gap control the distance threshold of contact constraint.
(Read/Write) The mass of the geometry.
(Read/Write) If the geometry is a mesh, the name of the mesh must be specified and can be used to look up actual mesh data from Assets.
(Read/Write) scale mesh to geom
(Read/Write) Optional geometry name.
(Read/Write) Local orientation relative to link frame.
(Read/Write) Contact/friction material parameters.
(Read/Write) Local translation relative to link frame.
(Read/Write) The priority of the geometry.
(Read/Write) Geometry primitive/source type.
(Read/Write) The size of the geometry.
(Read/Write) Visual rendering attributes for this geometry.
- collision_mask#
(Read/Write) Collision filtering mask.
- Type:
- gap#
(Read/Write) Separation distance below margin that still keeps contact inactive.
- Type:
float
- hfield#
(Read/Write) Referenced height-field asset name when shape is HField.
- Type:
Optional[str]
- margin#
(Read/Write) Margin and gap control the distance threshold of contact constraint.
- Type:
float
- mass#
(Read/Write) The mass of the geometry. If not specified, computed from density * volume automatically.
- Type:
Optional[float]
- mesh#
(Read/Write) If the geometry is a mesh, the name of the mesh must be specified and can be used to look up actual mesh data from Assets.
- Type:
Optional[str]
- mesh_scale#
(Read/Write) scale mesh to geom
- Type:
Optional[numpy.ndarray]
- name#
(Read/Write) Optional geometry name.
- Type:
Optional[str]
- orientation#
(Read/Write) Local orientation relative to link frame.
- Type:
numpy.ndarray
- physics_material#
(Read/Write) Contact/friction material parameters.
- Type:
- position#
(Read/Write) Local translation relative to link frame.
- Type:
numpy.ndarray
- priority#
(Read/Write) The priority of the geometry.
When some interaction happens between two geometries (i.e collision), some physics properties should be determined (i.e. friction cofficient). The properties on higher priority geometry will be used first.
If the priority is the same, the properties will be combined by some rules(i.e. average).
- Type:
int
- size#
(Read/Write) The size of the geometry. Note it's half-size. For each shape: * Sphere: [radius, _, _] * Capsule: [radius, half_height, _] * Cylinder: [radius, half_height, _] * Box: [half_x, half_y, half_z] * Ellipsoid: [semi_axis_x, semi_axis_y, semi_axis_z] * Plane: [half_x, half_y, _] * Mesh/Hfield/InfinitePlane: ignores
When a non-mesh shape references a mesh, a geometric primitive of that type is fitted to the mesh. In that case the size is obtained from the mesh, and the geom size parameters will be ignored.
- Type:
list[float]
- visual#
(Read/Write) Visual rendering attributes for this geometry.
- Type:
- class motrixsim.msd.HFieldSource#
基类:
objectattention: the height values here (in source_type.buffer.hfield) are real values stored in MuJoCo-compatible row-major order, with row 0 on the -Y side and columns increasing toward +X.
Attributes:
(Read/Write) Multiplier applied to source height samples.
(Read/Write) the number of columns
(Read/Write) the number of rows
(Read/Write) World-space X/Y size covered by this height field.
(Read/Write) Backing source data (file path or in-memory buffer).
- height_scale#
(Read/Write) Multiplier applied to source height samples.
- Type:
float
- ncol#
(Read/Write) the number of columns
- Type:
int
- nrow#
(Read/Write) the number of rows
- Type:
int
- size#
(Read/Write) World-space X/Y size covered by this height field.
- Type:
list[float]
- source_type#
(Read/Write) Backing source data (file path or in-memory buffer).
- Type:
- class motrixsim.msd.HFieldSourceType#
基类:
object- Variants:
path(path: str, content_type: Optional[str]) buffer(hfield: numpy.ndarray, name: str)
Methods:
Attributes:
- static buffer(hfield, name)#
- static path(path, content_type=None)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict
- variant#
Active variant name.
Possible values: "path", "buffer"
- Type:
str
- class motrixsim.msd.HeadLight#
基类:
objectThere's always a head light for every camera.
Attributes:
(Read/Write) Head light RGB color.
(Read/Write) Head light luminous power in lumens.
- color#
(Read/Write) Head light RGB color.
- Type:
list[float]
- luminous_power#
(Read/Write) Head light luminous power in lumens.
- Type:
float
- class motrixsim.msd.Hierarchy#
基类:
objectThe scene hierarchy, including all bodies, geoms, lights, cameras and sites.
Attributes:
(Read/Write) All multibodies in the world.
(Read/Write) Static cameras under the world.
(Read/Write) Static geometries under the world.
(Read/Write) Static lights under the world.
(Read/Write) Static sites under the world.
- class motrixsim.msd.Impedance#
基类:
objectThe impedance model same with mujoco.
# Note
dmax < d0 is allowed.
Attributes:
(Read/Write) Impedance value when distance is zero.
(Read/Write) Impedance value at or beyond normalized distance 1.
(Read/Write) Piecewise transition split point in normalized distance (0, 1).
(Read/Write) Curve exponent controlling interpolation sharpness.
(Read/Write) Distance scale used for impedance interpolation.
- d0#
(Read/Write) Impedance value when distance is zero.
- Type:
float
- dmax#
(Read/Write) Impedance value at or beyond normalized distance 1.
- Type:
float
- middle#
(Read/Write) Piecewise transition split point in normalized distance (0, 1).
- Type:
float
- power#
(Read/Write) Curve exponent controlling interpolation sharpness.
- Type:
float
- width#
(Read/Write) Distance scale used for impedance interpolation.
- Type:
float
- class motrixsim.msd.ImpedanceSpring#
基类:
objectCombination of spring-damper with impedance model.
Attributes:
(Read/Write) Distance-dependent impedance profile.
(Read/Write) Spring-damper coefficients.
- spring#
(Read/Write) Spring-damper coefficients.
- Type:
- class motrixsim.msd.Inertia#
基类:
objectInertial properties of a rigid body (mass, center of mass, principal inertia).
Attributes:
(Read/Write) Diagonal inertia around local principal axes.
(Read/Write) Total mass.
(Read/Write) Principal inertia frame orientation in local frame.
(Read/Write) Center of mass in local frame.
- diag_inertia#
(Read/Write) Diagonal inertia around local principal axes.
- Type:
Optional[numpy.ndarray]
- mass#
(Read/Write) Total mass.
- Type:
Optional[float]
- orientation#
(Read/Write) Principal inertia frame orientation in local frame.
- Type:
Optional[numpy.ndarray]
- pos#
(Read/Write) Center of mass in local frame.
- Type:
Optional[numpy.ndarray]
- class motrixsim.msd.IntegratorMethod#
基类:
objectAttributes:
- Explicit = IntegratorMethod.Explicit#
- Implicit = IntegratorMethod.Implicit#
- ImplicitVelocity = IntegratorMethod.ImplicitVelocity#
- class motrixsim.msd.Joint#
基类:
objectAttributes:
(Read/Write) The force limit that actuator can apply to the joint.
(Read/Write) Additional diagonal inertia on joint DoFs.
(Read/Write) Joint axis in parent/body frame (for revolute/slide joints).
(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction.
(Read/Write) Joint friction-loss magnitude.
(Read/Write) The constraint force applied to the joint when it goes beyond the limits.
(Read/Write) The distance threshold below which limits become active.
(Read/Write) The name of the joint connecting this link to the parent body.
(Read/Write) The joint position of attached body in the body coordinate frame.
(Read/Write) The position limit range of the joint.
(Read/Write) The initial position or angle of the joint, only used for slide and hinge joints.
(Read/Write) Optional spring-damper behavior around ref_.
(Read/Write) Joint kinematic type.
- actuator_force_limit#
(Read/Write) The force limit that actuator can apply to the joint.
- Type:
Optional[Range]
- armature#
(Read/Write) Additional diagonal inertia on joint DoFs.
- Type:
float
- axis#
(Read/Write) Joint axis in parent/body frame (for revolute/slide joints).
- Type:
numpy.ndarray
- friction_damping#
(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction. Only used when frictionloss > 0.0. When damping are zero, the frictionloss acts as a hard constraint. A non-zero damping enables soft constraint behavior with velocity-dependent forces.
- Type:
ImpedanceDamping
- friction_loss#
(Read/Write) Joint friction-loss magnitude.
- Type:
float
- limit_force#
(Read/Write) The constraint force applied to the joint when it goes beyond the limits.
- Type:
- margin#
(Read/Write) The distance threshold below which limits become active.
- Type:
float
- name#
(Read/Write) The name of the joint connecting this link to the parent body. Needed for actuators.
- Type:
Optional[str]
- pos#
(Read/Write) The joint position of attached body in the body coordinate frame.
- Type:
numpy.ndarray
- ref_#
(Read/Write) The initial position or angle of the joint, only used for slide and hinge joints.
- Type:
float
- spring_damper#
(Read/Write) Optional spring-damper behavior around ref_.
- Type:
Optional[SpringDamper]
- class motrixsim.msd.JointSensor#
基类:
objectAttributes:
(Read/Write) Target joint name.
(Read/Write) Optional sensor name.
(Read/Write) Joint quantity to measure.
- joint#
(Read/Write) Target joint name.
- Type:
str
- name#
(Read/Write) Optional sensor name.
- Type:
Optional[str]
- type_#
(Read/Write) Joint quantity to measure.
- Type:
- class motrixsim.msd.JointSensorType#
基类:
objectAttributes:
- JointPos = JointSensorType.JointPos#
- JointVel = JointSensorType.JointVel#
- class motrixsim.msd.JointTendon#
基类:
objectAttributes:
(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction.
(Read/Write) Tendon friction-loss magnitude.
(Read/Write) Ordered joint path that defines tendon length.
(Read/Write) Optional tendon length limit.
(Read/Write) Constraint force model used when hitting tendon limits.
(Read/Write) Optional tendon name.
(Read/Write) The spring for the tendon.
(Read/Write) The rest length of the tendon spring.
- friction_damping#
(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction. Only used when frictionloss > 0.0. If solimpfriction is "0 0" at beginning, the frictionloss is hard, this means that the impedance spring is not used.
- Type:
ImpedanceDamping
- frictionloss#
(Read/Write) Tendon friction-loss magnitude.
- Type:
float
- joints#
(Read/Write) Ordered joint path that defines tendon length.
- Type:
list[JointTendonNode]
- limit_force#
(Read/Write) Constraint force model used when hitting tendon limits.
- Type:
- name#
(Read/Write) Optional tendon name.
- Type:
Optional[str]
- spring#
(Read/Write) The spring for the tendon.
If None, there is no spring on the tendon.
If Some(spring), the spring is active. It will try to reach the spring_length.
- Type:
Optional[StiffnessDamping]
- spring_length#
(Read/Write) The rest length of the tendon spring. Only used when spring is Some.
- Type:
- class motrixsim.msd.JointTendonNode#
基类:
objectAttributes:
(Read/Write) Joint name participating in tendon length computation.
(Read/Write) Weight applied to this joint's contribution.
- joint_name#
(Read/Write) Joint name participating in tendon length computation.
- Type:
str
- weight#
(Read/Write) Weight applied to this joint's contribution.
- Type:
float
- class motrixsim.msd.JointType#
基类:
objectThe type of joint connecting two links.
Attributes:
- Ball = JointType.Ball#
- Revolute = JointType.Revolute#
- Slide = JointType.Slide#
- class motrixsim.msd.Keyframe#
基类:
objectAttributes:
(Read/Write) Actuator control vector snapshot at this keyframe.
(Read/Write) DoF position vector snapshot at this keyframe.
(Read/Write) DoF velocity vector snapshot at this keyframe.
(Read/Write) Optional keyframe name.
(Read/Write) simulation time
- ctrl#
(Read/Write) Actuator control vector snapshot at this keyframe.
- Type:
numpy.ndarray
- dof_pos#
(Read/Write) DoF position vector snapshot at this keyframe.
- Type:
numpy.ndarray
- dof_vel#
(Read/Write) DoF velocity vector snapshot at this keyframe.
- Type:
numpy.ndarray
- name#
(Read/Write) Optional keyframe name.
- Type:
Optional[str]
- time#
(Read/Write) simulation time
- Type:
Optional[float]
- class motrixsim.msd.Layer#
基类:
objectA texture layer within a material, binding a texture to a semantic role.
Attributes:
(Read/Write) Semantic role of this texture layer.
(Read/Write) Referenced texture name for this layer.
- role#
(Read/Write) Semantic role of this texture layer.
- Type:
- texture_name#
(Read/Write) Referenced texture name for this layer.
- Type:
Optional[str]
- class motrixsim.msd.Light#
基类:
objectA light source in the scene with position, direction, color, and type.
Attributes:
(Read/Write) Whether the light casts shadows.
(Read/Write) The color of the light.
(Read/Write) The direction of the light.
(Read/Write) Target tracking mode relative to parent/body.
(Read/Write) Optional light name.
(Read/Write) The position of the light.
(Read/Write) The type of the light.
- cast_shadows#
(Read/Write) Whether the light casts shadows.
- Type:
bool
- color#
(Read/Write) The color of the light.
- Type:
list[float]
- direction#
(Read/Write) The direction of the light. Fallback to [0,0,-1] if all zeros.
- Type:
numpy.ndarray
- name#
(Read/Write) Optional light name.
- Type:
Optional[str]
- position#
(Read/Write) The position of the light.
- Type:
numpy.ndarray
- class motrixsim.msd.LightType#
基类:
objectLight source type for a scene light.
- Variants:
directional(DirectionalLightDesc) spot(SpotLightDesc) point(PointLightDesc)
Methods:
directional(value)point(value)spot(value)Attributes:
- static directional(value)#
- static point(value)#
- static spot(value)#
- value#
Associated data of the active variant.
- Type:
- variant#
Active variant name.
Possible values: "directional", "spot", "point"
- Type:
str
- class motrixsim.msd.Link#
基类:
objectAttributes:
(Read/Write) The cameras attached to this link.
(Read/Write) Child links in the kinematic tree.
(Read/Write) Disable self collision for this link and its descendants.
(Read/Write) The geometries attached to this link.
(Read/Write) Gravity compensation, a value of 1 creates a force counter to the body’s gravity.
(Read/Write) The link's inertia in the parent frame.
(Read/Write) The joints connecting this link to the parent body.
(Read/Write) The lights attached to this link.
(Read/Write) The link's rotation in the parent frame.
(Read/Write) The link's translation in the parent frame.
(Read/Write) name of the link.
(Read/Write) The sites attached to this link.
- disable_self_collision#
(Read/Write) Disable self collision for this link and its descendants. If false, it should inherit from parent or enable if root link.
- Type:
bool
- gravcomp#
(Read/Write) Gravity compensation, a value of 1 creates a force counter to the body’s gravity.
- Type:
float
- inertial#
(Read/Write) The link's inertia in the parent frame. None fields will be computed automatically.
- Type:
- joints#
(Read/Write) The joints connecting this link to the parent body. If empty, the link is fixed to the parent.
Note:
When free joint is found, all other joints will be ignored.
When spherical joint is found, all other rotational joints will be ignored. (i.e.
revolute)
- Type:
list[Joint]
- local_rotation#
(Read/Write) The link's rotation in the parent frame.
- Type:
numpy.ndarray
- local_translation#
(Read/Write) The link's translation in the parent frame.
- Type:
numpy.ndarray
- name#
(Read/Write) name of the link.
- Type:
Optional[str]
- class motrixsim.msd.Mark#
基类:
objectAttributes:
- Cross = Mark.Cross#
- Edge = Mark.Edge#
- None_ = Mark.None_#
- Random = Mark.Random#
- class motrixsim.msd.Material#
基类:
objectAttributes:
(Read/Write) Alpha blending/masking mode.
(Read/Write) Whether to render both front and back faces.
(Read/Write) Whether geometries using this material cast shadows.
(Read/Write) Base albedo color.
(Read/Write) Depth bias used to mitigate z-fighting.
(Read/Write) UV repeat factor for detail textures.
(Read/Write) Strength of detail-normal contribution.
(Read/Write) Linear RGB emissive color
(Read/Write) Scalar intensity multiplier for emissive color.
(Read/Write) Flip tangent-space U axis for normal mapping.
(Read/Write) Flip tangent-space V axis for normal mapping.
(Read/Write) Index of refraction.
(Read/Write) Additional texture layers.
(Read/Write) Metallic factor.
(Read/Write) Global identifier name, if from file, file name is prefixed.
(Read/Write) Reflection strength.
(Read/Write) Surface roughness factor.
(Read/Write) Specular color tint.
(Read/Write) Texture coordinate origin convention.
(Read/Write) UV repeat factor.
(Read/Write) UV translation offset.
(Read/Write) Whether to enforce uniform texture scaling.
(Read/Write) Main texture name for this material.
(Read/Write) Transmission amount.
- both_side#
(Read/Write) Whether to render both front and back faces.
- Type:
bool
- cast_shadow#
(Read/Write) Whether geometries using this material cast shadows.
- Type:
bool
- color#
(Read/Write) Base albedo color.
- Type:
list[float]
- depth_bias#
(Read/Write) Depth bias used to mitigate z-fighting.
- Type:
int
- detail_repeat#
(Read/Write) UV repeat factor for detail textures.
- Type:
list[float]
- detail_strength#
(Read/Write) Strength of detail-normal contribution.
- Type:
float
- emissive#
(Read/Write) Linear RGB emissive color
- Type:
list[float]
- emissive_intensity#
(Read/Write) Scalar intensity multiplier for emissive color.
- Type:
float
- flip_tangent_u#
(Read/Write) Flip tangent-space U axis for normal mapping.
- Type:
bool
- flip_tangent_v#
(Read/Write) Flip tangent-space V axis for normal mapping.
- Type:
bool
- ior#
(Read/Write) Index of refraction.
- Type:
float
- metallic#
(Read/Write) Metallic factor.
- Type:
float
- name#
(Read/Write) Global identifier name, if from file, file name is prefixed.
- Type:
str
- reflectance#
(Read/Write) Reflection strength.
- Type:
float
- roughness#
(Read/Write) Surface roughness factor.
- Type:
float
- specular_color#
(Read/Write) Specular color tint.
- Type:
list[float]
- tex_origin#
(Read/Write) Texture coordinate origin convention.
- Type:
- tex_repeat#
(Read/Write) UV repeat factor.
- Type:
list[float]
- tex_translation#
(Read/Write) UV translation offset.
- Type:
list[float]
- tex_uniform#
(Read/Write) Whether to enforce uniform texture scaling.
- Type:
bool
- texture_name#
(Read/Write) Main texture name for this material.
- Type:
Optional[str]
- transmisive#
(Read/Write) Transmission amount.
- Type:
float
- class motrixsim.msd.MaterialRole#
基类:
objectAttributes:
- DetailNormal = MaterialRole.DetailNormal#
- Emissive = MaterialRole.Emissive#
- Normal = MaterialRole.Normal#
- Orm = MaterialRole.Orm#
- Rgb = MaterialRole.Rgb#
- Rgba = MaterialRole.Rgba#
- class motrixsim.msd.MeshData#
基类:
objectMesh data with vertex attributes.
All attribute arrays use Vertex mode with consistent lengths(if present): - vertices = normal = texcoord = tangents
Hard edges are represented by splitting vertices at discontinuities, where the same position has different normals for different faces.
Deserialization supports two formats for vector array fields: - Array format: [[x, y, z], ...] (JSON) - Binary format: raw little-endian f32/u32 bytes (msgpack)
Attributes:
(Read/Write) The name of the mesh (used to reference it in Geometry).
(Read/Write) Vertex normals as (N, 3) array, or None.
(Read/Write) Vertex tangents as (N, 4) array, or None.
(Read/Write) Texture coordinates as (N, 2) array, or None.
Number of triangles in the mesh.
(Read/Write) Triangle index buffer.
Number of vertices in the mesh.
(Read/Write) Vertex positions as (N, 3) array.
- name#
(Read/Write) The name of the mesh (used to reference it in Geometry).
- Type:
str
- normal#
(Read/Write) Vertex normals as (N, 3) array, or None.
- Type:
Optional[numpy.ndarray]
- tangents#
(Read/Write) Vertex tangents as (N, 4) array, or None.
- Type:
Optional[numpy.ndarray]
- texcoord#
(Read/Write) Texture coordinates as (N, 2) array, or None.
- Type:
Optional[numpy.ndarray]
- triangle_count#
Number of triangles in the mesh.
- triangles#
(Read/Write) Triangle index buffer. Each element contains three vertex indices forming a triangle. When None, vertices are consumed sequentially in groups of three (i.e., non-indexed triangle list).
- Type:
Optional[numpy.ndarray]
- vertex_count#
Number of vertices in the mesh.
- vertices#
(Read/Write) Vertex positions as (N, 3) array.
- Type:
numpy.ndarray
- class motrixsim.msd.MeshSource#
基类:
object- Variants:
path(path: str, transform: MeshTransform, using_meshes: set[str], acd: bool) buffer(data: MeshData, acd: bool): A simple mesh from custom input buffer, save name here and mesh in loaded_meshes.
Methods:
buffer(data[, acd])A simple mesh from custom input buffer, save name here and mesh in loaded_meshes.
path(path[, transform, using_meshes, acd])Attributes:
- static buffer(data, acd=None)#
A simple mesh from custom input buffer, save name here and mesh in loaded_meshes.
- static path(path, transform=None, using_meshes=None, acd=None)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict
- variant#
Active variant name.
Possible values: "path", "buffer"
- Type:
str
- class motrixsim.msd.MeshTransform#
基类:
objectFrom mesh to geom, subtract position and inverse rotation to geom local
Attributes:
(Read/Write) Optional translation applied from mesh space to geom space.
(Read/Write) Optional rotation applied from mesh space to geom space.
(Read/Write) Optional per-axis scaling applied from mesh space to geom space.
- position#
(Read/Write) Optional translation applied from mesh space to geom space.
- Type:
Optional[numpy.ndarray]
- rotation#
(Read/Write) Optional rotation applied from mesh space to geom space.
- Type:
Optional[numpy.ndarray]
- scale#
(Read/Write) Optional per-axis scaling applied from mesh space to geom space.
- Type:
Optional[numpy.ndarray]
- class motrixsim.msd.ObjectType#
基类:
object- Variants:
link_inertia(str) link(str) geom(str) site(str)
Methods:
geom(value)link(value)link_inertia(value)site(value)Attributes:
- static geom(value)#
- static link(value)#
- static link_inertia(value)#
- static site(value)#
- value#
Associated data of the active variant.
- Type:
str
- variant#
Active variant name.
Possible values: "link_inertia", "link", "geom", "site"
- Type:
str
- class motrixsim.msd.PhysicsMaterial#
基类:
objectPhysical material properties governing contact force model and friction.
Attributes:
(Read/Write) The condim of the material.
(Read/Write) The contact force model
(Read/Write) The density of the material.
(Read/Write) The contact force mixing factor for the material.
(Read/Write) The friction of the material including slide, spin, roll.
- condim#
(Read/Write) The condim of the material.
- Type:
int
- contact_model#
(Read/Write) The contact force model
- Type:
- density#
(Read/Write) The density of the material.
- Type:
float
- force_mix#
(Read/Write) The contact force mixing factor for the material. When combine two force models, higher mixing factor will get more weight.
- Type:
float
- friction#
(Read/Write) The friction of the material including slide, spin, roll.
- Type:
list[float]
- class motrixsim.msd.PointLightDesc#
基类:
objectParameters for an omnidirectional point light source.
Attributes:
(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.
(Read/Write) Simulates a light source coming from a spherical volume with the given radius.
(Read/Write) Cut-off for the light's area-of-effect.
(Read/Write) The distance from the light to near Z plane in the shadow map.
- intensity#
(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.
- Type:
float
- radius#
(Read/Write) Simulates a light source coming from a spherical volume with the given radius.
This affects the size of specular highlights created by this light, as well as the soft shadow penumbra size. Because of this, large values may not produce the intended result -- for example, light radius does not affect shadow softness or diffuse lighting.
- Type:
float
- range#
(Read/Write) Cut-off for the light's area-of-effect. Fragments outside this range will not be affected by this light at all, so it's important to tune this together with intensity to prevent hard lighting cut-offs.
- Type:
float
- shadow_map_near_z#
(Read/Write) The distance from the light to near Z plane in the shadow map.
Objects closer than this distance to the light won't cast shadows. Setting this higher increases the shadow map's precision.
This only has an effect if shadows are enabled.
- Type:
float
- class motrixsim.msd.PositionParam#
基类:
objectThe special parameters of position actuator.
Attributes:
(Read/Write)
(Read/Write)
(Read/Write) Proportional gain used by position actuator.
(Read/Write)
- damping_type#
(Read/Write)
- Type:
- damping_value#
(Read/Write)
- Type:
float
- kp#
(Read/Write) Proportional gain used by position actuator.
- Type:
float
- timeconst#
(Read/Write)
- Type:
float
- class motrixsim.msd.PositionTrack#
基类:
objectAttributes:
- FixedLocal = PositionTrack.FixedLocal#
- FixedWorld = PositionTrack.FixedWorld#
- Free = PositionTrack.Free#
- class motrixsim.msd.Probe#
基类:
objectA reflection probe capturing environment reflections within a bounding volume.
Attributes:
(Read/Write) Probe center position.
(Read/Write) Probe box scale/extents.
(Read/Write) Optional source texture name for this probe.
- position#
(Read/Write) Probe center position.
- Type:
list[float]
- scale#
(Read/Write) Probe box scale/extents.
- Type:
list[float]
- texture#
(Read/Write) Optional source texture name for this probe.
- Type:
Optional[str]
- class motrixsim.msd.Range(lower=Ellipsis, upper=Ellipsis)#
基类:
objectA numeric range defined by inclusive lower and upper bounds.
- class motrixsim.msd.RotationTrack#
基类:
objectAttributes:
- FixedLocal = RotationTrack.FixedLocal#
- FixedWorld = RotationTrack.FixedWorld#
- Free = RotationTrack.Free#
- LookAtLink = RotationTrack.LookAtLink#
- class motrixsim.msd.SceneStatistic#
基类:
objectAttributes:
(Read/Write) extent box center
(Read/Write) half the side of the bounding box of the initial model.
- center#
(Read/Write) extent box center
- Type:
Optional[list[float]]
- extent#
(Read/Write) half the side of the bounding box of the initial model.
- Type:
Optional[list[float]]
- class motrixsim.msd.SensorSet#
基类:
objectCollection of all sensor types in a scene.
Attributes:
(Read/Write) Contact sensors.
(Read/Write) Frame sensors.
(Read/Write) Joint sensors.
(Read/Write) Subtree sensors.
(Read/Write) Touch sensors.
- contact#
(Read/Write) Contact sensors.
- Type:
list[ContactSensor]
- frame#
(Read/Write) Frame sensors.
- Type:
list[FrameSensor]
- joint#
(Read/Write) Joint sensors.
- Type:
list[JointSensor]
- subtree#
(Read/Write) Subtree sensors.
- Type:
list[SubtreeSensor]
- touch#
(Read/Write) Touch sensors.
- Type:
list[TouchSensor]
- class motrixsim.msd.ShapeFit#
基类:
objectWhen a primitive shape references a mesh, a geometric primitive of that type is fitted to the mesh.
Aabb: The axis-aligned bounding box of the mesh is computed, and the primitive shape is fitted to the AABB.
InertiaBox: The inertia box of the mesh is computed, and the primitive shape is fitted to the inertia box.
Attributes:
- Aabb = ShapeFit.Aabb#
- InertiaBox = ShapeFit.InertiaBox#
- class motrixsim.msd.ShapeType#
基类:
objectAttributes:
- Box = ShapeType.Box#
- Capsule = ShapeType.Capsule#
- Cylinder = ShapeType.Cylinder#
- Ellipsoid = ShapeType.Ellipsoid#
- HField = ShapeType.HField#
- InfinitePlane = ShapeType.InfinitePlane#
- Mesh = ShapeType.Mesh#
- Plane = ShapeType.Plane#
- Sphere = ShapeType.Sphere#
- class motrixsim.msd.SimulateOption#
基类:
objectAttributes:
(Read/Write) Controls whether collision meshes should be decomposed into multiple convex parts during compile/load time.
(Read/Write) The maximum number of iterations for iterative constraint solvers.
(Read/Write) The tolerance for iterative constraint solvers.
(Read/Write) The strategy to use for single convex hull generation.
(Read/Write) Whether to disable all actuators.
(Read/Write) Whether to disable all constraints.
(Read/Write) Whether to disable all contacts.
(Read/Write) Whether to disable damping terms.
(Read/Write) Whether to disable equality constraints.
(Read/Write) Whether to disable friction-loss constraints on joints/tendons.
(Read/Write) Whether to disable gravity force.
(Read/Write) Whether to disable joint/contact limits.
(Read/Write) Friction model selector used by contact solver.
(Read/Write) The gravity of the simulation.
(Read/Write) Global override for contact force model.
(Read/Write) If specified, all margin values for contacts will be overridden by this value.
(Read/Write) If specified, all friction coefficients for contacts will be overridden by this value.
(Read/Write) Engine-side upper bound on the number of convex hull colliders accepted for one scaled mesh.
(Read/Write) If true, the solver will automatically clamp damping coefficients to make spring damper system stable.
(Read/Write) Constraint solver backend type.
(Read/Write) The simulation time step in seconds.
- coacd_strategy#
(Read/Write) Controls whether collision meshes should be decomposed into multiple convex parts during compile/load time. None disables CoACD and Some(config) enables it with the given parameters.
- Type:
Optional[CoACDConfig]
- constraint_solver_iterations#
(Read/Write) The maximum number of iterations for iterative constraint solvers.
- Type:
int
- constraint_solver_tolerance#
(Read/Write) The tolerance for iterative constraint solvers. When residual is less than tolerance, the solver stops.
- Type:
float
- convex_strategy#
(Read/Write) The strategy to use for single convex hull generation.
This is used when coacd_strategy is None or when the single-convex path is selected.
- Type:
- disable_actuators#
(Read/Write) Whether to disable all actuators.
- Type:
bool
- disable_constraints#
(Read/Write) Whether to disable all constraints.
- Type:
bool
- disable_contacts#
(Read/Write) Whether to disable all contacts.
- Type:
bool
- disable_damping#
(Read/Write) Whether to disable damping terms.
- Type:
bool
- disable_equality#
(Read/Write) Whether to disable equality constraints.
- Type:
bool
- disable_frictionloss#
(Read/Write) Whether to disable friction-loss constraints on joints/tendons.
- Type:
bool
- disable_gravity#
(Read/Write) Whether to disable gravity force.
- Type:
bool
- disable_limit#
(Read/Write) Whether to disable joint/contact limits.
- Type:
bool
- friction_model#
(Read/Write) Friction model selector used by contact solver.
- Type:
int
- gravity#
(Read/Write) The gravity of the simulation.
- Type:
Optional[list[float]]
- override_contact_force#
(Read/Write) Global override for contact force model.
- Type:
Optional[ForceOverride]
- override_contact_margin#
(Read/Write) If specified, all margin values for contacts will be overridden by this value.
- Type:
Optional[float]
- override_friction#
(Read/Write) If specified, all friction coefficients for contacts will be overridden by this value.
- Type:
Optional[list[float]]
- runtime_max_convex_hulls_per_mesh#
(Read/Write) Engine-side upper bound on the number of convex hull colliders accepted for one scaled mesh. Meshes exceeding this budget use the single-convex path.
- Type:
int
- safty_damping_clamp#
(Read/Write) If true, the solver will automatically clamp damping coefficients to make spring damper system stable. This works for pos limit constraints(contact & joint pos)
- Type:
bool
- solver_type#
(Read/Write) Constraint solver backend type.
- Type:
- timestep#
(Read/Write) The simulation time step in seconds.
- Type:
float
- class motrixsim.msd.Site#
基类:
objectAttributes:
implement 'from_to' for site
(Read/Write) The visual group of the site.
(Read/Write) The material of the site.
(Read/Write) Optional site name.
(Read/Write) Local site orientation in link frame.
(Read/Write) Local site translation in link frame.
(Read/Write) The color of the site.
(Read/Write) Site primitive shape type.
(Read/Write) The size of the site.
- from_to#
implement 'from_to' for site
- Type:
Optional[list[float]]
- Type:
(Read/Write) TODO
- group#
(Read/Write) The visual group of the site.
- Type:
int
- material#
(Read/Write) The material of the site.
- Type:
Optional[str]
- name#
(Read/Write) Optional site name.
- Type:
Optional[str]
- orientation#
(Read/Write) Local site orientation in link frame.
- Type:
numpy.ndarray
- position#
(Read/Write) Local site translation in link frame.
- Type:
numpy.ndarray
- rgba#
(Read/Write) The color of the site.
- Type:
list[float]
- size#
(Read/Write) The size of the site. - Sphere: size[0] is the radius - Capsule: size[0] is the radius, size[1] is the half_height - Cylinder: size[0] is the radius, size[1] is the half_height - Box: size[0], size[1], size[2] are the half_extents of the box
- Type:
list[float]
- class motrixsim.msd.SiteShape#
基类:
objectAttributes:
- Box = SiteShape.Box#
- Capsule = SiteShape.Capsule#
- Cylinder = SiteShape.Cylinder#
- Sphere = SiteShape.Sphere#
- class motrixsim.msd.SkyboxLayout#
基类:
objectAttributes:
- Back = SkyboxLayout.Back#
- Down = SkyboxLayout.Down#
- Front = SkyboxLayout.Front#
- Ignore = SkyboxLayout.Ignore#
- Left = SkyboxLayout.Left#
- Right = SkyboxLayout.Right#
- Unsupported = SkyboxLayout.Unsupported#
- Up = SkyboxLayout.Up#
- class motrixsim.msd.SolverType#
基类:
objectAttributes:
- PGS = SolverType.PGS#
- PGSIMPR = SolverType.PGSIMPR#
- class motrixsim.msd.SpotLightDesc#
基类:
objectParameters for a spot light with cone angle and range.
Attributes:
(Read/Write) The inner angle of the spot light in degrees.
(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.
(Read/Write) The outer angle of the spot light in degrees.
(Read/Write) Range in meters that this light illuminates.
(Read/Write) The distance from the light to the near Z plane in the shadow map.
- inner_angle#
(Read/Write) The inner angle of the spot light in degrees.
- Type:
float
- intensity#
(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.
- Type:
float
- outer_angle#
(Read/Write) The outer angle of the spot light in degrees.
- Type:
float
- range#
(Read/Write) Range in meters that this light illuminates.
Note that this value affects resolution of the shadow maps; generally, the higher you set it, the lower-resolution your shadow maps will be. Consequently, you should set this value to be only the size that you need.
- Type:
float
- shadow_map_near_z#
(Read/Write) The distance from the light to the near Z plane in the shadow map.
Objects closer than this distance to the light won't cast shadows. Setting this higher increases the shadow map's precision.
This only has an effect if shadows are enabled.
- Type:
float
- class motrixsim.msd.SpringDampCoeff#
基类:
object- Variants:
stiffness_damping(StiffnessDamping): Use stiffness and damping to describe the spring damper system. frequency_damping_ratio(FrequencyDampingRatio): Use frequency and damping ratio to describe the spring damper system.
Methods:
frequency_damping_ratio(value)Use frequency and damping ratio to describe the spring damper system.
stiffness_damping(value)Use stiffness and damping to describe the spring damper system.
Attributes:
- static frequency_damping_ratio(value)#
Use frequency and damping ratio to describe the spring damper system.
# Note
In this case, the spring always works in acceleration mode.
- static stiffness_damping(value)#
Use stiffness and damping to describe the spring damper system.
- value#
Associated data of the active variant.
- variant#
Active variant name.
Possible values: "stiffness_damping", "frequency_damping_ratio"
- Type:
str
- class motrixsim.msd.SpringDamper#
基类:
objectDefine a spring-damper system.
Attributes:
(Read/Write) Spring-damper coefficients representation.
(Read/Write) Equilibrium position of the spring.
- coeff#
(Read/Write) Spring-damper coefficients representation.
- Type:
- target_pos#
(Read/Write) Equilibrium position of the spring.
- Type:
float
- class motrixsim.msd.SpringLengthType#
基类:
objectThe spring length type of the tendon.
- Variants:
automatic fixed(float) range(Range)
Methods:
Attributes:
- static automatic()#
- static fixed(value)#
- static range(value)#
- value#
Associated data of the active variant.
Returns None for unit variants.
- Type:
None | float | Range
- variant#
Active variant name.
Possible values: "automatic", "fixed", "range"
- Type:
str
- class motrixsim.msd.StiffnessDamping#
基类:
objectSpring-damper parameters using stiffness and damping coefficients.
The force is computed as: F = -k * x - d * v where x is displacement and v is velocity.
Attributes:
- d#
(Read/Write) The damping coefficient of the damper.
- Type:
float
- k#
(Read/Write) The stiffness of the spring.
- Type:
float
- class motrixsim.msd.SubtreeSensor#
基类:
objectAttributes:
(Read/Write) Root link name of the monitored subtree.
(Read/Write) Optional sensor name.
(Read/Write) Subtree quantity to measure.
- link#
(Read/Write) Root link name of the monitored subtree.
- Type:
str
- name#
(Read/Write) Optional sensor name.
- Type:
Optional[str]
- type_#
(Read/Write) Subtree quantity to measure.
- Type:
- class motrixsim.msd.SubtreeSensorType#
基类:
objectAttributes:
- AngMom = SubtreeSensorType.AngMom#
- Com = SubtreeSensorType.Com#
- LinVel = SubtreeSensorType.LinVel#
- class motrixsim.msd.TexcoordOrigin#
基类:
objectAttributes:
- BottomLeft = TexcoordOrigin.BottomLeft#
- TopLeft = TexcoordOrigin.TopLeft#
- class motrixsim.msd.Texture#
基类:
objectA texture asset with its source, type, and rendering properties.
Attributes:
(Read/Write) Declared texture color space.
(Read/Write) Whether mipmaps should be generated.
(Read/Write) Optional layout mapping for skybox faces.
(Read/Write) Optional grid size for tiled/atlas textures.
(Read/Write) Optional texture name.
(Read/Write) Texture source definition.
(Read/Write) Texture usage/type.
- color_space#
(Read/Write) Declared texture color space.
- Type:
- gen_mipmaps#
(Read/Write) Whether mipmaps should be generated.
- Type:
bool
- grid_layout#
(Read/Write) Optional layout mapping for skybox faces.
- Type:
Optional[list[SkyboxLayout]]
- grid_size#
(Read/Write) Optional grid size for tiled/atlas textures.
- Type:
Optional[list[int]]
- name#
(Read/Write) Optional texture name.
- Type:
Optional[str]
- source#
(Read/Write) Texture source definition.
- Type:
- type_#
(Read/Write) Texture usage/type.
- Type:
- class motrixsim.msd.TextureSource#
基类:
objectSource type for a texture.
- Variants:
file(str) gradient(BuildinAttr) checker(BuildinAttr) flat(BuildinAttr) dynamic(DynamicTextureDesc)
Methods:
Attributes:
- static checker(value)#
- static dynamic(value)#
- static file(value)#
- static flat(value)#
- static gradient(value)#
- value#
Associated data of the active variant.
- Type:
str | BuildinAttr | DynamicTextureDesc
- variant#
Active variant name.
Possible values: "file", "gradient", "checker", "flat", "dynamic"
- Type:
str
- class motrixsim.msd.TextureType#
基类:
objectAttributes:
- D2 = TextureType.D2#
- EnvDiff = TextureType.EnvDiff#
- EnvSpec = TextureType.EnvSpec#
- Probe = TextureType.Probe#
- Skybox = TextureType.Skybox#
- class motrixsim.msd.ToneMapping#
基类:
objectTone mapping configuration controlling HDR-to-LDR conversion.
Attributes:
(Read/Write) Tone mapping algorithm.
- method#
(Read/Write) Tone mapping algorithm.
- Type:
- class motrixsim.msd.ToneMappingMethod#
基类:
objectAttributes:
- Aces = ToneMappingMethod.Aces#
- None_ = ToneMappingMethod.None_#
- class motrixsim.msd.TouchSensor#
基类:
objectAttributes:
- name#
(Read/Write) Optional sensor name.
- Type:
Optional[str]
- site#
(Read/Write) Target site name used for touch sensing.
- Type:
str
- class motrixsim.msd.TrackMode#
基类:
objectCamera tracking mode relative to a parent body.
- Variants:
fixed: fixed relative transform to parent body in parent frame track: fixed relative position to parent body in world frame, fixed rotation in world target_body(str): fixed relative position to parent body in parent frame, rotate to target body
Methods:
fixed()fixed relative transform to parent body in parent frame
target_body(value)fixed relative position to parent body in parent frame, rotate to target body
track()fixed relative position to parent body in world frame, fixed rotation in world
Attributes:
- static fixed()#
fixed relative transform to parent body in parent frame
- static target_body(value)#
fixed relative position to parent body in parent frame, rotate to target body
- static track()#
fixed relative position to parent body in world frame, fixed rotation in world
- value#
Associated data of the active variant.
Returns None for unit variants.
- Type:
None | str
- variant#
Active variant name.
Possible values: "fixed", "track", "target_body"
- Type:
str
- class motrixsim.msd.Visual#
基类:
objectAttributes:
(Read/Write) Global ambient light settings.
(Read/Write) bounding volume color
(Read/Write) contact force color
(Read/Write) When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.
(Read/Write) Environment map intensity multiplier.
(Read/Write) Fog color in RGBA.
(Read/Write) Fog far distance.
(Read/Write) Fog start distance.
(Read/Write) Optional haze color in RGBA.
(Read/Write) Camera-attached head light settings.
(Read/Write) joint color
(Read/Write) Disable frustum culling for all visual meshes.
(Read/Write) Enables Order Independent Transparency.
(Read/Write) Reflection probes.
(Read/Write) Shadow map texture size.
(Read/Write) Enables Screen Space Ambient Occlusion.
(Read/Write) Screen Space Global Illumination settings.
(Read/Write) Tone mapping configuration.
(Read/Write) Global far clipping plane.
(Read/Write) Global near clipping plane.
- ambient_light#
(Read/Write) Global ambient light settings.
- Type:
- bv_color#
(Read/Write) bounding volume color
- Type:
list[float]
- contact_force_color#
(Read/Write) contact force color
- Type:
list[float]
- disable_near_clip#
(Read/Write) When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.
- Type:
bool
- env_map_intensity#
(Read/Write) Environment map intensity multiplier.
- Type:
float
- fog_color#
(Read/Write) Fog color in RGBA.
- Type:
list[float]
- fog_end#
(Read/Write) Fog far distance.
- Type:
float
- fog_start#
(Read/Write) Fog start distance.
- Type:
float
- haze#
(Read/Write) Optional haze color in RGBA.
- Type:
Optional[list[float]]
- joint_color#
(Read/Write) joint color
- Type:
list[float]
- no_frustum_cull#
(Read/Write) Disable frustum culling for all visual meshes.
- Type:
bool
- oit#
(Read/Write) Enables Order Independent Transparency.
- Type:
bool
- shadow_size#
(Read/Write) Shadow map texture size.
- Type:
int
- ssao#
(Read/Write) Enables Screen Space Ambient Occlusion.
- Type:
bool
- ssgi#
(Read/Write) Screen Space Global Illumination settings.
- Type:
SsgiSettings
- tonemapping#
(Read/Write) Tone mapping configuration.
- Type:
- z_far#
(Read/Write) Global far clipping plane.
- Type:
float
- z_near#
(Read/Write) Global near clipping plane.
- Type:
float
- class motrixsim.msd.WeldConstraintType#
基类:
object- Variants:
link_anchor(link_a: str, link_b: Optional[str], anchor: numpy.ndarray, relative_pose: Optional[list[float]], torque_scale: float) site_pair(site_a: str, site_b: str, torque_scale: float)
Methods:
link_anchor(link_a, anchor, torque_scale[, ...])site_pair(site_a, site_b, torque_scale)Attributes:
- static link_anchor(link_a, anchor, torque_scale, link_b=None, relative_pose=None)#
- static site_pair(site_a, site_b, torque_scale)#
- value#
Associated data of the active variant.
Returns dict for named-field variants.
- Type:
dict
- variant#
Active variant name.
Possible values: "link_anchor", "site_pair"
- Type:
str
- class motrixsim.msd.World#
基类:
objectMethods:
add_ground_plane(height)Add a ground plane to the scene.
attach(other[, self_link_name, ...])Attach another world into this world.
deepcopy()Deep copy this world.
Attributes:
(Read/Write) Actuator definitions.
(Read/Write) Reusable asset catalogs (meshes, materials, textures, etc.).
(Read/Write) Global collision ignore pairs.
(Read/Write) Compile-time options used by model compilers.
(Read/Write) The equality constraints that should be satisfied by the articulated bodies.
(Read/Write) Initial free-camera parameters for viewers.
(Read/Write) Articulated-body hierarchy definition.
(Read/Write) Saved keyframe states.
(Read/Write) Scene identifier.
(Read/Write) Sensor definitions.
(Read/Write) Physics simulation options.
(Read/Write) Optional source file path used for resolving relative assets.
(Read/Write) Scene statistics metadata.
(Read/Write) The tendons that constrain joints.
(Read/Write) Renderer/visualization options.
- add_ground_plane(height)#
Add a ground plane to the scene.
Creates an InfinitePlane geometry at the specified height for collision.
- 参数:
height (Real) -- The Z-coordinate of the ground plane.
- attach(other, self_link_name=None, other_link_name=None, other_translation=None, other_rotation=None, other_prefix=None, other_suffix=None)#
Attach another world into this world.
The base directory for resolving relative asset paths is derived from each world's source_path (set by from_file).
- 参数:
other (World) -- The world to attach (cloned internally).
self_link_name (str, optional) -- Link in this world to attach to. If None, merge at root level.
other_link_name (str, optional) -- Extract only this subtree from other.
other_translation (list[float], optional) -- Translation [x, y, z] to apply to other.
other_rotation (list[float], optional) -- Rotation quaternion [x, y, z, w] to apply to other.
other_prefix (str, optional) -- Prefix to add to names in other.
other_suffix (str, optional) -- Suffix to add to names in other.
- 返回:
This world (for chaining).
- 返回类型:
- deepcopy()#
Deep copy this world.
- assets#
(Read/Write) Reusable asset catalogs (meshes, materials, textures, etc.).
- Type:
- collision_ignores#
(Read/Write) Global collision ignore pairs.
- Type:
- compile_options#
(Read/Write) Compile-time options used by model compilers.
- Type:
- equality_constraint_set#
(Read/Write) The equality constraints that should be satisfied by the articulated bodies.
- Type:
- free_camera#
(Read/Write) Initial free-camera parameters for viewers.
- Type:
- name#
(Read/Write) Scene identifier.
- Type:
str
- simulate_option#
(Read/Write) Physics simulation options.
- Type:
- source_path#
(Read/Write) Optional source file path used for resolving relative assets.
- Type:
Optional[str]
- statistic#
(Read/Write) Scene statistics metadata.
- Type:
- tendon_set#
(Read/Write) The tendons that constrain joints. Currently only work for multibody joints.
- Type:
TendonSet
- motrixsim.msd.build(world)#
Build a world into a SceneModel ready for simulation.
The base directory for resolving relative asset paths is derived from source_path on the World (set by from_file). If the World was loaded via from_str or from_msgpack, source_path is None and asset paths must be absolute.
- 参数:
world (World) -- The world to build.
- 返回:
The built scene model.
- 返回类型:
- motrixsim.msd.from_file(path)#
Load a model file and return a World for transformation and building.
- 参数:
path (str) -- Path to the model file (MJCF, URDF, or MSD format).
- 返回:
The loaded world data.
- 返回类型:
- motrixsim.msd.from_msgpack(data, file_path)#
Load MSD from MessagePack binary data.
This is more efficient than JSON for large models.
- 参数:
data (bytes) -- MessagePack binary data.
file_path (str) -- A file path whose parent directory is used for resolving relative asset paths.
- 返回:
The loaded world data.
- 返回类型:
- motrixsim.msd.from_str(string, format='mjcf', file_path=None)#
Load string and return a World for transformation and building.
- 参数:
string (str) -- MJCF/URDF/MSD model string.
format (str) -- The format of the model string. One of "mjcf", "urdf", or "msd".
file_path (str, optional) -- A file path whose parent directory is used for resolving relative asset paths. Required for MSD format.
- 返回:
The loaded world data.
- 返回类型: