ti5_isaaclab is a humanoid robot RL training framework extension project of TI5_T170A based on Isaac Lab. It allows you to develop in an isolated environment, outside of the core Isaac Lab repository.
If you want to run policy in gazebo or real robot, please use rl_sar project.
-
Install Isaac Lab by following the installation guide. We recommend using the conda installation as it simplifies calling Python scripts from the terminal.
-
Clone the repository separately from the Isaac Lab installation (i.e. outside the
IsaacLabdirectory):git clone https://github.com/ti5robot/ti5_isaaclab.git
-
Using a python interpreter that has Isaac Lab installed, install the library
python -m pip install -e ./exts/ti5_isaaclab
-
Verify that the extension is correctly installed by running the following command to print all the available environments in the extension:
python scripts/tools/list_envs.py
Flat
# Train
python scripts/rsl_rl/base/train.py --task RobotLab-Isaac-Velocity-Flat-Ti5-T170A-v0 --headless
# Play
python scripts/rsl_rl/base/play.py --task RobotLab-Isaac-Velocity-Flat-Ti5-T170A-v0Rough
# Train
python scripts/rsl_rl/base/train.py --task RobotLab-Isaac-Velocity-Rough-Ti5-T170A-v0 --headless
# Play
python scripts/rsl_rl/base/play.py --task RobotLab-Isaac-Velocity-Rough-Ti5-T170A-v0Note
- Record video of a trained agent (requires installing
ffmpeg), add--video --video_length 200 - Play/Train with 32 environments, add
--num_envs 32 - Play on specific folder or checkpoint, add
--load_run run_folder_name --checkpoint model.pt - Resume training from folder or checkpoint, add
--resume --load_run run_folder_name --checkpoint model.pt
For example, to generate Ti5 T170A usd file:
# origin model
python scripts/tools/convert_urdf.py exts/ti5_isaaclab/data/Robots/Ti5/T170A/urdf/urdf/ti5_t170a.urdf exts/ti5_isaaclab/data/Robots/Ti5/T170A/ti5_t170a.usd --merge-join
# fixed model
python scripts/tools/convert_urdf.py exts/ti5_isaaclab/data/Robots/Ti5/T170A/urdf/urdf/ti5_t170a_fixed.urdf exts/ti5_isaaclab/data/Robots/Ti5/T170A/ti5_t170a_fixed.usd --merge-joinCheck import_new_asset for detail
Using the core framework developed as part of Isaac Lab, we provide various learning environments for robotics research.
These environments follow the gym.Env API from OpenAI Gym version 0.21.0. The environments are registered using
the Gym registry.
Each environment's name is composed of Isaac-<Task>-<Robot>-v<X>, where <Task> indicates the skill to learn
in the environment, <Robot> indicates the embodiment of the acting agent, and <X> represents the version of
the environment (which can be used to suggest different observation or action spaces).
The environments are configured using either Python classes (wrapped using configclass decorator) or through
YAML files. The template structure of the environment is always put at the same level as the environment file
itself. However, its various instances are included in directories within the environment directory itself.
This looks like as follows:
exts/ti5_isaaclab/tasks/locomotion/
├── __init__.py
└── velocity
├── config
│ └── ti5_t170a
│ ├── agent # <- this is where we store the learning agent configurations
│ ├── __init__.py # <- this is where we register the environment and configurations to gym registry
│ ├── flat_env_cfg.py
│ └── rough_env_cfg.py
├── __init__.py
└── velocity_env_cfg.py # <- this is the base task configuration
The environments are then registered in the exts/ti5_isaaclab/tasks/locomotion/velocity/config/ti5_t170a/__init__.py:
gym.register(
id="RobotLab-Isaac-Velocity-Flat-Ti5-T170A-v0",
entry_point="omni.isaac.lab.envs:ManagerBasedRLEnv",
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.flat_env_cfg:Ti5T170AFlatEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Ti5170FlatPPORunnerCfg",
},
)
gym.register(
id="RobotLab-Isaac-Velocity-Rough-Ti5-T170A-v0",
entry_point="omni.isaac.lab.envs:ManagerBasedRLEnv",
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.rough_env_cfg:Ti5T170ARoughEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Ti5170RoughPPORunnerCfg",
},
)To view tensorboard, run:
tensorboard --logdir=logsA pre-commit template is given to automatically format the code.
To install pre-commit:
pip install pre-commitThen you can run pre-commit with:
pre-commit run --all-files