Welcome to the Isaac Sim Unitree Go2 repository! This repository provides a Unitree Go2 quadruped robot simulation, leveraging the Isaac Sim/Isaac Lab framework and integrating seamlessly with a ROS 2 interface. It offers a flexible platform for testing navigation, decision-making, and other autonomous tasks in various scenarios.
Step I: Please follow the latest Isaac Lab official documentation to install the Isaac Sim and Isaac Lab.
Step II: Please install ROS2 Humble with the official installation guide.
Step III: Install the prerequisite C extension in the conda environment. reference link
# default conda env for Isaac Lab
conda activate isaaclab
conda install -c conda-forge libstdcxx-ng
Step IV: Clone this repo to your local directory.
git clone https://github.com/Zhefan-Xu/isaac-go2-ros2.git
To run the simulation, please use the following command:
conda activate isaaclab
python isaac_go2_ros2.py
Once the simulation is loaded, the robot can be teleoperated by the keyboard:
W
: Forward, A
: Left, S
: Backward, D
: Right, Z
: Left Turn, C
: Right Turn.
sim.demo.mp4
After launching the simulation, the ROS2 data can be visualized in Rviz2
:
rviz2 -d /path/to/isaac-go2-ros2/rviz/go2.rviz
Here is a categorized list of ROS 2 topics available for the Unitree Go2:
Command and Control
/unitree_go2/cmd_vel
: Topic to send velocity commands to the robot for motion control.
Front Camera
/unitree_go2/front_cam/color_image
: Publishes RGB color images captured by the front camera./unitree_go2/front_cam/depth_image
: Publishes depth images from the front camera./unitree_go2/front_cam/info
: Publishes camera information, including intrinsic parameters.
LIDAR
/unitree_go2/lidar/point_cloud
: Publishes a point cloud generated by the robot's LIDAR sensor.
Odometry and Localization
/unitree_go2/odom
: Publishes odometry data, including the robot's position, orientation, and velocity./unitree_go2/pose
: Publishes the current pose of the robot in the world frame.
The simulation environments and settings can be changed in isaac-go2-ros2/cfg/sim.yaml
config file.
The current implementation contains a few environments which can be found on isaac-go2-ros2/env/sim_env.py
, which follows standard Isaac Sim method for importing USD environments. To change the environment, please change the env_name
in the config file isaac-go2-ros2/cfg/sim.yaml
. Current available environments:
warehouse
: A simple warehouse environment in Isaac Sim.warehouse-forklifts
: A warehouse environment with forklifts.warehouse-shelves
: A warehouse environment with shelves.full-warehouse
: A full warehouse environment containing everything.obstacle-sparse
: A sparse obstacle field environment.obstacle-medium
: A medium obstacle field environment.obstacle-dense
: A dense obstacle field environment.
This repository supports running multiple Unitree Go2 robots and the number of robots can by changed by the num_envs
parameter in the config file isaac-go2-ros2/cfg/sim.yaml
. The following shows an example video.
multipe.robots.mp4
The video shows an example of using this repo with an RL agent to achieve navigation and collision avoidance:
go2.navigation.mp4
The Go2 controller is based on the RL controller implemented in go2_omniverse.