Mujoco KDL Wrapper  0.2.2
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
Advanced / Internal Helpers

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_objects_to_spec (mjSpec *spec, const std::vector< SceneObject > &objects)
bool mj_kdl::compile_and_make_data (mjSpec *spec, mjModel **out_model, mjData **out_data)
void mj_kdl::ensure_plugins_loaded ()

Detailed Description

Low-level mjSpec helpers exposed for custom scene assembly.

These are used internally by build_scene(). They are not part of the stable public API and may change between releases.

Function Documentation

◆ add_floor_to_spec()

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.

◆ add_objects_to_spec()

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.

Parameters
specMuJoCo spec to modify.
objectsList of objects to add.

◆ add_skybox_to_spec()

void mj_kdl::add_skybox_to_spec ( mjSpec * spec)

Internal spec-building helpers.

These are used internally by build_scene() 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.

◆ compile_and_make_data()

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

Parameters
[in]specMuJoCo spec to compile; always freed by this call.
[out]out_modelNewly allocated model on success; null on failure.
[out]out_dataNewly allocated data on success; null on failure.
Returns
true on success.

◆ ensure_plugins_loaded()

void mj_kdl::ensure_plugins_loaded ( )

Load MuJoCo decoder plugins (STL, OBJ, ...) once at first use. Required for external mesh decoder 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.