motrixsim.msd#

警告

该模块仍处于早期开发中,API 还不稳定,随着版本更新可能会有大幅变动。

Classes:

Actuator()

ActuatorTarget

The target type this actuator is applied to.

ActuatorType

This defines how to generate force by diff of control value and current value(actuator_length).

AlphaMode

Alpha blending mode for materials.

AmbientLight()

Global ambient light that illuminates all surfaces uniformly.

AssetSpecs()

BiasType

Body()

BuildinAttr()

Attributes for procedurally generated textures (gradient, checker, flat).

Camera([name, position, orientation, ...])

A camera definition with position, orientation, tracking, and projection settings.

CoACDApxMode

Convex approximation mode used by CoACD when building output hulls.

CoACDConfig()

CoACD convex decomposition parameters stored in MSD simulation options.

CoACDPreprocessMode

Preprocess mode used by CoACD before convex decomposition.

CollisionIgnores()

CollisionMask()

Collision mask for a collider.

ColorSpace

CompileOptions()

ConnectConstraintType

The equality constraint between two links.

ConstraintForceModel

# Note

ContactMatch

Variants:

ContactSensor()

Sensor to report contact information between objects.

ContactSensorReduce

ContactSensorReport()

Type of contact data to report.

ConvexStrategy

Strategy for convex hull generation.

DampingType

DirectionalLightDesc()

Parameters for a directional (sun-like) light source.

DynType

DynamicTextureDesc()

Descriptor for a dynamic texture whose pixel content is set at runtime.

EqualityConnect()

EqualityConstraintSet()

EqualityJoint()

EqualityWeld()

ForceOverride

Contact force override model for constraint solving.

FrameSensor()

FrameSensorRef

Variants:

FrameSensorType

FreeCamera()

A free-look camera defined by azimuth and elevation angles.

FreeJoint()

FrequencyDampingRatio()

Spring-damper parameters using natural frequency and damping ratio.

GainType

GeneralParam()

GeomVisualAttrs()

Visual rendering attributes for a geometry (material, color, visibility group).

Geometry()

HFieldSource()

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.

HFieldSourceType

Variants:

HeadLight()

There's always a head light for every camera.

Hierarchy()

The scene hierarchy, including all bodies, geoms, lights, cameras and sites.

Impedance()

The impedance model same with mujoco.

ImpedanceSpring()

Combination of spring-damper with impedance model.

Inertia()

Inertial properties of a rigid body (mass, center of mass, principal inertia).

IntegratorMethod

Joint()

JointSensor()

JointSensorType

JointTendon()

JointTendonNode()

JointType

The type of joint connecting two links.

Keyframe()

Layer()

A texture layer within a material, binding a texture to a semantic role.

Light()

A light source in the scene with position, direction, color, and type.

LightType

Light source type for a scene light.

Link()

Mark

Material()

MaterialRole

MeshData()

Mesh data with vertex attributes.

MeshSource

Variants:

MeshTransform()

From mesh to geom, subtract position and inverse rotation to geom local

ObjectType

Variants:

PhysicsMaterial()

Physical material properties governing contact force model and friction.

PointLightDesc()

Parameters for an omnidirectional point light source.

PositionParam()

The special parameters of position actuator.

PositionTrack

Probe()

A reflection probe capturing environment reflections within a bounding volume.

Range([lower, upper])

A numeric range defined by inclusive lower and upper bounds.

RotationTrack

SceneStatistic()

SensorSet()

Collection of all sensor types in a scene.

ShapeFit

When a primitive shape references a mesh, a geometric primitive of that type is fitted to the mesh.

ShapeType

SimulateOption()

Site()

SiteShape

SkyboxLayout

SolverType

SpotLightDesc()

Parameters for a spot light with cone angle and range.

SpringDampCoeff

Variants:

SpringDamper()

Define a spring-damper system.

SpringLengthType

The spring length type of the tendon.

StiffnessDamping()

Spring-damper parameters using stiffness and damping coefficients.

SubtreeSensor()

SubtreeSensorType

TexcoordOrigin

Texture()

A texture asset with its source, type, and rendering properties.

TextureSource

Source type for a texture.

TextureType

ToneMapping()

Tone mapping configuration controlling HDR-to-LDR conversion.

ToneMappingMethod

TouchSensor()

TrackMode

Camera tracking mode relative to a parent body.

Visual()

WeldConstraintType

Variants:

World()

Functions:

build(world)

Build a world into a SceneModel ready for simulation.

from_file(path)

Load a model file and return a World for transformation and building.

from_msgpack(data, file_path)

Load MSD from MessagePack binary data.

from_str(string[, format, file_path])

Load string and return a World for transformation and building.

class motrixsim.msd.Actuator#

基类:object

Attributes:

actuator_type

(Read/Write) Actuator behavior model used to generate output force.

ctrlrange

(Read/Write) Optional control input range clamp.

forcerange

(Read/Write) Optional output force range clamp.

gear

(Read/Write) Transmission gear vector from actuator scalar to 6D generalized force.

name

(Read/Write) Optional unique actuator name.

target

(Read/Write) The target object driven by this actuator.

actuator_type#

(Read/Write) Actuator behavior model used to generate output force.

Type:

ActuatorType

ctrlrange#

(Read/Write) Optional control input range clamp.

Type:

Optional[Range]

forcerange#

(Read/Write) Optional output force range clamp.

Type:

Optional[Range]

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:

ActuatorTarget

class motrixsim.msd.ActuatorTarget#

基类:object

The 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:

value

Associated data of the active variant.

variant

Active variant name.

static floating_base(value)#

e.g. freejoint or some 6 DOF target

static joint(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#

基类:object

This 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:

adhesion(value)

general(value)

motor()

position(value)

velocity(value)

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Alpha blending mode for materials.

Variants:

opaque mask(float) blend multiply

Methods:

blend()

mask(value)

multiply()

opaque()

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Global ambient light that illuminates all surfaces uniformly.

Attributes:

brightness

(Read/Write) Ambient light brightness.

color

(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#

基类:object

Attributes:

hfields

(Read/Write) Height-field assets indexed by hfield name.

materials

(Read/Write) for user defined materials, the key is the material name for in file materials, the key is the path#material_name

meshes

(Read/Write) Mesh assets indexed by mesh name.

skybox

(Read/Write) TextureType::Skybox texture doesn't need material element

textures

(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]

textures#

(Read/Write) Texture assets indexed by texture name.

Type:

dict[str, Texture]

class motrixsim.msd.BiasType#

基类:object

Attributes:

Affine = BiasType.Affine#
None_ = BiasType.None_#
class motrixsim.msd.Body#

基类:object

Attributes:

free

(Read/Write) If assigned, the body will be treated as a free body and the joints of the base link will be ignored.

link

(Read/Write) The base link of the body.

mocap

(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]

(Read/Write) The base link of the body.

Type:

Link

mocap#

(Read/Write) Whether this is a mocap body. only work when the body is fixed type

Type:

bool

class motrixsim.msd.BuildinAttr#

基类:object

Attributes for procedurally generated textures (gradient, checker, flat).

Attributes:

height

(Read/Write) Generated texture height in pixels.

mark

(Read/Write) Marker pattern type.

markrgb

(Read/Write) Marker color.

rgb1

(Read/Write) Primary color used by generated texture.

rgb2

(Read/Write) Secondary color used by generated texture.

width

(Read/Write) Generated texture width in pixels.

height#

(Read/Write) Generated texture height in pixels.

Type:

float

mark#

(Read/Write) Marker pattern type.

Type:

Mark

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)#

基类:object

A camera definition with position, orientation, tracking, and projection settings.

Attributes:

depth_only

(Read/Write) Whether to render depth only.

fovy

(Read/Write) degrees

name

(Read/Write) The name of the camera.

orientation

(Read/Write) The local orientation of the camera.

orthographic

(Read/Write) Whether to use orthographic projection.

position

(Read/Write) The local position of the camera.

position_track

(Read/Write) Position tracking behavior.

resolution_x

(Read/Write) The camera render resolution width.

resolution_y

(Read/Write) The camera render resolution height.

rotation_track

(Read/Write) Rotation tracking behavior.

track_position_speed

(Read/Write) The speed of the camera to reach the target position.

track_rotation_speed

(Read/Write) The speed of the camera to reach the target orientation.

track_target

(Read/Write) The track target name.

zfar

(Read/Write) The far clipping plane distance.

znear

(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:

PositionTrack

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:

RotationTrack

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#

基类:object

Convex approximation mode used by CoACD when building output hulls.

Attributes:

Box = CoACDApxMode.Box#
Ch = CoACDApxMode.Ch#
class motrixsim.msd.CoACDConfig#

基类:object

CoACD convex decomposition parameters stored in MSD simulation options.

Attributes:

apx_mode

(Read/Write) Convex approximation mode used inside CoACD.

decimate

(Read/Write) Whether to decimate the mesh before decomposition.

extrude

(Read/Write) Whether to extrude thin structures before decomposition.

extrude_margin

(Read/Write) Margin used by the extrusion pass.

max_ch_vertex

(Read/Write) Maximum vertex count allowed for backend-generated convex hulls.

max_convex_hull

(Read/Write) Maximum number of hulls requested from the CoACD backend.

mcts_iteration

(Read/Write) Number of MCTS iterations used to search cutting planes.

mcts_max_depth

(Read/Write) Maximum recursion depth for the MCTS search tree.

mcts_nodes

(Read/Write) Number of MCTS nodes explored per split step.

merge

(Read/Write) Whether to merge output hulls after decomposition.

pca

(Read/Write) Whether to apply PCA normalization before decomposition.

prep_resolution

(Read/Write) Resolution used by the preprocess stage when remeshing is enabled.

preprocess_mode

(Read/Write) Whether CoACD should preprocess/remesh the input mesh before decomposition.

real_metric

(Read/Write) Whether to interpret the threshold in scene units instead of normalized units.

sample_resolution

(Read/Write) Number of samples used when evaluating concavity.

seed

(Read/Write) Random seed used by CoACD.

threshold

(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:

CoACDApxMode

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:

CoACDPreprocessMode

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#

基类:object

Preprocess mode used by CoACD before convex decomposition.

Attributes:

Auto = CoACDPreprocessMode.Auto#
Off = CoACDPreprocessMode.Off#
On = CoACDPreprocessMode.On#
class motrixsim.msd.CollisionIgnores#

基类:object

Attributes:

link_pairs

(Read/Write) The link name pairs that should be ignored in collision detection.

(Read/Write) The link name pairs that should be ignored in collision detection.

Type:

list[list[str]]

class motrixsim.msd.CollisionMask#

基类:object

Collision mask for a collider. Used to filter which colliders can collide with each other.

Methods:

collide_with_all()

Create a CollisionMask that collides with all other colliders.

non_collidable()

Create a CollisionMask that does not collide with anything.

Attributes:

collide_group

(Read/Write) The collide group of the collider.

collide_with

(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#

基类:object

Attributes:

Linear = ColorSpace.Linear#
Srgb = ColorSpace.Srgb#
class motrixsim.msd.CompileOptions#

基类:object

Attributes:

shape_fit

(Read/Write) Fit primitive shapes to mesh's aabb or inertia box when a primitive shape references a mesh.

shape_fit#

(Read/Write) Fit primitive shapes to mesh's aabb or inertia box when a primitive shape references a mesh.

Type:

ShapeFit

class motrixsim.msd.ConnectConstraintType#

基类:object

The 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:

value

Associated data of the active variant.

variant

Active variant name.

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:

value

Associated data of the active variant.

variant

Active variant name.

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:

value

Associated data of the active variant.

variant

Active variant name.

static geom_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#

基类:object

Sensor to report contact information between objects.

Attributes:

match_

(Read/Write) Define the contact pair to monitor.

max_num

(Read/Write) Maximum number of contacts to record.

name

(Read/Write) Optional contact sensor name.

reduce

(Read/Write) How to reduce the contacts

report

(Read/Write) Type of contact data to report.

match_#

(Read/Write) Define the contact pair to monitor.

Type:

ContactMatch

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:

ContactSensorReduce

report#

(Read/Write) Type of contact data to report.

Type:

ContactSensorReport

class motrixsim.msd.ContactSensorReduce#

基类:object

Attributes:

MaxForce = ContactSensorReduce.MaxForce#
MinDist = ContactSensorReduce.MinDist#
NetForce = ContactSensorReduce.NetForce#
None_ = ContactSensorReduce.None_#
class motrixsim.msd.ContactSensorReport#

基类:object

Type 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:

dist

(Read/Write) Report penetration distance (or signed distance).

force

(Read/Write) Report resultant contact force.

found

(Read/Write) Report whether any contact is found.

normal

(Read/Write) Report contact normal direction.

pos

(Read/Write) Report contact position.

tangent

(Read/Write) Report tangent direction.

torque

(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#

基类:object

Strategy 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#

基类:object

Attributes:

Dampratio = DampingType.Dampratio#
Kv = DampingType.Kv#
class motrixsim.msd.DirectionalLightDesc#

基类:object

Parameters for a directional (sun-like) light source.

Attributes:

illuminance

(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#

基类:object

Attributes:

Filter = DynType.Filter#
FilterExact = DynType.FilterExact#
Integrator = DynType.Integrator#
None_ = DynType.None_#
class motrixsim.msd.DynamicTextureDesc#

基类:object

Descriptor for a dynamic texture whose pixel content is set at runtime.

Attributes:

channels

3 (RGB) or 4 (RGBA).

height

(Read/Write)

per_instance

(Read/Write) When true, each scene instance gets its own texture content via a TextureAtlas.

width

(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#

基类:object

Attributes:

active

(Read/Write) Whether this equality constraint is enabled.

connect_type

(Read/Write) Constraint mode and referenced objects for connect constraint.

name

(Read/Write) Optional unique constraint name.

spring

(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:

ConnectConstraintType

name#

(Read/Write) Optional unique constraint name.

Type:

Optional[str]

spring#

(Read/Write) Soft-constraint spring/impedance parameters.

Type:

ImpedanceSpring

class motrixsim.msd.EqualityConstraintSet#

基类:object

Attributes:

connects

(Read/Write) Connect constraints collection.

joints

(Read/Write) Joint coupling constraints collection.

welds

(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#

基类:object

Attributes:

active

(Read/Write) Whether this equality constraint is enabled.

joint_a

(Read/Write) Primary joint constrained by this polynomial relationship.

joint_b

(Read/Write) Secondary joint constrained against joint_a.

name

(Read/Write) Optional unique constraint name.

polycoeff

(Read/Write) Polynomial coefficients for mapping joint_a position to joint_b.

spring

(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:

ImpedanceSpring

class motrixsim.msd.EqualityWeld#

基类:object

Attributes:

active

(Read/Write) Whether this equality constraint is enabled.

name

(Read/Write) Optional unique constraint name.

spring

(Read/Write) Soft-constraint spring/impedance parameters.

weld_type

(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:

ImpedanceSpring

weld_type#

(Read/Write) Constraint mode and referenced objects for weld constraint.

Type:

WeldConstraintType

class motrixsim.msd.ForceOverride#

基类:object

Contact 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:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Attributes:

name

(Read/Write) Optional sensor name.

object_type

(Read/Write) Target object whose frame is sampled.

ref_frame

(Read/Write) Reference frame used to express output.

sensor_type

(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:

ObjectType

ref_frame#

(Read/Write) Reference frame used to express output.

Type:

FrameSensorRef

sensor_type#

(Read/Write) Frame quantity to measure.

Type:

FrameSensorType

class motrixsim.msd.FrameSensorRef#

基类:object

Variants:

local world object(ObjectType)

Methods:

local()

object(value)

world()

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Attributes:

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#

基类:object

A free-look camera defined by azimuth and elevation angles.

Attributes:

azimuth

(Read/Write) initial azimuth around the vertical z-axis in degrees.

elevation

(Read/Write) initial elevation in degrees, rotation around camera's x-axis, negative correspond to moving the camera up from the horizontal plane

fovy

(Read/Write) vertical field of view(degrees)

orthographic

(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#

基类:object

Attributes:

armature

(Read/Write) Additional diagonal inertia on joint DoFs.

friction_loss

(Read/Write) Joint friction-loss magnitude.

name

(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#

基类:object

Spring-damper parameters using natural frequency and damping ratio.

This is converted to StiffnessDamping internally: - k = w² - d = 2 * w * z

Attributes:

w

(Read/Write) The natural frequency of the spring-damper system.

z

(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#

基类:object

Attributes:

Affine = GainType.Affine#
Fixed = GainType.Fixed#
class motrixsim.msd.GeneralParam#

基类:object

Attributes:

actearly

(Read/Write) Whether to apply activation one step early.

actrange

(Read/Write) Optional activation state clamp range.

bias

(Read/Write) Bias function type.

biasprm

(Read/Write) Parameters for bias model.

dynprm

(Read/Write) Parameters for dynamic model.

dyntype

(Read/Write) Dynamic model type for activation state update.

gain

(Read/Write) Gain function type.

gainprm

(Read/Write) Parameters for gain model.

actearly#

(Read/Write) Whether to apply activation one step early.

Type:

bool

actrange#

(Read/Write) Optional activation state clamp range.

Type:

Optional[Range]

bias#

(Read/Write) Bias function type.

Type:

BiasType

biasprm#

(Read/Write) Parameters for bias model.

Type:

numpy.ndarray

dynprm#

(Read/Write) Parameters for dynamic model.

Type:

numpy.ndarray

dyntype#

(Read/Write) Dynamic model type for activation state update.

Type:

DynType

gain#

(Read/Write) Gain function type.

Type:

GainType

gainprm#

(Read/Write) Parameters for gain model.

Type:

numpy.ndarray

class motrixsim.msd.GeomVisualAttrs#

基类:object

Visual rendering attributes for a geometry (material, color, visibility group).

Attributes:

color

(Read/Write) The color of the geometry.

group

(Read/Write) By default, groups 0, 1 and 2 are visible, while all other groups are invisible.

material

(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#

基类:object

Attributes:

collision_mask

(Read/Write) Collision filtering mask.

gap

(Read/Write) Separation distance below margin that still keeps contact inactive.

hfield

(Read/Write) Referenced height-field asset name when shape is HField.

margin

(Read/Write) Margin and gap control the distance threshold of contact constraint.

mass

(Read/Write) The mass of the geometry.

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.

mesh_scale

(Read/Write) scale mesh to geom

name

(Read/Write) Optional geometry name.

orientation

(Read/Write) Local orientation relative to link frame.

physics_material

(Read/Write) Contact/friction material parameters.

position

(Read/Write) Local translation relative to link frame.

priority

(Read/Write) The priority of the geometry.

shape

(Read/Write) Geometry primitive/source type.

size

(Read/Write) The size of the geometry.

visual

(Read/Write) Visual rendering attributes for this geometry.

collision_mask#

(Read/Write) Collision filtering mask.

Type:

CollisionMask

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:

PhysicsMaterial

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

shape#

(Read/Write) Geometry primitive/source type.

Type:

ShapeType

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:

GeomVisualAttrs

class motrixsim.msd.HFieldSource#

基类:object

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.

Attributes:

height_scale

(Read/Write) Multiplier applied to source height samples.

ncol

(Read/Write) the number of columns

nrow

(Read/Write) the number of rows

size

(Read/Write) World-space X/Y size covered by this height field.

source_type

(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:

HFieldSourceType

class motrixsim.msd.HFieldSourceType#

基类:object

Variants:

path(path: str, content_type: Optional[str]) buffer(hfield: numpy.ndarray, name: str)

Methods:

buffer(hfield, name)

path(path[, content_type])

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

There's always a head light for every camera.

Attributes:

color

(Read/Write) Head light RGB color.

luminous_power

(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#

基类:object

The scene hierarchy, including all bodies, geoms, lights, cameras and sites.

Attributes:

bodies

(Read/Write) All multibodies in the world.

cameras

(Read/Write) Static cameras under the world.

geoms

(Read/Write) Static geometries under the world.

lights

(Read/Write) Static lights under the world.

sites

(Read/Write) Static sites under the world.

bodies#

(Read/Write) All multibodies in the world. Each element represents the base link of a multibody.

Type:

list[Body]

cameras#

(Read/Write) Static cameras under the world.

Type:

list[Camera]

geoms#

(Read/Write) Static geometries under the world.

Type:

list[Geometry]

lights#

(Read/Write) Static lights under the world.

Type:

list[Light]

sites#

(Read/Write) Static sites under the world.

Type:

list[Site]

class motrixsim.msd.Impedance#

基类:object

The impedance model same with mujoco.

# Note

  • dmax < d0 is allowed.

Attributes:

d0

(Read/Write) Impedance value when distance is zero.

dmax

(Read/Write) Impedance value at or beyond normalized distance 1.

middle

(Read/Write) Piecewise transition split point in normalized distance (0, 1).

power

(Read/Write) Curve exponent controlling interpolation sharpness.

width

(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#

基类:object

Combination of spring-damper with impedance model.

Attributes:

impedance

(Read/Write) Distance-dependent impedance profile.

spring

(Read/Write) Spring-damper coefficients.

impedance#

(Read/Write) Distance-dependent impedance profile.

Type:

Impedance

spring#

(Read/Write) Spring-damper coefficients.

Type:

StiffnessDamping

class motrixsim.msd.Inertia#

基类:object

Inertial properties of a rigid body (mass, center of mass, principal inertia).

Attributes:

diag_inertia

(Read/Write) Diagonal inertia around local principal axes.

mass

(Read/Write) Total mass.

orientation

(Read/Write) Principal inertia frame orientation in local frame.

pos

(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#

基类:object

Attributes:

Explicit = IntegratorMethod.Explicit#
Implicit = IntegratorMethod.Implicit#
ImplicitVelocity = IntegratorMethod.ImplicitVelocity#
class motrixsim.msd.Joint#

基类:object

Attributes:

actuator_force_limit

(Read/Write) The force limit that actuator can apply to the joint.

armature

(Read/Write) Additional diagonal inertia on joint DoFs.

axis

(Read/Write) Joint axis in parent/body frame (for revolute/slide joints).

friction_damping

(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction.

friction_loss

(Read/Write) Joint friction-loss magnitude.

limit_force

(Read/Write) The constraint force applied to the joint when it goes beyond the limits.

margin

(Read/Write) The distance threshold below which limits become active.

name

(Read/Write) The name of the joint connecting this link to the parent body.

pos

(Read/Write) The joint position of attached body in the body coordinate frame.

pos_limit

(Read/Write) The position limit range of the joint.

ref_

(Read/Write) The initial position or angle of the joint, only used for slide and hinge joints.

spring_damper

(Read/Write) Optional spring-damper behavior around ref_.

type_

(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:

ConstraintForceModel

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

pos_limit#

(Read/Write) The position limit range of the joint.

Type:

Range

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]

type_#

(Read/Write) Joint kinematic type.

Type:

JointType

class motrixsim.msd.JointSensor#

基类:object

Attributes:

joint

(Read/Write) Target joint name.

name

(Read/Write) Optional sensor name.

type_

(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:

JointSensorType

class motrixsim.msd.JointSensorType#

基类:object

Attributes:

JointPos = JointSensorType.JointPos#
JointVel = JointSensorType.JointVel#
class motrixsim.msd.JointTendon#

基类:object

Attributes:

friction_damping

(Read/Write) The data for frictionloss soft constraint, from solreffriction and solimpfriction.

frictionloss

(Read/Write) Tendon friction-loss magnitude.

joints

(Read/Write) Ordered joint path that defines tendon length.

limit

(Read/Write) Optional tendon length limit.

limit_force

(Read/Write) Constraint force model used when hitting tendon limits.

name

(Read/Write) Optional tendon name.

spring

(Read/Write) The spring for the tendon.

spring_length

(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#

(Read/Write) Optional tendon length limit.

Type:

Optional[Range]

limit_force#

(Read/Write) Constraint force model used when hitting tendon limits.

Type:

ImpedanceSpring

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:

SpringLengthType

class motrixsim.msd.JointTendonNode#

基类:object

Attributes:

joint_name

(Read/Write) Joint name participating in tendon length computation.

weight

(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#

基类:object

The type of joint connecting two links.

Attributes:

Ball = JointType.Ball#
Revolute = JointType.Revolute#
Slide = JointType.Slide#
class motrixsim.msd.Keyframe#

基类:object

Attributes:

ctrl

(Read/Write) Actuator control vector snapshot at this keyframe.

dof_pos

(Read/Write) DoF position vector snapshot at this keyframe.

dof_vel

(Read/Write) DoF velocity vector snapshot at this keyframe.

name

(Read/Write) Optional keyframe name.

time

(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#

基类:object

A texture layer within a material, binding a texture to a semantic role.

Attributes:

role

(Read/Write) Semantic role of this texture layer.

texture_name

(Read/Write) Referenced texture name for this layer.

role#

(Read/Write) Semantic role of this texture layer.

Type:

MaterialRole

texture_name#

(Read/Write) Referenced texture name for this layer.

Type:

Optional[str]

class motrixsim.msd.Light#

基类:object

A light source in the scene with position, direction, color, and type.

Attributes:

cast_shadows

(Read/Write) Whether the light casts shadows.

color

(Read/Write) The color of the light.

direction

(Read/Write) The direction of the light.

mode

(Read/Write) Target tracking mode relative to parent/body.

name

(Read/Write) Optional light name.

position

(Read/Write) The position of the light.

type_

(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

mode#

(Read/Write) Target tracking mode relative to parent/body.

Type:

TrackMode

name#

(Read/Write) Optional light name.

Type:

Optional[str]

position#

(Read/Write) The position of the light.

Type:

numpy.ndarray

type_#

(Read/Write) The type of the light.

Type:

LightType

class motrixsim.msd.LightType#

基类:object

Light source type for a scene light.

Variants:

directional(DirectionalLightDesc) spot(SpotLightDesc) point(PointLightDesc)

Methods:

directional(value)

point(value)

spot(value)

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

static directional(value)#
static point(value)#
static spot(value)#
value#

Associated data of the active variant.

Type:

DirectionalLightDesc | SpotLightDesc | PointLightDesc

variant#

Active variant name.

Possible values: "directional", "spot", "point"

Type:

str

基类:object

Attributes:

cameras

(Read/Write) The cameras attached to this link.

children

(Read/Write) Child links in the kinematic tree.

disable_self_collision

(Read/Write) Disable self collision for this link and its descendants.

geoms

(Read/Write) The geometries attached to this link.

gravcomp

(Read/Write) Gravity compensation, a value of 1 creates a force counter to the body’s gravity.

inertial

(Read/Write) The link's inertia in the parent frame.

joints

(Read/Write) The joints connecting this link to the parent body.

lights

(Read/Write) The lights attached to this link.

local_rotation

(Read/Write) The link's rotation in the parent frame.

local_translation

(Read/Write) The link's translation in the parent frame.

name

(Read/Write) name of the link.

sites

(Read/Write) The sites attached to this link.

cameras#

(Read/Write) The cameras attached to this link.

Type:

list[Camera]

children#

(Read/Write) Child links in the kinematic tree.

Type:

list[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

geoms#

(Read/Write) The geometries attached to this link.

Type:

list[Geometry]

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:

Inertia

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]

lights#

(Read/Write) The lights attached to this link.

Type:

list[Light]

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]

sites#

(Read/Write) The sites attached to this link.

Type:

list[Site]

class motrixsim.msd.Mark#

基类:object

Attributes:

Cross = Mark.Cross#
Edge = Mark.Edge#
None_ = Mark.None_#
Random = Mark.Random#
class motrixsim.msd.Material#

基类:object

Attributes:

alpha_mode

(Read/Write) Alpha blending/masking mode.

both_side

(Read/Write) Whether to render both front and back faces.

cast_shadow

(Read/Write) Whether geometries using this material cast shadows.

color

(Read/Write) Base albedo color.

depth_bias

(Read/Write) Depth bias used to mitigate z-fighting.

detail_repeat

(Read/Write) UV repeat factor for detail textures.

detail_strength

(Read/Write) Strength of detail-normal contribution.

emissive

(Read/Write) Linear RGB emissive color

emissive_intensity

(Read/Write) Scalar intensity multiplier for emissive color.

flip_tangent_u

(Read/Write) Flip tangent-space U axis for normal mapping.

flip_tangent_v

(Read/Write) Flip tangent-space V axis for normal mapping.

ior

(Read/Write) Index of refraction.

layers

(Read/Write) Additional texture layers.

metallic

(Read/Write) Metallic factor.

name

(Read/Write) Global identifier name, if from file, file name is prefixed.

reflectance

(Read/Write) Reflection strength.

roughness

(Read/Write) Surface roughness factor.

specular_color

(Read/Write) Specular color tint.

tex_origin

(Read/Write) Texture coordinate origin convention.

tex_repeat

(Read/Write) UV repeat factor.

tex_translation

(Read/Write) UV translation offset.

tex_uniform

(Read/Write) Whether to enforce uniform texture scaling.

texture_name

(Read/Write) Main texture name for this material.

transmisive

(Read/Write) Transmission amount.

alpha_mode#

(Read/Write) Alpha blending/masking mode.

Type:

AlphaMode

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

layers#

(Read/Write) Additional texture layers.

Type:

list[Layer]

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:

TexcoordOrigin

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#

基类:object

Attributes:

DetailNormal = MaterialRole.DetailNormal#
Emissive = MaterialRole.Emissive#
Normal = MaterialRole.Normal#
Orm = MaterialRole.Orm#
Rgb = MaterialRole.Rgb#
Rgba = MaterialRole.Rgba#
class motrixsim.msd.MeshData#

基类:object

Mesh 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:

name

(Read/Write) The name of the mesh (used to reference it in Geometry).

normal

(Read/Write) Vertex normals as (N, 3) array, or None.

tangents

(Read/Write) Vertex tangents as (N, 4) array, or None.

texcoord

(Read/Write) Texture coordinates as (N, 2) array, or None.

triangle_count

Number of triangles in the mesh.

triangles

(Read/Write) Triangle index buffer.

vertex_count

Number of vertices in the mesh.

vertices

(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:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

From mesh to geom, subtract position and inverse rotation to geom local

Attributes:

position

(Read/Write) Optional translation applied from mesh space to geom space.

rotation

(Read/Write) Optional rotation applied from mesh space to geom space.

scale

(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:

value

Associated data of the active variant.

variant

Active variant name.

static geom(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#

基类:object

Physical material properties governing contact force model and friction.

Attributes:

condim

(Read/Write) The condim of the material.

contact_model

(Read/Write) The contact force model

density

(Read/Write) The density of the material.

force_mix

(Read/Write) The contact force mixing factor for the material.

friction

(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:

ConstraintForceModel

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#

基类:object

Parameters for an omnidirectional point light source.

Attributes:

intensity

(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.

radius

(Read/Write) Simulates a light source coming from a spherical volume with the given radius.

range

(Read/Write) Cut-off for the light's area-of-effect.

shadow_map_near_z

(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#

基类:object

The special parameters of position actuator.

Attributes:

damping_type

(Read/Write)

damping_value

(Read/Write)

kp

(Read/Write) Proportional gain used by position actuator.

timeconst

(Read/Write)

damping_type#

(Read/Write)

Type:

DampingType

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#

基类:object

Attributes:

FixedLocal = PositionTrack.FixedLocal#
FixedWorld = PositionTrack.FixedWorld#
Free = PositionTrack.Free#
class motrixsim.msd.Probe#

基类:object

A reflection probe capturing environment reflections within a bounding volume.

Attributes:

position

(Read/Write) Probe center position.

scale

(Read/Write) Probe box scale/extents.

texture

(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)#

基类:object

A numeric range defined by inclusive lower and upper bounds.

class motrixsim.msd.RotationTrack#

基类:object

Attributes:

FixedLocal = RotationTrack.FixedLocal#
FixedWorld = RotationTrack.FixedWorld#
Free = RotationTrack.Free#
class motrixsim.msd.SceneStatistic#

基类:object

Attributes:

center

(Read/Write) extent box center

extent

(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#

基类:object

Collection of all sensor types in a scene.

Attributes:

contact

(Read/Write) Contact sensors.

frame

(Read/Write) Frame sensors.

joint

(Read/Write) Joint sensors.

subtree

(Read/Write) Subtree sensors.

touch

(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#

基类:object

When 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#

基类:object

Attributes:

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#

基类:object

Attributes:

coacd_strategy

(Read/Write) Controls whether collision meshes should be decomposed into multiple convex parts during compile/load time.

constraint_solver_iterations

(Read/Write) The maximum number of iterations for iterative constraint solvers.

constraint_solver_tolerance

(Read/Write) The tolerance for iterative constraint solvers.

convex_strategy

(Read/Write) The strategy to use for single convex hull generation.

disable_actuators

(Read/Write) Whether to disable all actuators.

disable_constraints

(Read/Write) Whether to disable all constraints.

disable_contacts

(Read/Write) Whether to disable all contacts.

disable_damping

(Read/Write) Whether to disable damping terms.

disable_equality

(Read/Write) Whether to disable equality constraints.

disable_frictionloss

(Read/Write) Whether to disable friction-loss constraints on joints/tendons.

disable_gravity

(Read/Write) Whether to disable gravity force.

disable_limit

(Read/Write) Whether to disable joint/contact limits.

friction_model

(Read/Write) Friction model selector used by contact solver.

gravity

(Read/Write) The gravity of the simulation.

override_contact_force

(Read/Write) Global override for contact force model.

override_contact_margin

(Read/Write) If specified, all margin values for contacts will be overridden by this value.

override_friction

(Read/Write) If specified, all friction coefficients for contacts will be overridden by this value.

runtime_max_convex_hulls_per_mesh

(Read/Write) Engine-side upper bound on the number of convex hull colliders accepted for one scaled mesh.

safty_damping_clamp

(Read/Write) If true, the solver will automatically clamp damping coefficients to make spring damper system stable.

solver_type

(Read/Write) Constraint solver backend type.

timestep

(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:

ConvexStrategy

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:

SolverType

timestep#

(Read/Write) The simulation time step in seconds.

Type:

float

class motrixsim.msd.Site#

基类:object

Attributes:

from_to

implement 'from_to' for site

group

(Read/Write) The visual group of the site.

material

(Read/Write) The material of the site.

name

(Read/Write) Optional site name.

orientation

(Read/Write) Local site orientation in link frame.

position

(Read/Write) Local site translation in link frame.

rgba

(Read/Write) The color of the site.

shape

(Read/Write) Site primitive shape type.

size

(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]

shape#

(Read/Write) Site primitive shape type.

Type:

SiteShape

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#

基类:object

Attributes:

Box = SiteShape.Box#
Capsule = SiteShape.Capsule#
Cylinder = SiteShape.Cylinder#
Sphere = SiteShape.Sphere#
class motrixsim.msd.SkyboxLayout#

基类:object

Attributes:

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#

基类:object

Attributes:

PGS = SolverType.PGS#
PGSIMPR = SolverType.PGSIMPR#
class motrixsim.msd.SpotLightDesc#

基类:object

Parameters for a spot light with cone angle and range.

Attributes:

inner_angle

(Read/Write) The inner angle of the spot light in degrees.

intensity

(Read/Write) Luminous power in lumens, representing the amount of light emitted by this source in all directions.

outer_angle

(Read/Write) The outer angle of the spot light in degrees.

range

(Read/Write) Range in meters that this light illuminates.

shadow_map_near_z

(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:

value

Associated data of the active variant.

variant

Active variant name.

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.

Type:

StiffnessDamping | FrequencyDampingRatio

variant#

Active variant name.

Possible values: "stiffness_damping", "frequency_damping_ratio"

Type:

str

class motrixsim.msd.SpringDamper#

基类:object

Define a spring-damper system.

Attributes:

coeff

(Read/Write) Spring-damper coefficients representation.

target_pos

(Read/Write) Equilibrium position of the spring.

coeff#

(Read/Write) Spring-damper coefficients representation.

Type:

SpringDampCoeff

target_pos#

(Read/Write) Equilibrium position of the spring.

Type:

float

class motrixsim.msd.SpringLengthType#

基类:object

The spring length type of the tendon.

Variants:

automatic fixed(float) range(Range)

Methods:

automatic()

fixed(value)

range(value)

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Spring-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.

k

(Read/Write) The stiffness of the spring.

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#

基类:object

Attributes:

link

(Read/Write) Root link name of the monitored subtree.

name

(Read/Write) Optional sensor name.

type_

(Read/Write) Subtree quantity to measure.

(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:

SubtreeSensorType

class motrixsim.msd.SubtreeSensorType#

基类:object

Attributes:

AngMom = SubtreeSensorType.AngMom#
Com = SubtreeSensorType.Com#
LinVel = SubtreeSensorType.LinVel#
class motrixsim.msd.TexcoordOrigin#

基类:object

Attributes:

BottomLeft = TexcoordOrigin.BottomLeft#
TopLeft = TexcoordOrigin.TopLeft#
class motrixsim.msd.Texture#

基类:object

A texture asset with its source, type, and rendering properties.

Attributes:

color_space

(Read/Write) Declared texture color space.

gen_mipmaps

(Read/Write) Whether mipmaps should be generated.

grid_layout

(Read/Write) Optional layout mapping for skybox faces.

grid_size

(Read/Write) Optional grid size for tiled/atlas textures.

name

(Read/Write) Optional texture name.

source

(Read/Write) Texture source definition.

type_

(Read/Write) Texture usage/type.

color_space#

(Read/Write) Declared texture color space.

Type:

ColorSpace

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:

TextureSource

type_#

(Read/Write) Texture usage/type.

Type:

TextureType

class motrixsim.msd.TextureSource#

基类:object

Source type for a texture.

Variants:

file(str) gradient(BuildinAttr) checker(BuildinAttr) flat(BuildinAttr) dynamic(DynamicTextureDesc)

Methods:

checker(value)

dynamic(value)

file(value)

flat(value)

gradient(value)

Attributes:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Attributes:

D2 = TextureType.D2#
EnvDiff = TextureType.EnvDiff#
EnvSpec = TextureType.EnvSpec#
Probe = TextureType.Probe#
Skybox = TextureType.Skybox#
class motrixsim.msd.ToneMapping#

基类:object

Tone mapping configuration controlling HDR-to-LDR conversion.

Attributes:

method

(Read/Write) Tone mapping algorithm.

method#

(Read/Write) Tone mapping algorithm.

Type:

ToneMappingMethod

class motrixsim.msd.ToneMappingMethod#

基类:object

Attributes:

Aces = ToneMappingMethod.Aces#
None_ = ToneMappingMethod.None_#
class motrixsim.msd.TouchSensor#

基类:object

Attributes:

name

(Read/Write) Optional sensor name.

site

(Read/Write) Target site name used for touch sensing.

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#

基类:object

Camera 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:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Attributes:

ambient_light

(Read/Write) Global ambient light settings.

bv_color

(Read/Write) bounding volume color

contact_force_color

(Read/Write) contact force color

disable_near_clip

(Read/Write) When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.

env_map_intensity

(Read/Write) Environment map intensity multiplier.

fog_color

(Read/Write) Fog color in RGBA.

fog_end

(Read/Write) Fog far distance.

fog_start

(Read/Write) Fog start distance.

haze

(Read/Write) Optional haze color in RGBA.

head_light

(Read/Write) Camera-attached head light settings.

joint_color

(Read/Write) joint color

no_frustum_cull

(Read/Write) Disable frustum culling for all visual meshes.

oit

(Read/Write) Enables Order Independent Transparency.

probes

(Read/Write) Reflection probes.

shadow_size

(Read/Write) Shadow map texture size.

ssao

(Read/Write) Enables Screen Space Ambient Occlusion.

ssgi

(Read/Write) Screen Space Global Illumination settings.

tonemapping

(Read/Write) Tone mapping configuration.

z_far

(Read/Write) Global far clipping plane.

z_near

(Read/Write) Global near clipping plane.

ambient_light#

(Read/Write) Global ambient light settings.

Type:

AmbientLight

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]]

head_light#

(Read/Write) Camera-attached head light settings.

Type:

HeadLight

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

probes#

(Read/Write) Reflection probes.

Type:

list[Probe]

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:

ToneMapping

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:

value

Associated data of the active variant.

variant

Active variant name.

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#

基类:object

Methods:

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:

actuators

(Read/Write) Actuator definitions.

assets

(Read/Write) Reusable asset catalogs (meshes, materials, textures, etc.).

collision_ignores

(Read/Write) Global collision ignore pairs.

compile_options

(Read/Write) Compile-time options used by model compilers.

equality_constraint_set

(Read/Write) The equality constraints that should be satisfied by the articulated bodies.

free_camera

(Read/Write) Initial free-camera parameters for viewers.

hierarchy

(Read/Write) Articulated-body hierarchy definition.

keyframes

(Read/Write) Saved keyframe states.

name

(Read/Write) Scene identifier.

sensors

(Read/Write) Sensor definitions.

simulate_option

(Read/Write) Physics simulation options.

source_path

(Read/Write) Optional source file path used for resolving relative assets.

statistic

(Read/Write) Scene statistics metadata.

tendon_set

(Read/Write) The tendons that constrain joints.

visual

(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).

返回类型:

World

deepcopy()#

Deep copy this world.

actuators#

(Read/Write) Actuator definitions.

Type:

list[Actuator]

assets#

(Read/Write) Reusable asset catalogs (meshes, materials, textures, etc.).

Type:

AssetSpecs

collision_ignores#

(Read/Write) Global collision ignore pairs.

Type:

CollisionIgnores

compile_options#

(Read/Write) Compile-time options used by model compilers.

Type:

CompileOptions

equality_constraint_set#

(Read/Write) The equality constraints that should be satisfied by the articulated bodies.

Type:

EqualityConstraintSet

free_camera#

(Read/Write) Initial free-camera parameters for viewers.

Type:

FreeCamera

hierarchy#

(Read/Write) Articulated-body hierarchy definition.

Type:

Hierarchy

keyframes#

(Read/Write) Saved keyframe states.

Type:

list[Keyframe]

name#

(Read/Write) Scene identifier.

Type:

str

sensors#

(Read/Write) Sensor definitions.

Type:

SensorSet

simulate_option#

(Read/Write) Physics simulation options.

Type:

SimulateOption

source_path#

(Read/Write) Optional source file path used for resolving relative assets.

Type:

Optional[str]

statistic#

(Read/Write) Scene statistics metadata.

Type:

SceneStatistic

tendon_set#

(Read/Write) The tendons that constrain joints. Currently only work for multibody joints.

Type:

TendonSet

visual#

(Read/Write) Renderer/visualization options.

Type:

Visual

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.

返回类型:

SceneModel

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.

返回类型:

World

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.

返回类型:

World

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.

返回类型:

World