Mujoco KDL Wrapper  0.2.2
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
Runtime Environment

Own compiled model/data and synchronize registered robots on reset. More...

Classes

struct  mj_kdl::ResetOptions
struct  mj_kdl::ResetInfo
struct  mj_kdl::ResetContext
struct  mj_kdl::Env

Functions

bool mj_kdl::init_env (Env *env, const SceneSpec *spec)
void mj_kdl::env_add_robot (Env *env, Robot *robot)
ResetInfo mj_kdl::reset (Env *env, const ResetOptions *options=nullptr)
void mj_kdl::cleanup (Env *env)

Detailed Description

Own compiled model/data and synchronize registered robots on reset.

Use init_env() when an application needs reset hooks or a single owner for model/data and scene mutation helpers.

Function Documentation

◆ cleanup()

void mj_kdl::cleanup ( Env * env)

Destroy model/data owned by Env and clear borrowed Robot registrations. Registered Robot objects are not deleted.

◆ env_add_robot()

void mj_kdl::env_add_robot ( Env * env,
Robot * robot )

Register a Robot handle to be synchronised after environment reset. The robot is borrowed; the Env does not delete or clean it up.

Referenced by admittance_ft::build_scene(), main(), main(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ init_env()

bool mj_kdl::init_env ( Env * env,
const SceneSpec * spec )

Build a runtime environment from a declarative SceneSpec. The resulting model/data are owned by env and freed by cleanup(Env *).

◆ reset()

ResetInfo mj_kdl::reset ( Env * env,
const ResetOptions * options = nullptr )

Reset the whole environment to a keyframe/default state, call Env::on_reset for user-specific robot/object/task restoration, then sync all registered Robot command ports and clear stale robot forces.

Referenced by main(), main(), admittance_ft::run(), admittance_ft::run_gui(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().