motrixsim.msd#

Classes:

Actuator()

ActuatorTarget

ActuatorType

AlphaMode

AmbientLight()

AssetSpecs()

BiasType

Body()

BuildinAttr()

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

CollisionIgnores()

CollisionMask()

Collision mask for a collider.

ColorSpace

CompileOptions()

ConnectConstraintType

ConstraintForceModel

ContactMatch

ContactSensor()

Sensor to report contact information between objects.

ContactSensorReduce

ContactSensorReport()

Type of contact data to report.

ConvexStrategy

Strategy for convex hull generation.

DirectionalLightDesc()

DynType

EqualityConnect()

EqualityConstraintSet()

EqualityJoint()

EqualityWeld()

ForceOverride

FrameSensor()

FrameSensorRef

FrameSensorType

FreeCamera()

FreeJoint()

FrequencyDampingRatio()

Spring-damper parameters using natural frequency and damping ratio.

GainType

GeneralParam()

GeomVisualAttrs()

Geometry()

HFieldSource()

attention : the height values here (in source_type.buffer.hfield) is real value.

HFieldSourceType

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

IntegratorMethod

Joint()

JointSensor()

JointSensorType

JointTendon()

JointTendonNode()

JointType

The type of joint connecting two links.

Keyframe()

Layer()

Light()

LightType

Link()

Mark

Material()

MaterialRole

MeshData()

Mesh data with vertex attributes.

MeshSource

MeshTransform()

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

ObjectType

PhysicsMaterial()

PointLightDesc()

PositionParam()

The special parameters of position actuator.

PositionTrack

Probe()

Range([lower, upper])

RotationTrack

Scene(world[, path])

A builder for combining and building MSD models.

SceneStatistic()

SensorSet()

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

SpringDampCoeff

SpringDamper()

Define a spring-damper system.

SpringLengthType

StiffnessDamping()

Spring-damper parameters using stiffness and damping coefficients.

SubtreeSensor()

SubtreeSensorType

TexcoordOrigin

Texture()

TextureSource

TextureType

ToneMapping()

ToneMappingMethod

TouchSensor()

TrackMode

Visual()

WeldConstraintType

World()

Functions:

from_file(path)

Load a model file and return an Scene for transformation and building.

from_msgpack(data, base_path)

Load MSD from MessagePack binary data.

from_str(string[, format, base_path])

Load string and return an Scene for transformation and building.

class motrixsim.msd.Actuator#

基类:object

Methods:

set_actuator_type(value)

set_ctrlrange(value)

set_forcerange(value)

set_gear(value)

set_name(value)

set_target(value)

Attributes:

set_actuator_type(value)#
set_ctrlrange(value)#
set_forcerange(value)#
set_gear(value)#
set_name(value)#
set_target(value)#
actuator_type#
ctrlrange#
forcerange#
gear#
name#
target#
class motrixsim.msd.ActuatorTarget#

基类:object

Methods:

floating_base(value)

joint(value)

link(value)

tendon(value)

static floating_base(value)#
static joint(value)#
static tendon(value)#
class motrixsim.msd.ActuatorType#

基类:object

Methods:

adhesion(value)

general(value)

motor()

position(value)

velocity(value)

static adhesion(value)#
static general(value)#
static motor()#
static position(value)#
static velocity(value)#
class motrixsim.msd.AlphaMode#

基类:object

Methods:

blend()

mask(value)

multiply()

opaque()

static blend()#
static mask(value)#
static multiply()#
static opaque()#
class motrixsim.msd.AmbientLight#

基类:object

Methods:

set_brightness(value)

set_color(value)

Attributes:

set_brightness(value)#
set_color(value)#
brightness#
color#
class motrixsim.msd.AssetSpecs#

基类:object

Methods:

get_hfields()

Returns a copy of hfields.

get_materials()

for user defined materials, the key is the material name for in file materials, the key is the path#material_name Returns a copy of materials.

get_meshes()

Returns a copy of meshes.

get_textures()

Returns a copy of textures.

set_hfields(value)

set_materials(value)

set_meshes(value)

set_skybox(value)

set_textures(value)

Attributes:

skybox

TextureType::Skybox texture doesn't need material element

get_hfields()#

Returns a copy of hfields. Modifications to the returned value do not affect this object; use set_hfields() to apply changes.

get_materials()#

for user defined materials, the key is the material name for in file materials, the key is the path#material_name Returns a copy of materials. Modifications to the returned value do not affect this object; use set_materials() to apply changes.

get_meshes()#

Returns a copy of meshes. Modifications to the returned value do not affect this object; use set_meshes() to apply changes.

get_textures()#

Returns a copy of textures. Modifications to the returned value do not affect this object; use set_textures() to apply changes.

set_hfields(value)#
set_materials(value)#
set_meshes(value)#
set_skybox(value)#
set_textures(value)#
skybox#

TextureType::Skybox texture doesn't need material element

class motrixsim.msd.BiasType#

基类:object

Attributes:

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

基类:object

Methods:

set_free(value)

set_link(value)

set_mocap(value)

Attributes:

free

If assigned, the body will be treated as a free body and the joints of the base link will be ignored.

link

The base link of the body.

mocap

Whether this is a mocap body.

set_free(value)#
set_mocap(value)#
free#

If assigned, the body will be treated as a free body and the joints of the base link will be ignored.

The base link of the body.

mocap#

Whether this is a mocap body. only work when the body is fixed type

class motrixsim.msd.BuildinAttr#

基类:object

Methods:

set_height(value)

set_mark(value)

set_markrgb(value)

set_rgb1(value)

set_rgb2(value)

set_width(value)

Attributes:

set_height(value)#
set_mark(value)#
set_markrgb(value)#
set_rgb1(value)#
set_rgb2(value)#
set_width(value)#
height#
mark#
markrgb#
rgb1#
rgb2#
width#
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)#

基类:object

Methods:

Attributes:

depth_only

fovy

degrees

name

The name of the camera.

orientation

The local orientation of the camera.

orthographic

position

The local position of the camera.

position_track

rotation_track

track_position_speed

The speed of the camera to reach the target position.

track_rotation_speed

The speed of the camera to reach the target orientation.

track_target

The track target name.

zfar

The far clipping plane distance.

znear

The near clipping plane distance.

set_depth_only(value)#
set_fovy(value)#
set_name(value)#
set_orientation(value)#
set_orthographic(value)#
set_position(value)#
set_position_track(value)#
set_rotation_track(value)#
set_track_position_speed(value)#
set_track_rotation_speed(value)#
set_track_target(value)#
set_zfar(value)#
set_znear(value)#
depth_only#
fovy#

degrees

name#

The name of the camera.

orientation#

The local orientation of the camera.

orthographic#
position#

The local position of the camera.

position_track#
rotation_track#
track_position_speed#

The speed of the camera to reach the target position. 0 means no speed limit.

track_rotation_speed#

The speed of the camera to reach the target orientation. 0 means no speed limit.

track_target#

The track target name. Currently only used for RotationTrack::LookAtLink.

zfar#

The far clipping plane distance. If 0, it will be computed from global config automatically.

znear#

The near clipping plane distance. If 0, it will be computed from global config automatically.

class motrixsim.msd.CollisionIgnores#

基类:object

Methods:

get_link_pairs()

The link name pairs that should be ignored in collision detection.

set_link_pairs(value)

The link name pairs that should be ignored in collision detection. Returns a copy of link_pairs. Modifications to the returned value do not affect this object; use set_link_pairs() to apply changes.

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.

set_collide_group(value)

set_collide_with(value)

Attributes:

collide_group

The collide group of the collider.

collide_with

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.

set_collide_group(value)#
set_collide_with(value)#
collide_group#

The collide group of the collider.

collide_with#

The collide with mask of the collider.

class motrixsim.msd.ColorSpace#

基类:object

Attributes:

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

基类:object

Methods:

set_shape_fit(value)

Attributes:

shape_fit

Fit primitive shapes to mesh's aabb or inertia box when a primitive shape references a mesh.

set_shape_fit(value)#
shape_fit#

Fit primitive shapes to mesh's aabb or inertia box when a primitive shape references a mesh.

class motrixsim.msd.ConnectConstraintType#

基类:object

Methods:

link_anchor(link_a, anchor[, link_b])

site_pair(site_a, site_b)

static site_pair(site_a, site_b)#
class motrixsim.msd.ConstraintForceModel#

基类:object

Methods:

accleration_spring(value)

force_spring(value)

hard(bounciness, erp)

impedance(value)

static accleration_spring(value)#
static force_spring(value)#
static hard(bounciness, erp)#
static impedance(value)#
class motrixsim.msd.ContactMatch#

基类:object

Methods:

geom_pair(value_0, value_1)

link_pair(value_0, value_1)

subtree_pair(value_0, value_1)

static geom_pair(value_0, value_1)#
static subtree_pair(value_0, value_1)#
class motrixsim.msd.ContactSensor#

基类:object

Sensor to report contact information between objects.

Methods:

set_match_(value)

set_max_num(value)

set_name(value)

set_reduce(value)

set_report(value)

Attributes:

match_

Define the contact pair to monitor.

max_num

Maximum number of contacts to record.

name

reduce

How to reduce the contacts

report

Type of contact data to report.

set_match_(value)#
set_max_num(value)#
set_name(value)#
set_reduce(value)#
set_report(value)#
match_#

Define the contact pair to monitor.

max_num#

Maximum number of contacts to record.

name#
reduce#

How to reduce the contacts

report#

Type of contact data to report.

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

Methods:

set_dist(value)

set_force(value)

set_found(value)

set_normal(value)

set_pos(value)

set_tangent(value)

set_torque(value)

Attributes:

set_dist(value)#
set_force(value)#
set_found(value)#
set_normal(value)#
set_pos(value)#
set_tangent(value)#
set_torque(value)#
dist#
force#
found#
normal#
pos#
tangent#
torque#
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.DirectionalLightDesc#

基类:object

Methods:

Attributes:

illuminance

Illuminance in lux (lumens per square meter), representing the amount of light projected onto surfaces by this light source.

set_illuminance(value)#
illuminance#

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.

class motrixsim.msd.DynType#

基类:object

Attributes:

Filter = DynType.Filter#
FilterExact = DynType.FilterExact#
Integrator = DynType.Integrator#
None = DynType.None#
class motrixsim.msd.EqualityConnect#

基类:object

Methods:

set_active(value)

set_connect_type(value)

set_name(value)

set_spring(value)

Attributes:

set_active(value)#
set_connect_type(value)#
set_name(value)#
set_spring(value)#
active#
connect_type#
name#
spring#
class motrixsim.msd.EqualityConstraintSet#

基类:object

Methods:

get_connects()

Returns a copy of connects.

get_joints()

Returns a copy of joints.

get_welds()

Returns a copy of welds.

set_connects(value)

set_joints(value)

set_welds(value)

get_connects()#

Returns a copy of connects. Modifications to the returned value do not affect this object; use set_connects() to apply changes.

get_joints()#

Returns a copy of joints. Modifications to the returned value do not affect this object; use set_joints() to apply changes.

get_welds()#

Returns a copy of welds. Modifications to the returned value do not affect this object; use set_welds() to apply changes.

set_connects(value)#
set_joints(value)#
set_welds(value)#
class motrixsim.msd.EqualityJoint#

基类:object

Methods:

set_active(value)

set_joint_a(value)

set_joint_b(value)

set_name(value)

set_polycoeff(value)

set_spring(value)

Attributes:

set_active(value)#
set_joint_a(value)#
set_joint_b(value)#
set_name(value)#
set_polycoeff(value)#
set_spring(value)#
active#
joint_a#
joint_b#
name#
polycoeff#
spring#
class motrixsim.msd.EqualityWeld#

基类:object

Methods:

set_active(value)

set_name(value)

set_spring(value)

set_weld_type(value)

Attributes:

set_active(value)#
set_name(value)#
set_spring(value)#
set_weld_type(value)#
active#
name#
spring#
weld_type#
class motrixsim.msd.ForceOverride#

基类:object

Methods:

accleration_spring(value)

force_spring(value)

hard(bounciness, erp)

impedance([spring, impedance])

static accleration_spring(value)#
static force_spring(value)#
static hard(bounciness, erp)#
static impedance(spring=None, impedance=None)#
class motrixsim.msd.FrameSensor#

基类:object

Methods:

Attributes:

set_name(value)#
set_object_type(value)#
set_ref_frame(value)#
set_sensor_type(value)#
name#
object_type#
ref_frame#
sensor_type#
class motrixsim.msd.FrameSensorRef#

基类:object

Methods:

local()

object(value)

world()

static local()#
static object(value)#
static world()#
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

Methods:

set_azimuth(value)

set_elevation(value)

set_fovy(value)

set_orthographic(value)

Attributes:

azimuth

initial azimuth around the vertical z-axis in degrees.

elevation

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

fovy

vertical field of view(degrees)

orthographic

uses a perspective(default) projection or an orthographic projection

set_azimuth(value)#
set_elevation(value)#
set_fovy(value)#
set_orthographic(value)#
azimuth#

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.

elevation#

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

fovy#

vertical field of view(degrees)

orthographic#

uses a perspective(default) projection or an orthographic projection

class motrixsim.msd.FreeJoint#

基类:object

Methods:

set_armature(value)

set_friction_loss(value)

set_name(value)

Attributes:

set_armature(value)#
set_friction_loss(value)#
set_name(value)#
armature#
friction_loss#
name#
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

Methods:

set_w(value)

set_z(value)

Attributes:

w

The natural frequency of the spring-damper system.

z

The damping ratio of the spring-damper system.

set_w(value)#
set_z(value)#
w#

The natural frequency of the spring-damper system.

z#

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.

class motrixsim.msd.GainType#

基类:object

Attributes:

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

基类:object

Methods:

get_biasprm()

Returns a copy of biasprm.

get_dynprm()

Returns a copy of dynprm.

get_gainprm()

Returns a copy of gainprm.

set_actearly(value)

set_bias(value)

set_biasprm(value)

set_dynprm(value)

set_dyntype(value)

set_gain(value)

set_gainprm(value)

Attributes:

get_biasprm()#

Returns a copy of biasprm. Modifications to the returned value do not affect this object; use set_biasprm() to apply changes.

get_dynprm()#

Returns a copy of dynprm. Modifications to the returned value do not affect this object; use set_dynprm() to apply changes.

get_gainprm()#

Returns a copy of gainprm. Modifications to the returned value do not affect this object; use set_gainprm() to apply changes.

set_actearly(value)#
set_bias(value)#
set_biasprm(value)#
set_dynprm(value)#
set_dyntype(value)#
set_gain(value)#
set_gainprm(value)#
actearly#
bias#
dyntype#
gain#
class motrixsim.msd.GeomVisualAttrs#

基类:object

Methods:

set_color(value)

set_group(value)

set_material(value)

Attributes:

color

The color of the geometry.

group

By default, groups 0, 1 and 2 are visible, while all other groups are invisible.

material

The render material name that used to get actual material data from Assets

set_color(value)#
set_group(value)#
set_material(value)#
color#

The color of the geometry.

group#

By default, groups 0, 1 and 2 are visible, while all other groups are invisible. The max group is 7. See MAX_GROUP_SIZE.

material#

The render material name that used to get actual material data from Assets

class motrixsim.msd.Geometry#

基类:object

Methods:

set_collision_mask(value)

set_gap(value)

set_hfield(value)

set_margin(value)

set_mass(value)

set_mesh(value)

set_mesh_scale(value)

set_name(value)

set_orientation(value)

set_physics_material(value)

set_position(value)

set_priority(value)

set_shape(value)

set_size(value)

set_visual(value)

Attributes:

collision_mask

gap

hfield

margin

Margin and gap control the distance threshold of contact constraint.

mass

The mass of the geometry.

mesh

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

scale mesh to geom

name

orientation

physics_material

position

priority

The priority of the geometry.

shape

size

The size of the geometry.

visual

set_collision_mask(value)#
set_gap(value)#
set_hfield(value)#
set_margin(value)#
set_mass(value)#
set_mesh(value)#
set_mesh_scale(value)#
set_name(value)#
set_orientation(value)#
set_physics_material(value)#
set_position(value)#
set_priority(value)#
set_shape(value)#
set_size(value)#
set_visual(value)#
collision_mask#
gap#
hfield#
margin#

Margin and gap control the distance threshold of contact constraint.

mass#

The mass of the geometry. If not specified, computed from density * volume automatically.

mesh#

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#

scale mesh to geom

name#
orientation#
physics_material#
position#
priority#

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

shape#
size#

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.

visual#
class motrixsim.msd.HFieldSource#

基类:object

attention : the height values here (in source_type.buffer.hfield) is real value.

Methods:

set_height_scale(value)

set_ncol(value)

set_nrow(value)

set_size(value)

set_source_type(value)

Attributes:

height_scale

ncol

the number of columns

nrow

the number of rows

size

source_type

set_height_scale(value)#
set_ncol(value)#
set_nrow(value)#
set_size(value)#
set_source_type(value)#
height_scale#
ncol#

the number of columns

nrow#

the number of rows

size#
source_type#
class motrixsim.msd.HFieldSourceType#

基类:object

Methods:

buffer(hfield, name)

path(path[, content_type])

static buffer(hfield, name)#
static path(path, content_type=None)#
class motrixsim.msd.HeadLight#

基类:object

There's always a head light for every camera.

Methods:

Attributes:

set_color(value)#
set_luminous_power(value)#
color#
luminous_power#
class motrixsim.msd.Hierarchy#

基类:object

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

Methods:

get_bodies()

All multibodies in the world.

get_cameras()

Static cameras under the world.

get_geoms()

Static geometries under the world.

get_lights()

Static lights under the world.

get_sites()

Static sites under the world.

set_bodies(value)

set_cameras(value)

set_geoms(value)

set_lights(value)

set_sites(value)

get_bodies()#

All multibodies in the world. Each element represents the base link of a multibody. Returns a copy of bodies. Modifications to the returned value do not affect this object; use set_bodies() to apply changes.

get_cameras()#

Static cameras under the world. Returns a copy of cameras. Modifications to the returned value do not affect this object; use set_cameras() to apply changes.

get_geoms()#

Static geometries under the world. Returns a copy of geoms. Modifications to the returned value do not affect this object; use set_geoms() to apply changes.

get_lights()#

Static lights under the world. Returns a copy of lights. Modifications to the returned value do not affect this object; use set_lights() to apply changes.

get_sites()#

Static sites under the world. Returns a copy of sites. Modifications to the returned value do not affect this object; use set_sites() to apply changes.

set_bodies(value)#
set_cameras(value)#
set_geoms(value)#
set_lights(value)#
set_sites(value)#
class motrixsim.msd.Impedance#

基类:object

The impedance model same with mujoco.

# Note

  • dmax < d0 is allowed.

Methods:

set_d0(value)

set_dmax(value)

set_middle(value)

set_power(value)

set_width(value)

Attributes:

set_d0(value)#
set_dmax(value)#
set_middle(value)#
set_power(value)#
set_width(value)#
d0#
dmax#
middle#
power#
width#
class motrixsim.msd.ImpedanceSpring#

基类:object

Combination of spring-damper with impedance model.

Methods:

set_impedance(value)

set_spring(value)

Attributes:

set_impedance(value)#
set_spring(value)#
impedance#
spring#
class motrixsim.msd.Inertia#

基类:object

Methods:

set_diag_inertia(value)

set_mass(value)

set_orientation(value)

set_pos(value)

Attributes:

set_diag_inertia(value)#
set_mass(value)#
set_orientation(value)#
set_pos(value)#
diag_inertia#
mass#
orientation#
pos#
class motrixsim.msd.IntegratorMethod#

基类:object

Attributes:

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

基类:object

Methods:

Attributes:

actuator_force_limit

The force limit that actuator can apply to the joint.

armature

axis

friction_damping

The data for frictionloss soft constraint, from solreffriction and solimpfriction.

friction_loss

limit_force

The constraint force applied to the joint when it goes beyond the limits.

margin

The distance threshold below which limits become active.

name

The name of the joint connecting this link to the parent body.

pos

The joint position of attached body in the body coordinate frame.

pos_limit

The position limit range of the joint.

ref_

The initial position or angle of the joint, only used for slide and hinge joints.

spring_damper

type_

set_actuator_force_limit(value)#
set_armature(value)#
set_axis(value)#
set_friction_damping(value)#
set_friction_loss(value)#
set_limit_force(value)#
set_margin(value)#
set_name(value)#
set_pos(value)#
set_pos_limit(value)#
set_ref_(value)#
set_spring_damper(value)#
set_type_(value)#
actuator_force_limit#

The force limit that actuator can apply to the joint.

armature#
axis#
friction_damping#

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.

friction_loss#
limit_force#

The constraint force applied to the joint when it goes beyond the limits.

margin#

The distance threshold below which limits become active.

name#

The name of the joint connecting this link to the parent body. Needed for actuators.

pos#

The joint position of attached body in the body coordinate frame.

pos_limit#

The position limit range of the joint.

ref_#

The initial position or angle of the joint, only used for slide and hinge joints.

spring_damper#
type_#
class motrixsim.msd.JointSensor#

基类:object

Methods:

set_joint(value)

set_name(value)

set_type_(value)

Attributes:

set_joint(value)#
set_name(value)#
set_type_(value)#
joint#
name#
type_#
class motrixsim.msd.JointSensorType#

基类:object

Attributes:

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

基类:object

Methods:

get_joints()

Returns a copy of joints.

set_friction_damping(value)

set_frictionloss(value)

set_joints(value)

set_limit(value)

set_limit_force(value)

set_name(value)

set_spring(value)

set_spring_length(value)

Attributes:

friction_damping

The data for frictionloss soft constraint, from solreffriction and solimpfriction.

frictionloss

limit

limit_force

name

spring

The spring for the tendon.

spring_length

The rest length of the tendon spring.

get_joints()#

Returns a copy of joints. Modifications to the returned value do not affect this object; use set_joints() to apply changes.

set_friction_damping(value)#
set_frictionloss(value)#
set_joints(value)#
set_limit(value)#
set_limit_force(value)#
set_name(value)#
set_spring(value)#
set_spring_length(value)#
friction_damping#

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.

frictionloss#
limit#
limit_force#
name#
spring#

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.

spring_length#

The rest length of the tendon spring. Only used when spring is Some.

class motrixsim.msd.JointTendonNode#

基类:object

Methods:

set_joint_name(value)

set_weight(value)

Attributes:

set_joint_name(value)#
set_weight(value)#
joint_name#
weight#
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

Methods:

get_ctrl()

Returns a copy of ctrl.

get_dof_pos()

Returns a copy of dof_pos.

get_dof_vel()

Returns a copy of dof_vel.

set_ctrl(value)

set_dof_pos(value)

set_dof_vel(value)

set_name(value)

set_time(value)

Attributes:

name

time

simulation time

get_ctrl()#

Returns a copy of ctrl. Modifications to the returned value do not affect this object; use set_ctrl() to apply changes.

get_dof_pos()#

Returns a copy of dof_pos. Modifications to the returned value do not affect this object; use set_dof_pos() to apply changes.

get_dof_vel()#

Returns a copy of dof_vel. Modifications to the returned value do not affect this object; use set_dof_vel() to apply changes.

set_ctrl(value)#
set_dof_pos(value)#
set_dof_vel(value)#
set_name(value)#
set_time(value)#
name#
time#

simulation time

class motrixsim.msd.Layer#

基类:object

Methods:

set_role(value)

set_texture_name(value)

Attributes:

set_role(value)#
set_texture_name(value)#
role#
texture_name#
class motrixsim.msd.Light#

基类:object

Methods:

set_cast_shadows(value)

set_color(value)

set_direction(value)

set_mode(value)

set_name(value)

set_position(value)

set_type_(value)

Attributes:

cast_shadows

Whether the light casts shadows.

color

The color of the light.

direction

The direction of the light.

mode

name

position

The position of the light.

type_

The type of the light.

set_cast_shadows(value)#
set_color(value)#
set_direction(value)#
set_mode(value)#
set_name(value)#
set_position(value)#
set_type_(value)#
cast_shadows#

Whether the light casts shadows.

color#

The color of the light.

direction#

The direction of the light. Fallback to [0,0,-1] if all zeros.

mode#
name#
position#

The position of the light.

type_#

The type of the light.

class motrixsim.msd.LightType#

基类:object

Methods:

directional(value)

point(value)

spot(value)

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

基类:object

Methods:

get_cameras()

The cameras attached to this link.

get_children()

Returns a copy of children.

get_geoms()

The geometries attached to this link.

get_joints()

The joints connecting this link to the parent body.

get_lights()

The lights attached to this link.

get_sites()

The sites attached to this link.

set_cameras(value)

set_children(value)

set_disable_self_collision(value)

set_geoms(value)

set_gravcomp(value)

set_inertial(value)

set_joints(value)

set_lights(value)

set_local_rotation(value)

set_local_translation(value)

set_name(value)

set_sites(value)

Attributes:

disable_self_collision

Disable self collision for this link and its descendants.

gravcomp

Gravity compensation, a value of 1 creates a force counter to the body’s gravity.

inertial

The link's inertia in the parent frame.

local_rotation

local_translation

The link's translation in the parent frame.

name

name of the link.

get_cameras()#

The cameras attached to this link. Returns a copy of cameras. Modifications to the returned value do not affect this object; use set_cameras() to apply changes.

get_children()#

Returns a copy of children. Modifications to the returned value do not affect this object; use set_children() to apply changes.

get_geoms()#

The geometries attached to this link. Returns a copy of geoms. Modifications to the returned value do not affect this object; use set_geoms() to apply changes.

get_joints()#

The joints connecting this link to the parent body. If empty, the link is fixed to the parent.

备注

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

Returns a copy of joints. Modifications to the returned value do not affect this object; use set_joints() to apply changes.

get_lights()#

The lights attached to this link. Returns a copy of lights. Modifications to the returned value do not affect this object; use set_lights() to apply changes.

get_sites()#

The sites attached to this link. Returns a copy of sites. Modifications to the returned value do not affect this object; use set_sites() to apply changes.

set_cameras(value)#
set_children(value)#
set_disable_self_collision(value)#
set_geoms(value)#
set_gravcomp(value)#
set_inertial(value)#
set_joints(value)#
set_lights(value)#
set_local_rotation(value)#
set_local_translation(value)#
set_name(value)#
set_sites(value)#
disable_self_collision#

Disable self collision for this link and its descendants. If false, it should inherit from parent or enable if root link.

gravcomp#

Gravity compensation, a value of 1 creates a force counter to the body’s gravity.

inertial#

The link's inertia in the parent frame. None fields will be computed automatically.

local_rotation#
local_translation#

The link's translation in the parent frame.

name#

name of the link.

class motrixsim.msd.Mark#

基类:object

Attributes:

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

基类:object

Methods:

Attributes:

get_layers()#

Returns a copy of layers. Modifications to the returned value do not affect this object; use set_layers() to apply changes.

set_alpha_mode(value)#
set_both_side(value)#
set_color(value)#
set_depth_bias(value)#
set_detail_repeat(value)#
set_detail_strength(value)#
set_emissive(value)#
set_emissive_intensity(value)#
set_flip_tangent_u(value)#
set_flip_tangent_v(value)#
set_ior(value)#
set_layers(value)#
set_metallic(value)#
set_name(value)#
set_reflectance(value)#
set_roughness(value)#
set_specular_color(value)#
set_tex_origin(value)#
set_tex_repeat(value)#
set_tex_translation(value)#
set_tex_uniform(value)#
set_texture_name(value)#
set_transmisive(value)#
alpha_mode#
both_side#
color#
depth_bias#
detail_repeat#
detail_strength#
emissive#

Linear RGB emissive color

emissive_intensity#
flip_tangent_u#
flip_tangent_v#
ior#
metallic#
name#

Global identifier name, if from file, file name is prefixed.

reflectance#
roughness#
specular_color#
tex_origin#
tex_repeat#
tex_translation#
tex_uniform#
texture_name#
transmisive#
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)

Methods:

set_name(value)

set_normal(value)

set_tangents(value)

set_texcoord(value)

set_triangles(value)

set_vertices(value)

Attributes:

name

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

normal

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

tangents

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

texcoord

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

triangle_count

Number of triangles in the mesh.

triangles

Triangle index buffer.

vertex_count

Number of vertices in the mesh.

vertices

Vertex positions as (N, 3) array.

set_name(value)#
set_normal(value)#
set_tangents(value)#
set_texcoord(value)#
set_triangles(value)#
set_vertices(value)#
name#

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

normal#

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

tangents#

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

texcoord#

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

triangle_count#

Number of triangles in the mesh.

triangles#

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

vertex_count#

Number of vertices in the mesh.

vertices#

Vertex positions as (N, 3) array.

class motrixsim.msd.MeshSource#

基类:object

Methods:

buffer(data)

path(path[, transform, using_meshes])

static buffer(data)#
static path(path, transform=None, using_meshes=None)#
class motrixsim.msd.MeshTransform#

基类:object

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

Methods:

set_position(value)

set_rotation(value)

set_scale(value)

Attributes:

set_position(value)#
set_rotation(value)#
set_scale(value)#
position#
rotation#
scale#
class motrixsim.msd.ObjectType#

基类:object

Methods:

geom(value)

link(value)

link_inertia(value)

site(value)

static geom(value)#
static site(value)#
class motrixsim.msd.PhysicsMaterial#

基类:object

Methods:

Attributes:

condim

The condim of the material.

contact_model

The contact force model

density

The density of the material.

force_mix

The contact force mixing factor for the material.

friction

The friction of the material including slide, spin, roll.

set_condim(value)#
set_contact_model(value)#
set_density(value)#
set_force_mix(value)#
set_friction(value)#
condim#

The condim of the material.

contact_model#

The contact force model

density#

The density of the material.

force_mix#

The contact force mixing factor for the material. When combine two force models, higher mixing factor will get more weight.

friction#

The friction of the material including slide, spin, roll.

class motrixsim.msd.PointLightDesc#

基类:object

Methods:

Attributes:

intensity

Luminous power in lumens, representing the amount of light emitted by this source in all directions.

radius

Simulates a light source coming from a spherical volume with the given radius.

range

Cut-off for the light's area-of-effect.

shadow_map_near_z

The distance from the light to near Z plane in the shadow map.

set_intensity(value)#
set_radius(value)#
set_range(value)#
set_shadow_map_near_z(value)#
intensity#

Luminous power in lumens, representing the amount of light emitted by this source in all directions.

radius#

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.

range#

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.

shadow_map_near_z#

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.

class motrixsim.msd.PositionParam#

基类:object

The special parameters of position actuator.

Methods:

set_kp(value)

set_kv(value)

set_timeconst(value)

Attributes:

set_kp(value)#
set_kv(value)#
set_timeconst(value)#
kp#
kv#
timeconst#
class motrixsim.msd.PositionTrack#

基类:object

Attributes:

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

基类:object

Methods:

set_position(value)

set_scale(value)

set_texture(value)

Attributes:

set_position(value)#
set_scale(value)#
set_texture(value)#
position#
scale#
texture#
class motrixsim.msd.Range(lower=Ellipsis, upper=Ellipsis)#

基类:object

class motrixsim.msd.RotationTrack#

基类:object

Attributes:

FixedLocal = RotationTrack.FixedLocal#
FixedWorld = RotationTrack.FixedWorld#
Free = RotationTrack.Free#
class motrixsim.msd.Scene(world, path=None)#

基类:object

A builder for combining and building MSD models.

This class provides a simple API for combining multiple models together using attach, then building the final simulation model.

Example:

import motrixsim as mx

# Load and build directly
model = mx.from_file("robot.xml").build()

# Attach another model with transformations
robot = mx.from_file("robot.xml")
gripper = mx.from_file("gripper.xml")
robot.attach(
    gripper,
    self_link_name="hand",
    other_prefix="gripper_",
    other_translation=[0.1, 0, 0]
)
model = robot.build()

# Combine multiple instances of the same model (other is cloned internally)
scene = mx.from_file("scene.xml")
robot = mx.from_file("robot.xml")
scene.attach(robot, other_prefix="robot1_", other_translation=[1, 0, 0])
scene.attach(robot, other_prefix="robot2_", other_translation=[2, 0, 0])
model = scene.build()

Methods:

add_camera(camera)

Add a camera to the scene.

attach(other[, self_link_name, ...])

Attach another model to this one.

build()

Build this Scene into a SceneModel ready for simulation.

deepcopy()

Deepcopy this Scene.

Attributes:

world

Get the World object of this Scene.

add_camera(camera)#

Add a camera to the scene.

This method adds a camera to the scene hierarchy. Cameras added through this method will be available in the built model's camera manager.

参数:

camera (Camera) -- The camera to add to the scene.

备注

Multiple cameras can be added by calling this method multiple times.

attach(other, self_link_name=None, other_link_name=None, other_translation=None, other_rotation=None, other_prefix=None, other_suffix=None)#

Attach another model to this one.

This method merges another Scene into this one. The other model can be optionally attached to a specific link, transformed, and have its names prefixed/suffixed to avoid conflicts.

备注

The other model is cloned internally, so it can be reused for multiple attach calls.

参数:
  • other (Scene) -- The model to attach (cloned internally).

  • self_link_name (str, optional) -- Link in this model to attach to. If None, the other model is merged at the root level.

  • other_link_name (str, optional) -- Extract only this subtree from the other model before attaching.

  • other_translation (list[float], optional) -- Translation [x, y, z] to apply to the other model.

  • other_rotation (list[float], optional) -- Rotation quaternion [x, y, z, w] to apply to the other model.

  • other_prefix (str, optional) -- Prefix to add to all names in the other model.

  • other_suffix (str, optional) -- Suffix to add to all names in the other model.

抛出:

RuntimeError -- If the link is not found or if there are duplicate names.

Example:

robot = mx.from_file("robot.xml")
gripper = mx.from_file("gripper.xml")

# Attach gripper to robot's hand link with prefix
robot.attach(
    gripper,
    self_link_name="hand",
    other_prefix="gripper_",
    other_translation=[0.05, 0, 0]
)

# gripper can be reused
robot.attach(gripper, self_link_name="other_hand", other_prefix="gripper2_")

model = robot.build()
build()#

Build this Scene into a SceneModel ready for simulation.

This consumes the Scene's internal data. The Scene should not be reused after calling this method.

返回:

The compiled simulation model.

返回类型:

SceneModel

抛出:

RuntimeError -- If the build fails.

Example:

# Simple build
model = mx.from_file("robot.xml").build()

# Build after attaching models
robot = mx.from_file("robot.xml")
gripper = mx.from_file("gripper.xml")
robot.attach(gripper, self_link_name="hand", other_prefix="gripper_")
model = robot.build()

data = mx.SceneData(model)
deepcopy()#

Deepcopy this Scene.

返回:

A deep copy of this instance.

返回类型:

Scene

world#

Get the World object of this Scene.

返回:

The World object (shared reference, not a copy).

返回类型:

World

class motrixsim.msd.SceneStatistic#

基类:object

Methods:

set_center(value)

set_extent(value)

Attributes:

center

extent box center

extent

half the side of the bounding box of the initial model.

set_center(value)#
set_extent(value)#
center#

extent box center

extent#

half the side of the bounding box of the initial model.

class motrixsim.msd.SensorSet#

基类:object

Methods:

get_contact()

Returns a copy of contact.

get_frame()

Returns a copy of frame.

get_joint()

Returns a copy of joint.

get_subtree()

Returns a copy of subtree.

get_touch()

Returns a copy of touch.

set_contact(value)

set_frame(value)

set_joint(value)

set_subtree(value)

set_touch(value)

get_contact()#

Returns a copy of contact. Modifications to the returned value do not affect this object; use set_contact() to apply changes.

get_frame()#

Returns a copy of frame. Modifications to the returned value do not affect this object; use set_frame() to apply changes.

get_joint()#

Returns a copy of joint. Modifications to the returned value do not affect this object; use set_joint() to apply changes.

get_subtree()#

Returns a copy of subtree. Modifications to the returned value do not affect this object; use set_subtree() to apply changes.

get_touch()#

Returns a copy of touch. Modifications to the returned value do not affect this object; use set_touch() to apply changes.

set_contact(value)#
set_frame(value)#
set_joint(value)#
set_subtree(value)#
set_touch(value)#
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

Methods:

Attributes:

constraint_solver_iterations

The maximum number of iterations for iterative constraint solvers.

constraint_solver_tolerance

The tolerance for iterative constraint solvers.

convex_strategy

The strategy to use for convex hull generation.

disable_actuators

disable_constraints

Whether to disable all constraints.

disable_contacts

disable_damping

disable_equality

disable_frictionloss

disable_gravity

disable_limit

friction_model

gravity

The gravity of the simulation.

override_contact_force

override_contact_margin

If specified, all margin values for contacts will be overridden by this value.

override_friction

If specified, all friction coefficients for contacts will be overridden by this value.

safty_damping_clamp

If true, the solver will automatically clamp damping coefficients to make spring damper system stable.

solver_type

timestep

The simulation time step in seconds.

set_constraint_solver_iterations(value)#
set_constraint_solver_tolerance(value)#
set_convex_strategy(value)#
set_disable_actuators(value)#
set_disable_constraints(value)#
set_disable_contacts(value)#
set_disable_damping(value)#
set_disable_equality(value)#
set_disable_frictionloss(value)#
set_disable_gravity(value)#
set_disable_limit(value)#
set_friction_model(value)#
set_gravity(value)#
set_override_contact_force(value)#
set_override_contact_margin(value)#
set_override_friction(value)#
set_safty_damping_clamp(value)#
set_solver_type(value)#
set_timestep(value)#
constraint_solver_iterations#

The maximum number of iterations for iterative constraint solvers.

constraint_solver_tolerance#

The tolerance for iterative constraint solvers. When residual is less than tolerance, the solver stops.

convex_strategy#

The strategy to use for convex hull generation.

disable_actuators#
disable_constraints#

Whether to disable all constraints.

disable_contacts#
disable_damping#
disable_equality#
disable_frictionloss#
disable_gravity#
disable_limit#
friction_model#
gravity#

The gravity of the simulation.

override_contact_force#
override_contact_margin#

If specified, all margin values for contacts will be overridden by this value.

override_friction#

If specified, all friction coefficients for contacts will be overridden by this value.

safty_damping_clamp#

If true, the solver will automatically clamp damping coefficients to make spring damper system stable. This works for pos limit constraints(contact & joint pos)

solver_type#
timestep#

The simulation time step in seconds.

class motrixsim.msd.Site#

基类:object

Methods:

set_from_to(value)

set_group(value)

set_material(value)

set_name(value)

set_orientation(value)

set_position(value)

set_rgba(value)

set_shape(value)

set_size(value)

Attributes:

from_to

implement 'from_to' for site

group

The visual group of the site.

material

The material of the site.

name

orientation

position

rgba

The color of the site.

shape

size

The size of the site.

set_from_to(value)#
set_group(value)#
set_material(value)#
set_name(value)#
set_orientation(value)#
set_position(value)#
set_rgba(value)#
set_shape(value)#
set_size(value)#
from_to#

implement 'from_to' for site

Type:

TODO

group#

The visual group of the site.

material#

The material of the site.

name#
orientation#
position#
rgba#

The color of the site.

shape#
size#

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

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

Methods:

Attributes:

inner_angle

The inner angle of the spot light in degrees.

intensity

Luminous power in lumens, representing the amount of light emitted by this source in all directions.

outer_angle

The outer angle of the spot light in degrees.

range

Range in meters that this light illuminates.

shadow_map_near_z

The distance from the light to the near Z plane in the shadow map.

set_inner_angle(value)#
set_intensity(value)#
set_outer_angle(value)#
set_range(value)#
set_shadow_map_near_z(value)#
inner_angle#

The inner angle of the spot light in degrees.

intensity#

Luminous power in lumens, representing the amount of light emitted by this source in all directions.

outer_angle#

The outer angle of the spot light in degrees.

range#

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.

shadow_map_near_z#

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.

class motrixsim.msd.SpringDampCoeff#

基类:object

Methods:

static frequency_damping_ratio(value)#
static stiffness_damping(value)#
class motrixsim.msd.SpringDamper#

基类:object

Define a spring-damper system.

Methods:

set_coeff(value)

set_target_pos(value)

Attributes:

set_coeff(value)#
set_target_pos(value)#
coeff#
target_pos#
class motrixsim.msd.SpringLengthType#

基类:object

Methods:

automatic()

fixed(value)

range(value)

static automatic()#
static fixed(value)#
static range(value)#
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.

Methods:

set_d(value)

set_k(value)

Attributes:

d

The damping coefficient of the damper.

k

The stiffness of the spring.

set_d(value)#
set_k(value)#
d#

The damping coefficient of the damper.

k#

The stiffness of the spring.

class motrixsim.msd.SubtreeSensor#

基类:object

Methods:

set_link(value)

set_name(value)

set_type_(value)

Attributes:

set_name(value)#
set_type_(value)#
name#
type_#
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

Methods:

get_grid_layout()

Returns a copy of grid_layout.

set_color_space(value)

set_gen_mipmaps(value)

set_grid_layout(value)

set_grid_size(value)

set_name(value)

set_source(value)

set_type_(value)

Attributes:

get_grid_layout()#

Returns a copy of grid_layout. Modifications to the returned value do not affect this object; use set_grid_layout() to apply changes.

set_color_space(value)#
set_gen_mipmaps(value)#
set_grid_layout(value)#
set_grid_size(value)#
set_name(value)#
set_source(value)#
set_type_(value)#
color_space#
gen_mipmaps#
grid_size#
name#
source#
type_#
class motrixsim.msd.TextureSource#

基类:object

Methods:

checker(value)

file(value)

flat(value)

gradient(value)

static checker(value)#
static file(value)#
static flat(value)#
static gradient(value)#
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

Methods:

set_method(value)

Attributes:

set_method(value)#
method#
class motrixsim.msd.ToneMappingMethod#

基类:object

Attributes:

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

基类:object

Methods:

set_name(value)

set_site(value)

Attributes:

set_name(value)#
set_site(value)#
name#
site#
class motrixsim.msd.TrackMode#

基类:object

Methods:

fixed()

target_body(value)

track()

static fixed()#
static target_body(value)#
static track()#
class motrixsim.msd.Visual#

基类:object

Methods:

get_probes()

Returns a copy of probes.

set_ambient_light(value)

set_bv_color(value)

set_contact_force_color(value)

set_disable_near_clip(value)

set_env_map_intensity(value)

set_fog_color(value)

set_fog_end(value)

set_fog_start(value)

set_haze(value)

set_head_light(value)

set_joint_color(value)

set_no_frustum_cull(value)

set_oit(value)

set_probes(value)

set_ssao(value)

set_tonemapping(value)

set_z_far(value)

set_z_near(value)

Attributes:

ambient_light

bv_color

bounding volume color

contact_force_color

contact force color

disable_near_clip

When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.

env_map_intensity

fog_color

fog_end

fog_start

haze

head_light

joint_color

joint color

no_frustum_cull

Disable frustum culling for all visual meshes.

oit

Enables Order Independent Transparency.

ssao

Enables Screen Space Ambient Occlusion.

tonemapping

z_far

z_near

get_probes()#

Returns a copy of probes. Modifications to the returned value do not affect this object; use set_probes() to apply changes.

set_ambient_light(value)#
set_bv_color(value)#
set_contact_force_color(value)#
set_disable_near_clip(value)#
set_env_map_intensity(value)#
set_fog_color(value)#
set_fog_end(value)#
set_fog_start(value)#
set_haze(value)#
set_head_light(value)#
set_joint_color(value)#
set_no_frustum_cull(value)#
set_oit(value)#
set_probes(value)#
set_ssao(value)#
set_tonemapping(value)#
set_z_far(value)#
set_z_near(value)#
ambient_light#
bv_color#

bounding volume color

contact_force_color#

contact force color

disable_near_clip#

When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.

env_map_intensity#
fog_color#
fog_end#
fog_start#
haze#
head_light#
joint_color#

joint color

no_frustum_cull#

Disable frustum culling for all visual meshes.

oit#

Enables Order Independent Transparency.

ssao#

Enables Screen Space Ambient Occlusion.

tonemapping#
z_far#
z_near#
class motrixsim.msd.WeldConstraintType#

基类:object

Methods:

link_anchor(link_a, anchor, torque_scale[, ...])

site_pair(site_a, site_b, torque_scale)

static site_pair(site_a, site_b, torque_scale)#
class motrixsim.msd.World#

基类:object

Methods:

get_actuators()

Returns a copy of actuators.

get_joint_tendons()

The tendons that constrain joints.

get_keyframes()

Returns a copy of keyframes.

set_actuators(value)

set_assets(value)

set_collision_ignores(value)

set_compile_options(value)

set_equality_constraint_set(value)

set_free_camera(value)

set_hierarchy(value)

set_joint_tendons(value)

set_keyframes(value)

set_name(value)

set_sensors(value)

set_simulate_option(value)

set_statistic(value)

set_visual(value)

Attributes:

assets

collision_ignores

compile_options

equality_constraint_set

The equality constraints that should be satisfied by the articulated bodies.

free_camera

hierarchy

name

sensors

simulate_option

statistic

visual

get_actuators()#

Returns a copy of actuators. Modifications to the returned value do not affect this object; use set_actuators() to apply changes.

get_joint_tendons()#

The tendons that constrain joints. Currently only work for multibody joints. Returns a copy of joint_tendons. Modifications to the returned value do not affect this object; use set_joint_tendons() to apply changes.

get_keyframes()#

Returns a copy of keyframes. Modifications to the returned value do not affect this object; use set_keyframes() to apply changes.

set_actuators(value)#
set_assets(value)#
set_collision_ignores(value)#
set_compile_options(value)#
set_equality_constraint_set(value)#
set_free_camera(value)#
set_hierarchy(value)#
set_joint_tendons(value)#
set_keyframes(value)#
set_name(value)#
set_sensors(value)#
set_simulate_option(value)#
set_statistic(value)#
set_visual(value)#
assets#
collision_ignores#
compile_options#
equality_constraint_set#

The equality constraints that should be satisfied by the articulated bodies.

free_camera#
hierarchy#
name#
sensors#
simulate_option#
statistic#
visual#
motrixsim.msd.from_file(path)#

Load a model file and return an Scene for transformation and building.

参数:

path (str) -- Path to the model file (MJCF, URDF, or MSD format).

返回:

An instance ready for transformation and building.

返回类型:

Scene

motrixsim.msd.from_msgpack(data, base_path)#

Load MSD from MessagePack binary data.

This is more efficient than JSON for large models.

参数:
  • data (bytes) -- MessagePack binary data.

  • base_path (str) -- Base path for resolving relative asset paths.

返回:

An instance ready for transformation and building.

返回类型:

Scene

motrixsim.msd.from_str(string, format='mjcf', base_path=None)#

Load string and return an Scene 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".

  • base_path (str, optional) -- Base path for resolving relative asset paths. Required for MSD format to resolve texture and mesh paths.

返回:

An instance ready for transformation and building.

返回类型:

Scene