Skip to content

Commit 040b833

Browse files
Merge pull request #32 from abizovnuralem/fix_speed
fix speed
2 parents 01d07f0 + 2dd1119 commit 040b833

26 files changed

+99
-2278
lines changed

Isaac_sim/extension.toml

Lines changed: 0 additions & 97 deletions
This file was deleted.

README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
# Welcome to the Unitree Go2/G1 Digital Twins Project!
55

6-
[![IsaacSim](https://img.shields.io/badge/IsaacSim-4.0-silver.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html)
6+
[![IsaacSim](https://img.shields.io/badge/IsaacSim-orbit-gold.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html)
77
[![Python](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3/whatsnew/3.10.html)
88
[![Linux platform](https://img.shields.io/badge/platform-linux--64-orange.svg)](https://releases.ubuntu.com/22.04/)
99
[![License](https://img.shields.io/badge/license-BSD--2-yellow.svg)](https://opensource.org/licenses/BSD-2-Clause)
1010

11-
We are thrilled to announce that the Unitree Go2/G1 robot has now been integrated with the Nvidia Isaac Sim 4.0 (Isaac Lab), marking a major step forward in robotics research and development. The combination of these two cutting-edge technologies opens up a world of possibilities for creating and testing algorithms in a variety of simulated environments.
11+
We are thrilled to announce that the Unitree Go2/G1 robot has now been integrated with the Nvidia Isaac Sim (Orbit), marking a major step forward in robotics research and development. The combination of these two cutting-edge technologies opens up a world of possibilities for creating and testing algorithms in a variety of simulated environments.
1212

1313
Get ready to take your research to the next level with this powerful new resource at your fingertips!
1414

@@ -101,22 +101,35 @@ Together, let's push the boundaries of what's possible with the Unitree Go2/G1 a
101101
## System requirements
102102
You need to install:
103103
1. Ubuntu 22.04
104-
2. Nvidia Isaac Sim 4.0
105-
3. Nvidia Isaac Lab
104+
2. Nvidia Isaac Sim 2023.1.1
105+
3. Nvidia Orbit 0.3.0
106106
4. Ros2 Humble
107107

108108

109109
Full instruction:
110110
```
111-
https://isaac-sim.github.io/IsaacLab/source/setup/installation/binaries_installation.html
111+
1. Use this specific IsaacLab repo version: https://github.com/isaac-sim/IsaacLab/releases/tag/v0.3.1
112+
2. execute in ubuntu terminal:
113+
export ISAACSIM_PATH="${HOME}/.local/share/ov/pkg/isaac-sim-2023.1.1"
114+
export ISAACSIM_PYTHON_EXE="${ISAACSIM_PATH}/python.sh"
115+
and also put it inside .bashrc file
116+
3. Inside the root folder of Orbit repo (https://github.com/isaac-sim/IsaacLab/releases/tag/v0.3.1) execute ln -s ${ISAACSIM_PATH} _isaac_sim
117+
4. ./orbit.sh --conda
118+
5. conda activate orbit
119+
6. sudo apt install cmake build-essential
120+
7. ./orbit.sh --install
121+
8. ./orbit.sh --extra rsl_rl
122+
9. verify the installation using "python source/standalone/tutorials/00_sim/create_empty.py" You should be inside conda env.
123+
10. You need to check that you have "Isaac Sim Python 2023.1.1 - New Stage*" on the top of the window.
124+
11. go to the current repo project (this repo)
125+
12. execute ./run_sim.sh
112126
```
113127

114128
Some suggestions:
115-
1. You need to check nvidia-smi, it should work, before installing Isaac Sim 4.0
129+
1. You need to check nvidia-smi, it should work, before installing Isaac Sim (Orbit)
116130
2. You need to install Miniconda and execute: conda config --set auto_activate_base false
117-
3. Install Omniverse launcher and then install Isaac Sim 4.0.
118-
4. Create conda env then activate it, also execute ./isaaclab.sh --install
119-
Also, you need to install ROS2 on your system and configure it:
131+
3. Install Omniverse launcher and then install Isaac Sim (Orbit).
132+
4. You need to install ROS2 on your system and configure it:
120133

121134
```
122135
https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_ros.html#isaac-sim-app-install-ros
@@ -136,13 +149,11 @@ git clone https://github.com/abizovnuralem/go2_omniverse/ --recurse-submodules -
136149
First, you need to copy files from Isaac Sim folder to your local Isaac Sim installation in order to use Unitree L1 lidar inside Orbit.
137150

138151
```
139-
1. You need to replace original file that located in ~/.local/share/ov/pkg/isaac-sim-4.0.0/exts/omni.isaac.sensor/config/extrensiom.toml
140-
with Isaac_sim/extension.toml in this repo.
141-
2. You need to add Unitree_L1.json to IsaacLab repo folder, where IsaacLab/source/exts/omni.isaac.sensor/data/lidar_configs/Unitree/Unitree_L1.json will be the final path (If it doesnt exists, create it)
152+
1. You need to add Unitree_L1.json to IsaacLab (Orbit) repo folder, where IsaacLab-0.3.1/source/data/sensors/lidar/Unitree/Unitree_L1.json will be the final path (If it doesnt exists, create it)
142153
```
143154

144155
## Usage
145-
The current project was tested on Ubuntu 22.04, IsaacSim 4.0 with Isaac Lab and Nvidia Driver Version: 545.
156+
The current project was tested on Ubuntu 22.04, IsaacSim 2023.1.1 with Orbit 0.3.0 and Nvidia Driver Version: 545.
146157
To start the project with Unitree GO2, execute:
147158

148159
```
@@ -165,7 +176,7 @@ You can use https://github.com/abizovnuralem/go2_ros2_sdk as a basement for your
165176
## Select custom env
166177

167178
To use predifined custom envs, you need to download files from https://drive.google.com/drive/folders/1vVGuO1KIX1K6mD6mBHDZGm9nk2vaRyj3?usp=sharing and place them to /envs folder.
168-
Then you can execute it via python main.py --custom_env=office or python main.py --custom_env=warehouse commands (The whole cmd you can read from run_sim script). If you are doing it first time, it will take 2-3 minutes to configure the env. Please, wait.
179+
Then you can execute it modifying run_sim.sh script with --custom_env=office and --terrain flat commands. If you are doing it first time, it will take 2-3 minutes to configure the env. Please, wait.
169180

170181

171182
## Development
@@ -183,8 +194,12 @@ I have tested it on:
183194
5. Execute IsaacSim, Go to Window -> Extensions, find STEAMVR INPUT/OUTPUT then enable it and enable AutoLoad. Reopen IsaacSim. Use OpenXR mode.
184195
6. Enjoy Omniverse in VR mode!
185196

197+
186198
## Thanks
187-
Special thanks to Leul Tesfaye for his expertise in Orbit lidars and Tamas @tfoldi for contributing to this project.
199+
Special thanks to
200+
1. Leul Tesfaye for his expertise in Orbit lidars;
201+
2. Tamas @tfoldi for contributing to this project;
202+
3. @ShaoshuSu for his hardwork in investigating the speed issues with new version of Orbit (IsaacLab 4.0 and 4.1);
188203

189204

190205
## License

cli_args.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from typing import TYPE_CHECKING
1010

1111
if TYPE_CHECKING:
12-
from omni.isaac.lab_tasks.utils.wrappers.rsl_rl import RslRlOnPolicyRunnerCfg
12+
from omni.isaac.orbit_tasks.utils.wrappers.rsl_rl import RslRlOnPolicyRunnerCfg
1313

1414

1515
def add_rsl_rl_args(parser: argparse.ArgumentParser):
@@ -48,7 +48,7 @@ def parse_rsl_rl_cfg(task_name: str, args_cli: argparse.Namespace) -> RslRlOnPol
4848
Returns:
4949
The parsed configuration for RSL-RL agent based on inputs.
5050
"""
51-
from omni.isaac.lab_tasks.utils.parse_cfg import load_cfg_from_registry
51+
from omni.isaac.orbit_tasks.utils.parse_cfg import load_cfg_from_registry
5252

5353
# load the default configuration
5454
rslrl_cfg: RslRlOnPolicyRunnerCfg = load_cfg_from_registry(task_name, "rsl_rl_cfg_entry_point")

custom_rl_env.py

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,39 @@
2626
import torch
2727
from dataclasses import MISSING
2828
from typing import Literal
29-
30-
31-
from omni.isaac.lab.envs import ManagerBasedRLEnvCfg
32-
from omni.isaac.lab.utils import configclass
33-
34-
import omni.isaac.lab.sim as sim_utils
35-
from omni.isaac.lab.assets import ArticulationCfg, AssetBaseCfg
36-
from omni.isaac.lab.scene import InteractiveSceneCfg
37-
from omni.isaac.lab.sensors import ContactSensorCfg, RayCasterCfg, patterns
38-
from omni.isaac.lab.terrains import TerrainImporterCfg
39-
from omni.isaac.lab.utils import configclass
40-
from omni.isaac.lab_assets.unitree import UNITREE_GO2_CFG
41-
from omni.isaac.lab.managers import EventTermCfg as EventTerm
42-
from omni.isaac.lab.managers import ObservationGroupCfg as ObsGroup
43-
from omni.isaac.lab.managers import ObservationTermCfg as ObsTerm
44-
from omni.isaac.lab.managers import RewardTermCfg as RewTerm
45-
from omni.isaac.lab.managers import SceneEntityCfg
46-
from omni.isaac.lab.managers import TerminationTermCfg as DoneTerm
47-
from omni.isaac.lab.utils import configclass
48-
from omni.isaac.lab.utils.noise import AdditiveUniformNoiseCfg as Unoise
49-
import omni.isaac.lab_tasks.manager_based.locomotion.velocity.mdp as mdp
50-
51-
29+
import argparse
30+
31+
32+
from omni.isaac.orbit.envs import RLTaskEnvCfg
33+
from omni.isaac.orbit.utils import configclass
34+
35+
import omni.isaac.orbit.sim as sim_utils
36+
from omni.isaac.orbit.assets import ArticulationCfg, AssetBaseCfg
37+
from omni.isaac.orbit.scene import InteractiveSceneCfg
38+
from omni.isaac.orbit.sensors import ContactSensorCfg, RayCasterCfg, patterns
39+
from omni.isaac.orbit.terrains import TerrainImporterCfg
40+
from omni.isaac.orbit.utils import configclass
41+
from omni.isaac.orbit_assets.unitree import UNITREE_GO2_CFG
42+
from omni.isaac.orbit.managers import EventTermCfg as EventTerm
43+
from omni.isaac.orbit.managers import ObservationGroupCfg as ObsGroup
44+
from omni.isaac.orbit.managers import ObservationTermCfg as ObsTerm
45+
from omni.isaac.orbit.managers import RewardTermCfg as RewTerm
46+
from omni.isaac.orbit.managers import SceneEntityCfg
47+
from omni.isaac.orbit.managers import TerminationTermCfg as DoneTerm
48+
from omni.isaac.orbit.utils import configclass
49+
from omni.isaac.orbit.utils.noise import AdditiveUniformNoiseCfg as Unoise
50+
import omni.isaac.orbit_tasks.locomotion.velocity.mdp as mdp
51+
52+
from terrain_cfg import ROUGH_TERRAINS_CFG
5253
from robots.g1.config import G1_CFG
5354

55+
from omniverse_sim import args_cli
56+
5457

5558
base_command = {}
5659

5760

58-
def constant_commands(env: ManagerBasedRLEnvCfg) -> torch.Tensor:
61+
def constant_commands(env: RLTaskEnvCfg) -> torch.Tensor:
5962
global base_command
6063
"""The generated command from the command generator."""
6164
tensor_lst = torch.tensor([0, 0, 0], device=env.device).repeat(env.num_envs, 1)
@@ -68,12 +71,27 @@ def constant_commands(env: ManagerBasedRLEnvCfg) -> torch.Tensor:
6871
class MySceneCfg(InteractiveSceneCfg):
6972
"""Configuration for the terrain scene with a legged robot."""
7073

71-
# ground terrain
72-
terrain = TerrainImporterCfg(
74+
if args_cli.terrain == "flat":
75+
76+
# flat terrain
77+
terrain = TerrainImporterCfg(
78+
prim_path="/World/ground",
79+
terrain_type="plane",
80+
debug_vis=False,
81+
)
82+
else:
83+
terrain = TerrainImporterCfg(
7384
prim_path="/World/ground",
74-
terrain_type="plane",
85+
terrain_type="generator",
86+
terrain_generator=ROUGH_TERRAINS_CFG,
87+
physics_material=sim_utils.RigidBodyMaterialCfg(
88+
friction_combine_mode="multiply",
89+
restitution_combine_mode="multiply",
90+
static_friction=1.0,
91+
dynamic_friction=1.0,
92+
),
7593
debug_vis=False,
76-
)
94+
)
7795

7896
# robots
7997
robot: ArticulationCfg = MISSING
@@ -238,7 +256,7 @@ class EventCfg:
238256

239257

240258
@configclass
241-
class LocomotionVelocityRoughEnvCfg(ManagerBasedRLEnvCfg):
259+
class LocomotionVelocityRoughEnvCfg(RLTaskEnvCfg):
242260
"""Configuration for the locomotion velocity-tracking environment."""
243261
# Scene settings
244262
scene: MySceneCfg = MySceneCfg(num_envs=4096, env_spacing=2.5)
Binary file not shown.
-1.25 MB
Binary file not shown.
-1.26 MB
Binary file not shown.

0 commit comments

Comments
 (0)