This repository replants the BARN Challenge Environment into the Omniverse Isaac Gym Environment for reinforcement learning.
Also see The BARN Challenge.
Based on our test, our PC (13700KF CPU, 64GB RAM, 4070 Super GPU with 12GB VRAM) can run 64 environments in parallel in real-time.
-
Follow the instruction of the original repository to install the Omniverse Isaac Gym Environment. Note that the repository url
https://github.com/NVIDIA-Omniverse/OmniIsaacGymEnvs.git
should be changed tohttps://github.com/Skythinker616/BarnOIGE.git
. -
Add sensor plugin to kit dependencies list.
"omni.isaac.sensor" = {}
Add the above line at the end of
omni.isaac.sim.python.gym.kit
,omni.isaac.sim.python.gym.headless.kit
andomni.isaac.sim.gym.kit
in<isaac_sim_root>/apps
directory. -
Place the Lidar configuration file
barn_utils/lidar/OS1_32ch20hz512res.json
in<isaac_sim_root>/exts/omni.isaac.sensor/data/lidar_configs/Ouster
directory.
Same as the original repository, you can run the training script with task name Barn
:
PYTHON_PATH scripts/rlgames_train.py task=Barn
Run following command to start isaac gym:
<isaac_sim_root>/isaac-sim.gym.sh --ext-folder </parent/directory/to/this/repo>
The UI window can be activated from Isaac Examples > RL Examples by navigating the top menu bar. For more details on the extension workflow, please refer to the documentation.
Run with skrl
-
Install skrl:
PYTHON_PATH -m pip install skrl["torch"]
-
Run the example script in this repository:
PYTHON_PATH scripts/barn_skrl_td3.py
-
Other skrl examples can be found here.
Note 1: All commands above should be executed from
BarnOIGE/omniisaacgymenvs
.Note 2:
<isaac_sim_root>
is the root directory of Isaac Sim package, which is the directory containingpython.bat
orpython.sh
.Note 3: This project only tested on Windows 11, if you encounter any problem on other platforms, please create an issue.
Note: This step is optional. The converted 300 .usd files are already included in this repository under
barn_utils/usd/worlds
.
-
Build gz-usd following its instruction. (We used WSL to build it on Windows.)
-
Place the
barn_utils/scripts/batch_convert.sh
in the./build/bin
directory of gz-usd (path to executablesdf2usd
). -
Run the script with the path to the BARN Challenge .world files directory:
bash batch_convert.sh </parent/directory/to/world_files>
-
Run Isaac Sim and open its Script Editor (Window > Script Editor). Copy and run the content of
barn_utils/scripts/clean_usd.py
in the Script Editor to clean the converted .usd files.