This repository overlays minimal changes to the Isaac Lab framework to support multi-task environments, and training multi-task RL policies.
Please refer to the Isaac Lab documentation for more information on the framework, its features, and how to get started.
The installation process is identical to that of the original Isaac Lab repository, except you should clone this repository instead of the official one.
We extend the manager-based environments in Isaac Lab to support multi-task setups. This repository introduces a dedicated multi-task environment class called ManagerBasedMTRLEnv
, following the ManagerBasedRLEnv
class, along with simple usage examples.
Key differences in the multi-task environment:
-
Configuration Structure:
- Instead of a single
ManagerBasedRLEnvCfg
, the multi-task environment uses two configuration types:ManagerBasedMTRLEnvCfg
: Contains parameters shared across all tasks.TaskConfigs
: Holds task-specific settings.
- Instead of a single
-
TaskConfigs Details:
- The
TaskConfigs
class includes fields such as:episode_length_s
scene
observations
actions
commands
rewards
terminations
events
curriculum
- The
-
ManagerBasedMTRLEnvCfg Details:
- All the remaining parameters from
ManagerBasedRLEnvCfg
are defined inManagerBasedMTRLEnvCfg
and are shared across all tasks. - Additional fields include:
num_multi_task_envs
: Number of tasks.task_spacing
: Spacing between tasks.num_envs_per_task
: Number of environments for each task. Overrides thenum_envs
inInteractiveSceneCfg
.envs_spacing
: Spacing between environments within each task. Overrides theenv_spacing
inInteractiveSceneCfg
append_task_id
: Whether to append the task ID (0 tonum_tasks - 1
) to the observations.concatenate_step_results
: Whether to concatenate step results across tasks. Possible only for homogeneous tasks, that allow for a common observation and action space. Other fields, such asrewards
,terminations
etc are also concatenated if set toTrue
.
- All the remaining parameters from
-
Adding Tasks:
- To add new tasks, simply include their corresponding
TaskConfigs
in theManagerBasedMTRLEnvCfg
.
- To add new tasks, simply include their corresponding
-
Example Config:
-
See
source/isaaclab_tasks/isaaclab_tasks/manager_based/multitask/reach
for example multi-task environments. The following config is formt_franka_ur10
, a heterogeneous multi-task environment with two tasks:franka
andur10
.@configclass class MTReachEnvCfg_Heterogeneous(ManagerBasedMTRLEnvCfg): """Configuration for the reach end-effector pose tracking environment.""" franka: TaskConfigs = FrankaReachEnvCfg() ur10: TaskConfigs = UR10ReachEnvCfg() def __post_init__(self): """Post initialization.""" # general settings self.decimation = 2 self.num_multi_task_envs = 2 self.task_spacing = 5.0 self.num_envs_per_task = 64 self.envs_spacing = 2.5 self.append_task_id = True self.concatenate_step_results = False # viewer settings self.viewer.eye = (3.5, 3.5, 3.5) # simulation settings self.sim.render_interval = self.decimation self.sim.dt = 1.0 / 60.0
-
Note: The task config attribute names (such as
franka1
,franka2
,ur10
) will be treated as task names, and are used at various places:- In the prim paths of environments, for example
/World/<task_name>_envs/envs_*
- In the
envs
field ofManagerBasedMTRLEnv
, which is a dictionary mapping task names to their respective environments. - When
concatenate_step_results
isFalse
, the observations are dictionaries mapping task names to their respective observations.
- In the prim paths of environments, for example
-
-
Example Scripts:
- Homogeneous Multi-Task Environment:
See
scripts/tutorials/03_envs/run_mt_rl_env_v1.py
for an example using two homogeneous tasks,franka1
andfranka2
. These tasks are functionally identical, but any tasks that share the same observation and action spaces can be used. - Heterogeneous Multi-Task Environment:
See
scripts/tutorials/03_envs/run_mt_rl_env_v2.py
for an example using heterogeneous tasks,franka
andur10
, which have different observation and action spaces. - Multi-Task RL Training for Homogeneous Environment:
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task=Isaac-Reach-MTFranka-v0
- Homogeneous Multi-Task Environment:
See
This repository builds on top of the Isaac Lab framework, which is released under the BSD-3 License. The isaaclab_mimic
extension and its corresponding standalone scripts are released under Apache 2.0. The license files of its dependencies and assets are present in the docs/licenses
directory.