|
mj-kdl-wrapper
0.1.0
MuJoCo + KDL bridge for robot kinematics and dynamics
|
Low-level mjSpec helpers exposed for custom scene assembly. More...
Functions | |
| void | mj_kdl::add_skybox_to_spec (mjSpec *spec) |
| void | mj_kdl::add_floor_to_spec (mjSpec *spec) |
| void | mj_kdl::add_table_to_spec (mjSpec *spec, const TableSpec &t) |
| void | mj_kdl::add_objects_to_spec (mjSpec *spec, const std::vector< SceneObject > &objects) |
| void | mj_kdl::configure_spec (mjSpec *spec, const SceneSpec *sc) |
| bool | mj_kdl::compile_and_make_data (mjSpec *spec, mjModel **out_model, mjData **out_data) |
| void | mj_kdl::ensure_plugins_loaded () |
Low-level mjSpec helpers exposed for custom scene assembly.
These are used internally by build_scene() and configure_spec(). They are not part of the stable public API and may change between releases.
| void mj_kdl::add_floor_to_spec | ( | mjSpec * | spec | ) |
Add a checker groundplane texture, material, and floor plane geom to spec. Corresponds to SceneSpec::add_floor.
| void mj_kdl::add_objects_to_spec | ( | mjSpec * | spec, |
| const std::vector< SceneObject > & | objects | ||
| ) |
Add free-floating or fixed rigid bodies to the world body of spec.
| spec | MuJoCo spec to modify. |
| objects | List of objects to add. |
| void mj_kdl::add_skybox_to_spec | ( | mjSpec * | spec | ) |
Internal spec-building helpers.
These are used internally by build_scene() and configure_spec(), but are exposed here for advanced callers that construct mjSpec objects directly. They are not part of the stable public API and may change between releases.
Add a sky gradient texture and overhead directional light to spec. Corresponds to SceneSpec::add_skybox.
| void mj_kdl::add_table_to_spec | ( | mjSpec * | spec, |
| const TableSpec & | t | ||
| ) |
Add a table (tabletop + four legs) to the world body of spec.
| spec | MuJoCo spec to modify. |
| t | Table geometry, size, and colour. |
| bool mj_kdl::compile_and_make_data | ( | mjSpec * | spec, |
| mjModel ** | out_model, | ||
| mjData ** | out_data | ||
| ) |
Compile spec into a model and create its data buffer. spec is always deleted (on success and failure).
| [in] | spec | MuJoCo spec to compile; always freed by this call. |
| [out] | out_model | Newly allocated model on success; null on failure. |
| [out] | out_data | Newly allocated data on success; null on failure. |
| void mj_kdl::configure_spec | ( | mjSpec * | spec, |
| const SceneSpec * | sc | ||
| ) |
Apply all SceneSpec settings to a parsed mjSpec: physics options (timestep, gravity), compiler flags, and scene decorations (skybox, floor, table, objects) according to the flags in sc.
| void mj_kdl::ensure_plugins_loaded | ( | ) |
Load MuJoCo decoder plugins (STL, OBJ, ...) once at first use. Required since MuJoCo 3.6.0 moved mesh decoders to plugin libraries. Called automatically by all scene-building functions; call explicitly only when building a scene via raw mjSpec APIs without going through the library.