Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
U

unitree_ros

> 编程语言
Open source

Introduction Here are the ROS simulation packages for Unitree robots, You can load robots and joint controllers in Gazebo, so you can perfo…

1.5K stars0 likes0 views
WebsiteGitHub

About

Introduction Here are the ROS simulation packages for Unitree robots, You can load robots and joint controllers in Gazebo, so you can perfo…

Introduction

Here are the ROS simulation packages for Unitree robots, You can load robots and joint controllers in Gazebo, so you can perform low-level control (control the torque, position and angular velocity) of the robot joints. Please be aware that the Gazebo simulation cannot do high-level control, namely walking. Aside from these simulation functions, you can also control your real robots in ROS with the unitree_ros_to_real packages. For real robots, you can do high-level and low-level control using our ROS packages.

Packages:

Robot description:

  • a1
  • a2
  • aliengo
  • aliengoZ1
  • b1
  • b2
  • b2w
  • dexterous_hand
  • g1
  • go1
  • go2
  • go2w
  • h1_2
  • h1
  • h2
  • laikago
  • r1
  • r1_air
  • z1

Robot and joints controller:

  • unitree_controller
  • z1_controller

Simulation related:

  • unitree_gazebo
  • unitree_legged_control

Dependencies

  • ROS Melodic or ROS Kinetic (has not been tested)
  • Gazebo8
  • unitree_legged_msgs: unitree_legged_msgs is a package under unitree_ros_to_real.

Build

For ROS Melodic:

sudo apt-get install ros-melodic-controller-interface  ros-melodic-gazebo-ros-control ros-melodic-joint-state-controller ros-melodic-effort-controllers ros-melodic-joint-trajectory-controller

For ROS Kinetic:

sudo apt-get install ros-kinetic-controller-manager ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-joint-state-controller ros-kinetic-effort-controllers ros-kinetic-velocity-controllers ros-kinetic-position-controllers ros-kinetic-robot-controllers ros-kinetic-robot-state-publisher ros-kinetic-gazebo8-ros ros-kinetic-gazebo8-ros-control ros-kinetic-gazebo8-ros-pkgs ros-kinetic-gazebo8-ros-dev

And open the file unitree_gazebo/worlds/stairs.world. At the end of the file:

<include>
    <uri>model:///home/unitree/catkin_ws/src/unitree_ros/unitree_gazebo/worlds/building_editor_models/stairs</uri>
</include>

Please change the path of building_editor_models/stairs to the real path on your PC.

Then you can use catkin_make to build:

cd ~/catkin_ws
catkin_make

If you face a dependency problem, you can just run catkin_make again.

Detail of Packages

unitree_legged_control:

It contains the joints controllers for Gazebo simulation, which allows users to control joints with position, velocity and torque. Refer to "unitree_ros/unitree_controller/src/servo.cpp" for joint control examples in different modes.

The description of robots:

Namely the description of Go1, A1, Aliengo and Laikago. Each package includes mesh, urdf and xacro files of robot. Take Laikago for example, you can check the model in Rviz by:

roslaunch laikago_description laikago_rviz.launch

unitree_gazebo & unitree_controller:

You can launch the Gazebo simulation with the following command:

roslaunch unitree_gazebo normal.launch rname:=a1 wname:=stairs

Where the rname means robot name, which can be laikago, aliengo, a1 or go1. The wname means world name, which can be earth, space or stairs. And the default value of rname is laikago, while the default value of wname is earth. In Gazebo, the robot should be lying on the ground with joints not activated.

1. Stand controller

After launching the gazebo simulation, you can start to control the robot:

rosrun unitree_controller unitree_servo

And you can add external disturbances, like a push or a kick:

rosrun unitree_controller unitree_external_force

2. Position and pose publisher

Here we demonstrated how to control the position and pose of robot without a controller, which should be useful in SLAM or visual development.

Then run the position and pose publisher in another terminal:

rosrun unitree_controller unitree_move_kinetic

The robot will turn around the origin, which is the movement under the world coordinate frame. And inside of the source file move_publisher.cpp, we also provide the method to move using the robot coordinate frame. You can change the value of def_frame to coord::ROBOT and run the catkin_make again, then the unitree_move_publisher will move robot under its own coordinate frame.

z1_controller

You can launch the z1 Gazebo simulation with the following command:

roslaunch unitree_gazebo z1.launch

After launching the gazebo simulation, you can start to control the z1 robot by z1_sdk.
see z1_documentation

GitHub Issues· 91 open

View all on GitHub
  • #154

    Dex5 right-hand URDF has 16 of 20 joints at effort="0"; the left twin has none

    Updated Aug 28, 2026
  • #151

    G1-D URDF lacks proper modelling of the base.

    Updated Jul 27, 2026
  • #153

    Are there any models supporting the latest Unitree R1 EDU?

    Updated Jul 24, 2026
  • #152

    宇树h2-urdf信息缺失

    Updated Jun 11, 2026
  • #150

    xml files needed

    Updated May 29, 2026
  • #85

    Could not load class 'unitree_legged_control/UnitreeJointController'

    Updated Feb 10, 2026
  • #137

    Crash in MoveIt Setup Assistant when loading Unitree G1 URDF for configuration

    Updated Jan 27, 2026
  • #118

    invalid null prim when importing g1_29dof_with_hand_rev_1_0.urdf to isaacsim4.5.0

    Updated Jan 26, 2026
  • #142

    ros2中如何使用gazebo仿真[How to use Gazebo simulation in ros2]

    Updated Jan 17, 2026
  • #129

    Request for Gazebo-Compatible URDF Model of G1

    Updated Dec 8, 2025

Highlights

  • •aliengoZ1
  • •dexterous_hand
  • •unitree_controller
  • •z1_controller
  • •unitree_gazebo
  • •unitree_legged_control
  • •ROS Melodic or ROS Kinetic (has not been tested)
  • •unitree_legged_msgs: unitree_legged_msgs is a package under unitree_ros_to_real.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言