Skip to content

Blue-radish/go2_omniverse_cnsoft

Repository files navigation

第十四届“中国软件杯”大学生软件设计大赛 A10

📌 项目简介

针对宇树 Go2 机器狗,开发了一套基于 NVIDIA Isaac Sim (Orbit)ROS2 HumblePPO 强化学习算法 的运动控制系统,实现复杂地形下的自主导航与任务执行。


📁 项目结构

以下为仓库的主要目录结构:

go2_omniverse_cnsoft/
├── IsaacSim-ros_workspaces/     # Isaac Sim 与 ROS2 的桥接工作区
├── Isaac_sim/                   # Isaac Sim 相关资源
├── envs/                        # 自定义环境(office / warehouse)
├── go2_omniverse_assets/        # 材质、贴图等资源
│   └── textures/
├── go2_omniverse_ws/            # ROS2 工作区(核心代码)
│   └── src/paddle_ros2/paddle_ros2/
│       ├── main.py              # 导航主程序(你的核心代码)
│       ├── tools/               # 工具脚本
│       └── ernie_llm_converter.py  # LLM API 配置
├── isaaclab_transfer/           # IsaacLab 相关迁移文件
├── logs/rsl_rl/                 # 强化学习训练日志
├── old_orbit/                   # 旧版本 Orbit 相关内容
├── robots/                      # 机器人模型
├── cli_args.py
├── main.py
├── run_sim.sh                   # 启动仿真(Go2)
├── run_sim_g1.sh                # 启动仿真(G1)
├── run_llm_node.sh              # 启动 LLM 节点
├── run_ocr_node.sh              # 启动 OCR 节点
├── run_go2_motion_demo.sh
└── LICENSE

🧩 启动顺序(推荐)

启动 OCR 模块

./run_ocr_node.sh

启动 LLM 模块

./run_llm_node.sh

启动仿真(地图 + 机器狗模型)

Go2:

./run_sim.sh

G1:

./run_sim_g1.sh

启动导航模块

python ./go2_omniverse_cnsoft/go2_omniverse_ws/src/paddle_ros2/paddle_ros2/main.py

🧠 核心代码位置

导航主要逻辑位于:

./go2_omniverse_cnsoft/go2_omniverse_ws/src/paddle_ros2/paddle_ros2/

其中:

  • main.py —— 导航主程序
  • tools/ —— 工具脚本
  • ernie_llm_converter.py —— LLM API 配置

🛠️ 安装步骤(简化版)

  1. 安装 Isaac Sim 2023.1.1
  2. 安装 ROS2 Humble
  3. 克隆 IsaacLab 0.3.1
  4. 配置环境变量:
export ISAACSIM_PATH="${HOME}/.local/share/ov/pkg/isaac-sim-2023.1.1"
export ISAACSIM_PYTHON_EXE="${ISAACSIM_PATH}/python.sh"
  1. 安装 Orbit:
./orbit.sh --conda
conda activate orbit
sudo apt install cmake build-essential
./orbit.sh --install
./orbit.sh --extra rsl_rl
  1. 验证安装:
python source/standalone/tutorials/00_sim/create_empty.py
  1. 克隆本仓库:
git clone https://github.com/Blue-radish/go2_omniverse_cnsoft --recurse-submodules -j8 --depth=1

Welcome to the Unitree Go2/G1 Digital Twins Project!

IsaacSim Python Linux platform License

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.

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

Real time Go2 Balancing:

Go2

Real time G1 Balancing:

Go2

Go2 Ros2 Camera stream:

Go2

URDF real-time joints sync:

Go2

Foot force data stream:

Go2

Real-time RTX lidar stream:

Go2

Custom envs (Office):

Go2

Custom envs (Warehouse):

Go2

VR support:

Go2

Project RoadMap:

  1. PPO balancing algorithm ✅
  2. Keyboard real time control ✅
  3. Camera stream to ROS2 ✅
  4. RTX Lidar stream to ROS2 ✅
  5. IMU data stream to ROS2 ✅
  6. URDF real-time joints sync ✅
  7. Foot force data stream ✅
  8. Real-time control from ROS2 ✅
  9. Nav2 with Slam_toolbox ✅
  10. Bunch of RL-envs for custom dog training ✅
  11. Custom numbers of robots ✅
  12. Added G1 Unitree support ✅

Your feedback and support mean the world to us.

If you're as enthusiastic about this project as we are, please consider giving it a ⭐ star on our GitHub repository.

Your encouragement fuels our passion and helps us develop our RoadMap further. We welcome any help or suggestions you can offer!

Together, let's push the boundaries of what's possible with the Unitree Go2/G1 and ROS2!

Cloud Services from @robolaunch

If your system is not sufficient for Isaac Sim or Isaac Lab etc., this is where Robolaunch offers you a new service. You can do real-time work by simply connecting to the computer on the remote server via a web browser.

video video
If you would like to get more detailed information about Robolaunch web platform payments or anything else, contact us!

System requirements and installation

Whether you're running locally or in the cloud, you'll need to install:

  1. Ubuntu 22.04
  2. Nvidia Isaac Sim 2023.1.1
  3. Nvidia Orbit 0.3.0
  4. Ros2 Humble

Full instruction:

After installation of Nvidia Isaac Sim 2023.1.1 and Ros2 Humble:

1. Clone this specific IsaacLab repo version: https://github.com/isaac-sim/IsaacLab/releases/tag/v0.3.1
2. Execute in ubuntu terminal:
export ISAACSIM_PATH="${HOME}/.local/share/ov/pkg/isaac-sim-2023.1.1"
export ISAACSIM_PYTHON_EXE="${ISAACSIM_PATH}/python.sh"
and also put it inside .bashrc file
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
4. Execute ./orbit.sh --conda
5. Execute conda activate orbit
6. Execute sudo apt install cmake build-essential
7. Execute ./orbit.sh --install
8. Execute ./orbit.sh --extra rsl_rl
9. Verify the installation using "python source/standalone/tutorials/00_sim/create_empty.py" You should be inside conda env.
10. You need to check that you have "Isaac Sim Python 2023.1.1 - New Stage*" on the top of the window.
11. Clone this repo with git clone https://github.com/abizovnuralem/go2_omniverse/ --recurse-submodules -j8 --depth=1
12. Copy the config file Unitree_L1.json (located in go2_omniverse/Isaac_sim/Unitree/Unitree_L1.json) for the Unitree L1 LiDAR to the folder IsaacLab-0.3.1/source/data/sensors/lidar/Unitree_L1.json (if the path doesnt exists, create it)
13. Copy all material files in the isaac-sim-2023.1.1/data/material_files folder to IsaacLab_v0.3.1/source/data/material_files (if the path doesnt exists, create it)
14. Execute ./run_sim.sh (without activated conda orbit env)

Some suggestions:

  1. You need to check nvidia-smi, it should work, before installing Isaac Sim
  2. You need to install Miniconda and execute: conda config --set auto_activate_base false
  3. Install Omniverse launcher and then install Isaac Sim.
  4. You need to install ROS2 on your system and configure it:
https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_ros.html#isaac-sim-app-install-ros

Usage

The current project was tested on Ubuntu 22.04, IsaacSim 2023.1.1 with Orbit 0.3.0 and Nvidia Driver Version: 545. To start the project with Unitree GO2, execute:

./run_sim.sh

To start the project with Unitree G1, execute:

./run_sim_g1.sh

You can control the dog using "WASD" keyboard commands

ROS2 SDK

You can use https://github.com/abizovnuralem/go2_ros2_sdk as a basement for your ROS2 setup.

Select custom env

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. 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.

Development

To contribute or modify the project, refer to these resources for implementing additional features or improving the existing codebase. PRs are welcome!

VR support

To enable VR support on linux will take some time, but it works! I have tested it on:

  1. Ubuntu 22.04
  2. Nvidia drivers are 545.29.06
  3. SteamVR 2.4.4 (IMPORTANT! It should be 2.4.4) and you need to go to Compatibility tab (Inside Steam app) and "Force the use of a specific Steam Play compatibility tool" and switch to "Steam-Play-None", additional info you can find in ALVR github issues tab.
  4. ALVR streamer 20.8.1 + Oculus Quest 2 (client ALVR you can install via SideQuest app) (How to install it: https://github.com/alvr-org/ALVR)
  5. Execute IsaacSim, Go to Window -> Extensions, find STEAMVR INPUT/OUTPUT then enable it and enable AutoLoad. Reopen IsaacSim. Use OpenXR mode.
  6. Enjoy Omniverse in VR mode!

Troubleshooting:

The version of Isaac Simulator 2023.1.1 is no longer available on Omniverse Launcher, what should I do?

  1. Go to Container Installation and follow all the steps in the Container Deployment section up to step 5).
  2. Modify the command in step 6) with:
docker pull nvcr.io/nvidia/isaac-sim:2023.1.1
  1. Now run this command:
docker run --name isaac-sim --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \
    -e "PRIVACY_CONSENT=Y" \
    -v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \
    -v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \
    -v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \
    -v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
    -v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
    -v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
    -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
    -v ~/docker/isaac-sim/documents:/root/Documents:rw \
    nvcr.io/nvidia/isaac-sim:2023.1.1
  1. Open another terminal and run the command bash docker ps to find the container's ID.
  2. From the terminal inside the container, run this command to copy the entire Isaac 2023.1.1 folder to a folder on your computer (I suggest naming it isaac-sim-2023.1.1 so that the setup commands above work):
docker cp <id_container>:isaac-sim/. <your_local_machine_folder> # absolute path
  1. On your PC, you will have a folder named isaac-sim-2023.1.1. Move it to the following path:
.local/share/ov/pkg/

Could not import 'rosidl_typesupport_c' for package 'go2_interfaces'

If running ./run_sim.sh results in the error "Could not import 'rosidl_typesupport_c' for package", refer to this thread.

Thanks

Special thanks to

  1. Leul Tesfaye for his expertise in Orbit lidars;
  2. Tamas @tfoldi for contributing to this project;
  3. @ShaoshuSu for his hardwork in investigating the speed issues with new version of Orbit (IsaacLab 4.0 and 4.1);

License

This project is licensed under the BSD 2-clause License - see the LICENSE file for details.

About

Unitree Go2 Omniverse: RL-based quadruped control using PPO & ROS. Featured in the 14th China Software Cup (Rank 12/272). Supports Isaac Gym, YOLO, and LLM integration.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors