motrixsim.msd#
Classes:
|
|
|
|
|
|
Collision mask for a collider. |
|
Sensor to report contact information between objects. |
|
Type of contact data to report. |
|
Strategy for convex hull generation. |
|
Spring-damper parameters using natural frequency and damping ratio. |
|
|
|
attention : the height values here (in source_type.buffer.hfield) is real value. |
|
There's always a head light for every camera. |
|
The scene hierarchy, including all bodies, geoms, lights, cameras and sites. |
|
The impedance model same with mujoco. |
|
Combination of spring-damper with impedance model. |
|
|
|
|
|
The type of joint connecting two links. |
|
|
|
|
|
|
|
|
|
|
|
|
Mesh data with vertex attributes. |
From mesh to geom, subtract position and inverse rotation to geom local |
|
The special parameters of position actuator. |
|
|
|
|
|
|
A builder for combining and building MSD models. |
When a primitive shape references a mesh, a geometric primitive of that type is fitted to the mesh. |
|
|
|
Define a spring-damper system. |
|
Spring-damper parameters using stiffness and damping coefficients. |
|
|
|
|
|
|
Functions:
|
Load a model file and return an Scene for transformation and building. |
|
Load MSD from MessagePack binary data. |
|
Load string and return an Scene for transformation and building. |
- class motrixsim.msd.Actuator#
基类:
objectMethods:
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#
基类:
objectMethods:
floating_base(value)joint(value)link(value)tendon(value)- static floating_base(value)#
- static joint(value)#
- static link(value)#
- static tendon(value)#
- class motrixsim.msd.ActuatorType#
基类:
objectMethods:
- static adhesion(value)#
- static general(value)#
- static motor()#
- static position(value)#
- static velocity(value)#
- class motrixsim.msd.AlphaMode#
基类:
objectMethods:
- static blend()#
- static mask(value)#
- static multiply()#
- static opaque()#
- class motrixsim.msd.AmbientLight#
基类:
objectMethods:
set_brightness(value)set_color(value)Attributes:
- set_brightness(value)#
- set_color(value)#
- brightness#
- color#
- class motrixsim.msd.AssetSpecs#
基类:
objectMethods:
Returns a copy of hfields.
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.
Returns a copy of meshes.
Returns a copy of textures.
set_hfields(value)set_materials(value)set_meshes(value)set_skybox(value)set_textures(value)Attributes:
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.Body#
基类:
objectMethods:
Attributes:
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.
Whether this is a mocap body.
- set_free(value)#
- set_link(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.
- link#
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#
基类:
objectMethods:
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)#
基类:
objectMethods:
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)Attributes:
degrees
The name of the camera.
The local orientation of the camera.
The local position of the camera.
The speed of the camera to reach the target position.
The speed of the camera to reach the target orientation.
The track target name.
The far clipping plane distance.
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#
基类:
objectMethods:
The link name pairs that should be ignored in collision detection.
set_link_pairs(value)- get_link_pairs()#
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.
- set_link_pairs(value)#
- class motrixsim.msd.CollisionMask#
基类:
objectCollision mask for a collider. Used to filter which colliders can collide with each other.
Methods:
Create a CollisionMask that collides with all other colliders.
Create a CollisionMask that does not collide with anything.
set_collide_group(value)set_collide_with(value)Attributes:
The collide group of the collider.
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#
基类:
objectAttributes:
- Linear = ColorSpace.Linear#
- Srgb = ColorSpace.Srgb#
- class motrixsim.msd.CompileOptions#
基类:
objectMethods:
set_shape_fit(value)Attributes:
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#
基类:
objectMethods:
link_anchor(link_a, anchor[, link_b])site_pair(site_a, site_b)- static link_anchor(link_a, anchor, link_b=None)#
- static site_pair(site_a, site_b)#
- class motrixsim.msd.ConstraintForceModel#
基类:
objectMethods:
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#
基类:
objectMethods:
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 link_pair(value_0, value_1)#
- static subtree_pair(value_0, value_1)#
- class motrixsim.msd.ContactSensor#
基类:
objectSensor to report contact information between objects.
Methods:
set_match_(value)set_max_num(value)set_name(value)set_reduce(value)set_report(value)Attributes:
Define the contact pair to monitor.
Maximum number of contacts to record.
How to reduce the contacts
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#
基类:
objectAttributes:
- MaxForce = ContactSensorReduce.MaxForce#
- MinDist = ContactSensorReduce.MinDist#
- NetForce = ContactSensorReduce.NetForce#
- None = ContactSensorReduce.None#
- class motrixsim.msd.ContactSensorReport#
基类:
objectType of contact data to report. If multiple fields are requested, they are reported in the order:found(1)/force(3)/torque(3)/dist(1)/pos(3)/normal(3)/tangent(3).
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#
基类:
objectStrategy for convex hull generation.
# Key Features -
QuickConvex: Fast approximation algorithm (default) -QHull: Exact algorithm (only available if phys-collision has qhull feature)Attributes:
- QHull = ConvexStrategy.QHull#
- QuickConvex = ConvexStrategy.QuickConvex#
- class motrixsim.msd.DirectionalLightDesc#
基类:
objectMethods:
set_illuminance(value)Attributes:
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#
基类:
objectAttributes:
- Filter = DynType.Filter#
- FilterExact = DynType.FilterExact#
- Integrator = DynType.Integrator#
- None = DynType.None#
- class motrixsim.msd.EqualityConnect#
基类:
objectMethods:
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#
基类:
objectMethods:
Returns a copy of connects.
Returns a copy of joints.
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#
基类:
objectMethods:
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#
基类:
objectMethods:
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#
基类:
objectMethods:
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#
基类:
objectMethods:
set_name(value)set_object_type(value)set_ref_frame(value)set_sensor_type(value)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#
基类:
objectMethods:
- static local()#
- static object(value)#
- static world()#
- class motrixsim.msd.FrameSensorType#
基类:
objectAttributes:
- FrameAngVel = FrameSensorType.FrameAngVel#
- FrameLinAcc = FrameSensorType.FrameLinAcc#
- FrameLinVel = FrameSensorType.FrameLinVel#
- FramePos = FrameSensorType.FramePos#
- FrameQuat = FrameSensorType.FrameQuat#
- XAxis = FrameSensorType.XAxis#
- YAxis = FrameSensorType.YAxis#
- ZAxis = FrameSensorType.ZAxis#
- class motrixsim.msd.FreeCamera#
基类:
objectMethods:
set_azimuth(value)set_elevation(value)set_fovy(value)set_orthographic(value)Attributes:
initial azimuth around the vertical z-axis in degrees.
initial elevation in degrees, rotation around camera's x-axis, negative correspond to moving the camera up from the horizontal plane
vertical field of view(degrees)
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#
基类:
objectMethods:
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#
基类:
objectSpring-damper parameters using natural frequency and damping ratio.
This is converted to StiffnessDamping internally: - k = w² - d = 2 * w * z
Methods:
Attributes:
The natural frequency of the spring-damper system.
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#
基类:
objectAttributes:
- Affine = GainType.Affine#
- Fixed = GainType.Fixed#
- class motrixsim.msd.GeneralParam#
基类:
objectMethods:
Returns a copy of biasprm.
Returns a copy of dynprm.
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#
基类:
objectMethods:
set_color(value)set_group(value)set_material(value)Attributes:
The color of the geometry.
By default, groups 0, 1 and 2 are visible, while all other groups are invisible.
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#
基类:
objectMethods:
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:
Margin and gap control the distance threshold of contact constraint.
The mass of the geometry.
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.
scale mesh to geom
The priority of the geometry.
The size of the geometry.
- 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#
基类:
objectattention : 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:
the number of columns
the number of rows
- 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#
基类:
objectMethods:
- static buffer(hfield, name)#
- static path(path, content_type=None)#
- class motrixsim.msd.HeadLight#
基类:
objectThere's always a head light for every camera.
Methods:
set_color(value)set_luminous_power(value)Attributes:
- set_color(value)#
- set_luminous_power(value)#
- color#
- luminous_power#
- class motrixsim.msd.Hierarchy#
基类:
objectThe scene hierarchy, including all bodies, geoms, lights, cameras and sites.
Methods:
All multibodies in the world.
Static cameras under the world.
Static geometries under the world.
Static lights under the world.
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#
基类:
objectThe 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#
基类:
objectCombination 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#
基类:
objectMethods:
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#
基类:
objectAttributes:
- Explicit = IntegratorMethod.Explicit#
- Implicit = IntegratorMethod.Implicit#
- ImplicitVelocity = IntegratorMethod.ImplicitVelocity#
- class motrixsim.msd.Joint#
基类:
objectMethods:
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)Attributes:
The force limit that actuator can apply to the joint.
The data for frictionloss soft constraint, from solreffriction and solimpfriction.
The constraint force applied to the joint when it goes beyond the limits.
The distance threshold below which limits become active.
The name of the joint connecting this link to the parent body.
The joint position of attached body in the body coordinate frame.
The position limit range of the joint.
The initial position or angle of the joint, only used for slide and hinge joints.
- 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#
基类:
objectMethods:
Attributes:
- set_joint(value)#
- set_name(value)#
- set_type_(value)#
- joint#
- name#
- type_#
- class motrixsim.msd.JointSensorType#
基类:
objectAttributes:
- JointPos = JointSensorType.JointPos#
- JointVel = JointSensorType.JointVel#
- class motrixsim.msd.JointTendon#
基类:
objectMethods:
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:
The data for frictionloss soft constraint, from solreffriction and solimpfriction.
The spring for the tendon.
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#
基类:
objectMethods:
set_joint_name(value)set_weight(value)Attributes:
- set_joint_name(value)#
- set_weight(value)#
- joint_name#
- weight#
- class motrixsim.msd.JointType#
基类:
objectThe type of joint connecting two links.
Attributes:
- Ball = JointType.Ball#
- Revolute = JointType.Revolute#
- Slide = JointType.Slide#
- class motrixsim.msd.Keyframe#
基类:
objectMethods:
get_ctrl()Returns a copy of ctrl.
Returns a copy of dof_pos.
Returns a copy of dof_vel.
set_ctrl(value)set_dof_pos(value)set_dof_vel(value)set_name(value)set_time(value)Attributes:
- 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#
基类:
objectMethods:
set_role(value)set_texture_name(value)Attributes:
- set_role(value)#
- set_texture_name(value)#
- role#
- texture_name#
- class motrixsim.msd.Light#
基类:
objectMethods:
set_cast_shadows(value)set_color(value)set_direction(value)set_mode(value)set_name(value)set_position(value)set_type_(value)Attributes:
Whether the light casts shadows.
The color of the light.
The direction of the light.
The position of the light.
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#
基类:
objectMethods:
directional(value)point(value)spot(value)- static directional(value)#
- static point(value)#
- static spot(value)#
- class motrixsim.msd.Link#
基类:
objectMethods:
The cameras attached to this link.
Returns a copy of children.
The geometries attached to this link.
The joints connecting this link to the parent body.
The lights attached to this link.
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 for this link and its descendants.
Gravity compensation, a value of 1 creates a force counter to the body’s gravity.
The link's inertia in the parent frame.
The link's translation in the parent frame.
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#
基类:
objectAttributes:
- Cross = Mark.Cross#
- Edge = Mark.Edge#
- None = Mark.None#
- Random = Mark.Random#
- class motrixsim.msd.Material#
基类:
objectMethods:
Returns a copy of layers.
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)Attributes:
Linear RGB emissive color
Global identifier name, if from file, file name is prefixed.
- 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#
基类:
objectAttributes:
- DetailNormal = MaterialRole.DetailNormal#
- Emissive = MaterialRole.Emissive#
- Normal = MaterialRole.Normal#
- Orm = MaterialRole.Orm#
- Rgb = MaterialRole.Rgb#
- Rgba = MaterialRole.Rgba#
- class motrixsim.msd.MeshData#
基类:
objectMesh data with vertex attributes.
All attribute arrays use Vertex mode with consistent lengths(if present): - vertices = normal = texcoord = tangents
Hard edges are represented by splitting vertices at discontinuities, where the same position has different normals for different faces.
Deserialization supports two formats for vector array fields: - Array format: [[x, y, z], ...] (JSON) - Binary format: raw little-endian f32/u32 bytes (msgpack)
Methods:
set_name(value)set_normal(value)set_tangents(value)set_texcoord(value)set_triangles(value)set_vertices(value)Attributes:
The name of the mesh (used to reference it in Geometry).
Vertex normals as (N, 3) array, or None.
Vertex tangents as (N, 4) array, or None.
Texture coordinates as (N, 2) array, or None.
Number of triangles in the mesh.
Triangle index buffer.
Number of vertices in the mesh.
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#
基类:
objectMethods:
- static buffer(data)#
- static path(path, transform=None, using_meshes=None)#
- class motrixsim.msd.MeshTransform#
基类:
objectFrom 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#
基类:
objectMethods:
geom(value)link(value)link_inertia(value)site(value)- static geom(value)#
- static link(value)#
- static link_inertia(value)#
- static site(value)#
- class motrixsim.msd.PhysicsMaterial#
基类:
objectMethods:
set_condim(value)set_contact_model(value)set_density(value)set_force_mix(value)set_friction(value)Attributes:
The condim of the material.
The contact force model
The density of the material.
The contact force mixing factor for the material.
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#
基类:
objectMethods:
set_intensity(value)set_radius(value)set_range(value)set_shadow_map_near_z(value)Attributes:
Luminous power in lumens, representing the amount of light emitted by this source in all directions.
Simulates a light source coming from a spherical volume with the given radius.
Cut-off for the light's area-of-effect.
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#
基类:
objectThe 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#
基类:
objectAttributes:
- FixedLocal = PositionTrack.FixedLocal#
- FixedWorld = PositionTrack.FixedWorld#
- Free = PositionTrack.Free#
- class motrixsim.msd.Probe#
基类:
objectMethods:
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#
基类:
objectAttributes:
- FixedLocal = RotationTrack.FixedLocal#
- FixedWorld = RotationTrack.FixedWorld#
- Free = RotationTrack.Free#
- LookAtLink = RotationTrack.LookAtLink#
- class motrixsim.msd.Scene(world, path=None)#
基类:
objectA 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:
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.
- 返回类型:
- 抛出:
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)
- class motrixsim.msd.SceneStatistic#
基类:
objectMethods:
set_center(value)set_extent(value)Attributes:
- 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#
基类:
objectMethods:
Returns a copy of contact.
Returns a copy of frame.
Returns a copy of joint.
Returns a copy of subtree.
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#
基类:
objectWhen a primitive shape references a mesh, a geometric primitive of that type is fitted to the mesh.
Aabb: The axis-aligned bounding box of the mesh is computed, and the primitive shape is fitted to the AABB.
InertiaBox: The inertia box of the mesh is computed, and the primitive shape is fitted to the inertia box.
Attributes:
- Aabb = ShapeFit.Aabb#
- InertiaBox = ShapeFit.InertiaBox#
- class motrixsim.msd.ShapeType#
基类:
objectAttributes:
- Box = ShapeType.Box#
- Capsule = ShapeType.Capsule#
- Cylinder = ShapeType.Cylinder#
- Ellipsoid = ShapeType.Ellipsoid#
- HField = ShapeType.HField#
- InfinitePlane = ShapeType.InfinitePlane#
- Mesh = ShapeType.Mesh#
- Plane = ShapeType.Plane#
- Sphere = ShapeType.Sphere#
- class motrixsim.msd.SimulateOption#
基类:
objectMethods:
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)Attributes:
The maximum number of iterations for iterative constraint solvers.
The tolerance for iterative constraint solvers.
The strategy to use for convex hull generation.
Whether to disable all constraints.
The gravity of the simulation.
If specified, all margin values for contacts will be overridden by this value.
If specified, all friction coefficients for contacts will be overridden by this value.
If true, the solver will automatically clamp damping coefficients to make spring damper system stable.
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#
基类:
objectMethods:
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:
implement 'from_to' for site
The visual group of the site.
The material of the site.
The color of the site.
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#
基类:
objectAttributes:
- Box = SiteShape.Box#
- Capsule = SiteShape.Capsule#
- Cylinder = SiteShape.Cylinder#
- Sphere = SiteShape.Sphere#
- class motrixsim.msd.SkyboxLayout#
基类:
objectAttributes:
- Back = SkyboxLayout.Back#
- Down = SkyboxLayout.Down#
- Front = SkyboxLayout.Front#
- Ignore = SkyboxLayout.Ignore#
- Left = SkyboxLayout.Left#
- Right = SkyboxLayout.Right#
- Unsupported = SkyboxLayout.Unsupported#
- Up = SkyboxLayout.Up#
- class motrixsim.msd.SolverType#
基类:
objectAttributes:
- PGS = SolverType.PGS#
- PGSIMPR = SolverType.PGSIMPR#
- class motrixsim.msd.SpotLightDesc#
基类:
objectMethods:
set_inner_angle(value)set_intensity(value)set_outer_angle(value)set_range(value)set_shadow_map_near_z(value)Attributes:
The inner angle of the spot light in degrees.
Luminous power in lumens, representing the amount of light emitted by this source in all directions.
The outer angle of the spot light in degrees.
Range in meters that this light illuminates.
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#
基类:
objectMethods:
frequency_damping_ratio(value)stiffness_damping(value)- static frequency_damping_ratio(value)#
- static stiffness_damping(value)#
- class motrixsim.msd.SpringDamper#
基类:
objectDefine 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#
基类:
objectMethods:
- static automatic()#
- static fixed(value)#
- static range(value)#
- class motrixsim.msd.StiffnessDamping#
基类:
objectSpring-damper parameters using stiffness and damping coefficients.
The force is computed as: F = -k * x - d * v where x is displacement and v is velocity.
Methods:
Attributes:
- set_d(value)#
- set_k(value)#
- d#
The damping coefficient of the damper.
- k#
The stiffness of the spring.
- class motrixsim.msd.SubtreeSensor#
基类:
objectMethods:
Attributes:
- set_link(value)#
- set_name(value)#
- set_type_(value)#
- link#
- name#
- type_#
- class motrixsim.msd.SubtreeSensorType#
基类:
objectAttributes:
- AngMom = SubtreeSensorType.AngMom#
- Com = SubtreeSensorType.Com#
- LinVel = SubtreeSensorType.LinVel#
- class motrixsim.msd.TexcoordOrigin#
基类:
objectAttributes:
- BottomLeft = TexcoordOrigin.BottomLeft#
- TopLeft = TexcoordOrigin.TopLeft#
- class motrixsim.msd.Texture#
基类:
objectMethods:
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#
基类:
objectMethods:
- static checker(value)#
- static file(value)#
- static flat(value)#
- static gradient(value)#
- class motrixsim.msd.TextureType#
基类:
objectAttributes:
- D2 = TextureType.D2#
- EnvDiff = TextureType.EnvDiff#
- EnvSpec = TextureType.EnvSpec#
- Probe = TextureType.Probe#
- Skybox = TextureType.Skybox#
- class motrixsim.msd.ToneMapping#
基类:
objectMethods:
set_method(value)Attributes:
- set_method(value)#
- method#
- class motrixsim.msd.ToneMappingMethod#
基类:
objectAttributes:
- Aces = ToneMappingMethod.Aces#
- None = ToneMappingMethod.None#
- class motrixsim.msd.TouchSensor#
基类:
objectMethods:
Attributes:
- set_name(value)#
- set_site(value)#
- name#
- site#
- class motrixsim.msd.TrackMode#
基类:
objectMethods:
fixed()target_body(value)track()- static fixed()#
- static target_body(value)#
- static track()#
- class motrixsim.msd.Visual#
基类:
objectMethods:
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:
bounding volume color
contact force color
When enabled, the near_view visibility is set to 0.01 and the scene bounds are ignored.
joint color
Disable frustum culling for all visual meshes.
Enables Order Independent Transparency.
Enables Screen Space Ambient Occlusion.
- 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#
基类:
objectMethods:
link_anchor(link_a, anchor, torque_scale[, ...])site_pair(site_a, site_b, torque_scale)- static link_anchor(link_a, anchor, torque_scale, link_b=None, relative_pose=None)#
- static site_pair(site_a, site_b, torque_scale)#
- class motrixsim.msd.World#
基类:
objectMethods:
Returns a copy of actuators.
The tendons that constrain joints.
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:
The equality constraints that should be satisfied by the articulated bodies.
- 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.
- 返回类型:
- 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.
- 返回类型:
- 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.
- 返回类型: