mjlab Tasks
mjlab is a MuJoCo-based RL framework that adopts an Isaac-Lab-like API while using MuJoCo-Warp as its simulation backend. In LAV2, it serves as a manager-based RL environment backend parallel to Isaac Lab and Genesis Forge.
Like the other two frameworks, mjlab is not part of LAV2's default dependency set, so it must be installed separately before using lav2.tasks.mjlab.
How LAV2 Connects To mjlab
LAV2's mjlab integration lives under lav2.tasks.mjlab. Tasks are organized by task type first, then by robot platform under config/<robot>/.
The shared (robot-agnostic) aerial base logic lives in lav2.tasks.mjlab.locomotion.aerial.base. Its parameterized environment builder is lav2.tasks.mjlab.locomotion.aerial.base.base_env_cfg (the create_env_cfg() factory in base_env_cfg.py), and its task terms live under lav2.tasks.mjlab.locomotion.aerial.base.mdp.
The shared RL runner lives under lav2.tasks.mjlab.locomotion.aerial.base.rl so model export stays task-level and robot-agnostic. The LAV2-specific concrete configuration lives under lav2.tasks.mjlab.locomotion.aerial.base.config.lav2: the environment factory is lav2_env_cfg() in lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.env_cfgs and the rsl_rl runner config is lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.rl_cfg.
In terms of discovery, mjlab is closer to Isaac Lab than to Genesis Forge: the task must be made visible to the framework's task registry. In this repository, that means exposing the task package through a symbolic link, for example mapping lav2/tasks/mjlab into src/mjlab/tasks.
LAV2 Base Task
The important part to understand is that the aerial base task is expressed as a manager-based RL environment configuration. Scene, actions, observations, events, commands, rewards, and terminations are assembled into a single task configuration rather than being hard-coded inside one monolithic environment class.
That keeps the task layout conceptually aligned with the Isaac Lab and Genesis Forge pages even though the concrete framework API differs.
What To Edit
When tuning the mjlab task:
- start from lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.env_cfgs for LAV2-specific task composition
- adjust lav2.tasks.mjlab.locomotion.aerial.base.mdp when the change belongs to action, command, reward, or termination logic (robot-agnostic)
- check lav2.tasks.mjlab.locomotion.aerial.base.base_env_cfg when adding or modifying the parameterized builder interface
- update lav2.tasks.mjlab.locomotion.aerial.base.rl only when the change is shared RL runner behavior or model export
- update lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.rl_cfg only when the change is LAV2 rsl_rl training config
API Cross-References
- Package root: lav2.tasks.mjlab
- Base task package (shared): lav2.tasks.mjlab.locomotion.aerial.base
- Base env builder (parameterized): lav2.tasks.mjlab.locomotion.aerial.base.base_env_cfg
- LAV2 config subpackage: lav2.tasks.mjlab.locomotion.aerial.base.config.lav2
- LAV2 env factory:
lav2_env_cfg()in lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.env_cfgs - Shared RL runner: lav2.tasks.mjlab.locomotion.aerial.base.rl
- LAV2 rsl_rl config: lav2.tasks.mjlab.locomotion.aerial.base.config.lav2.rl_cfg
- MDP package: lav2.tasks.mjlab.locomotion.aerial.base.mdp