Env and task registry

Env and task registry#

Builders and registration helpers used by CLIs and extension packages.

Env template and robot builders#

wbc_mjlab.env.wbc_env_cfg.make_base_wbc_env_cfg(use_reference_residual_action: bool = True) mjlab.envs.ManagerBasedRlEnvCfg[source]#

Robot-agnostic WBC env template with all manager term slots pre-populated.

Robot builders attach the entity and motion-command body names; presets (apply_wbc, apply_zest, …) finish weights and RSI. Prefer wbc_mjlab.robots.env.make_wbc_env_cfg() for a registered robot.

Parameters:

use_reference_residual_action – If True (default), use ReferenceJointPositionActionCfg; otherwise mjlab absolute joint-position actions.

wbc_mjlab.robots.env.register_robot_builders(robot_id: str, make_env_cfg: Callable[[...], Any], make_rl_cfg: Callable[[], Any]) None[source]#

Register env/RL config builders for an external or in-tree robot.

Prefer wbc_mjlab.extension.register_wbc_extension() for the full robot + task registration path.

wbc_mjlab.robots.env.make_wbc_env_cfg(robot_id: str | RobotId = 'g1', *, play: bool = False, task_id: str = 'Wbc-G1', **kwargs) ManagerBasedRlEnvCfg[source]#

Build a WBC env config for a registered robot.

Parameters:
  • robot_id – Registered robot id (default "g1").

  • play – If True, disable train-only DR / assistive wrench (play mode).

  • task_id – Task id used by the robot builder to select the preset stack.

  • **kwargs – Forwarded to the robot’s env builder.

wbc_mjlab.robots.env.make_wbc_rl_cfg(robot_id: str | RobotId = 'g1') RslRlOnPolicyRunnerCfg[source]#

Build the RSL-RL runner config for a registered robot.

Task table#

wbc_mjlab.tasks.get_task_config(task_id: str) WbcTaskConfig[source]#

Look up a task by id (resolves legacy aliases).

wbc_mjlab.tasks.list_wbc_task_ids() list[str][source]#

Sorted list of registered task ids (for CLIs and listings).

wbc_mjlab.tasks.all_wbc_tasks() tuple[WbcTaskConfig, ...][source]#

Return all registered WBC tasks (built-in and extension).

wbc_mjlab.tasks.register_wbc_task(task: WbcTaskConfig) None[source]#

Register one task with mjlab (env, play env, RL cfg, runner).

wbc_mjlab.tasks.register_wbc_tasks(tasks: WbcTaskConfig | Iterable[WbcTaskConfig]) None[source]#

Add tasks to the WBC task table; register with mjlab when bootstrap is done.

wbc_mjlab.tasks.register_all_wbc_tasks() None[source]#

Register every known WBC task into mjlab (idempotent).

wbc_mjlab.tasks.resolve_task_id(robot_id: str | None = None, *, task: str | None = None, no_state_estimation: bool = False) str[source]#

Pick mjlab task id from --task, legacy alias, or robot + NoSE flag.

wbc_mjlab.tasks.prepare_wbc_run(*, task_id: str) str[source]#

Register tasks and record the active robot/task for this CLI invocation.

One-shot robot + tasks: wbc_mjlab.extension.register_wbc_extension() (Extension API).