π API Quick Reference#
π Core Module - motrixsim#
Function Category |
API |
Description |
|---|---|---|
Model Loading |
Load MJCF/URDF model files |
|
Simulation Step |
Execute a single simulation time step |
|
Kinematics |
Perform forward kinematics computation |
π§ Core Objects#
Object |
Type |
Usage Description |
|---|---|---|
Model |
Static simulation world description, including robot geometry, joints, and sensor definitions |
|
Data |
Dynamic simulation state, storing real-time data such as positions and velocities |
|
Config |
Simulation parameter settings, controlling integrator and solver parameters |
π Named Access - Model Component Access#
MotrixSim provides convenient named access interfaces for model components, supporting direct access and manipulation of various components by name or index.
π§ Access Methods#
MotrixSimβs Named Access supports two access methods:
Access by name:
model.get_body("my_body")Access by index:
model.get_body(0)
Each component access method returns the corresponding component object, providing its properties and methods.
π― Model Components#
Component |
Access Method |
Returned Object Functionality |
Index Query Method |
|---|---|---|---|
Body |
Get rigid body pose, DoF state |
||
Link |
Get link pose, velocity |
||
Joint |
Set/get joint position, velocity |
||
Site |
Get site position, orientation |
||
Sensor |
Read sensor data |
- |
|
Actuator |
Set actuator control, limits |
π’ Batch Access#
API |
Type |
Description |
|---|---|---|
ndarray |
Get all actuator control values |
|
ndarray |
Get positions and orientations of all links |
|
List[Body] |
List of all body objects |
|
List[Link] |
List of all link objects |
|
List[Joint] |
List of all joint objects |
|
List[Site] |
List of all site objects |
π SceneData - State Data#
Property/Method |
Type |
Description |
|---|---|---|
ndarray |
DoF position array |
|
ndarray |
DoF velocity array |
|
ndarray |
Set/get actuator control values |
|
- |
Reset scene data state |
|
LowData |
Low-level data object (contact info, etc.) |
π¨ Model Building Module - motrixsim.msd#
Function/Method |
Description |
|---|---|
Load model file for combining and building |
|
Attach another model with transform and prefix |
|
Build the final |
π¨ Rendering Module - motrixsim.render#
Object/Class |
Category |
Main Functionality |
|---|---|---|
Main Renderer |
Model loading, scene synchronization |
|
Gizmo Drawing |
Drawing spheres, cubes, etc. |
|
User Interface |
Buttons, switches, controls |
|
Input Handler |
Keyboard, mouse, ray detection |