Case Study: A Dive Into IsaacLab

Basic File Hierarchy

Most of the environment related config files are in source/extensions folder.

The folder source/standalone provides a set of demo programs, tools, and the entry script to the manager-based environments that can be invoked user.

Environment Definitions

Task definitions

The tasks are defined in the source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based folder.

The interface to these RL frameworks are defined in source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/wrappers

We define the task-specific configuration and parameters.

A change compared to LeggedGym is that the registration of task is moved to each robot's own __init__.py file.

The environment is defiend as RslRlVecEnvWrapper, where it wraps around the ManagerBasedRLEnv class.

For config file, it follows this inheritance logic

ManagerBasedEnvCfg -> ManagerBasedRLEnvCfg -> LocomotionVelocityRoughEnvCfg -> G1RoughEnvCfg

ManagerBasedEnvCfg

it defines the following config pieces:

viewer: ViewerCfg -

sim: SimulationCfg -

ui_window_class_type -

decimation -

scene: InteractiveSceneCfg -

observations - observation space settings

actions - action space settings

events: DefaultEventManagerCfg - handles reset events

ManagerBasedRLEnvCfg

is_finite_horizon: bool

episode_length_s: float - duration of an episode in seconds, episode_length_steps = ceil(episode_length_s / (decimation_rate * physics_time_step))

rewards: RewardManager

terminations: TerminationManager

curriculum: CurriculumManager

commands: CommandManager

LocomotionVelocityRoughEnvCfg

It instanciates the managers upon initialization, and provides a custom __post_init__ routine

Inference Logic

Similar to LeggedGym, we start off from play.py.

We first create the simulation environment env with the gym.make() function.

The env returned is an instance of ManagerBasedRLEnv

Then, we wrap it inside the RslRlVecEnvWrapper, which provides the following methods

get_observations()

reset()

step()

episode_length_buf

Step() logic is mostly implemented in ManagerBasedRLEnv.

Fixing the robot in-place

Sometimes when debugging, we wish to pin the robot in a fixed location. This can be achieved by changing the following attribute:

Adding Camera View

Last updated