๐ท Geometry#
Geometry determines the appearance and collision properties of objects in the scene. Geometries can be added under <body> or <worldbody>, or used to configure default-related properties. MJCF Geometry Configurable Attributes
Geometry Types#
Currently supported geometry types are as follows:
Type |
Description |
|---|---|
Plane ( |
Infinite plane dividing the entire scene, can only be configured under |
Height field ( |
Requires referencing an asset under the corresponding |
Sphere ( |
The |
Capsule ( |
Can be regarded as composed of two hemispheres and a cylinder. The |
Cylinder ( |
The |
Box ( |
The |
Mesh ( |
Requires referencing an asset under the corresponding |
Main Interfaces#
In MotrixSim, you can access Geom objects in the following ways:
model.num_geoms: Get the number of Geoms in the current world.model.geoms: Get all Geom objects in the current world.model.get_geom(key): Get a specific Geom object by name or index.
Once you obtain a Geom object, you can read information such as its position, orientation, velocity, etc. For details, please refer to the Geom API.
Example#
You can run a simple example of Geom API usage with:
uv run examples/physics/geom.py
See the source code at examples/physics/geom.pyใ