Repository Summary
Description | ROS2 hardware interface for the Z1 manipulator from Unitree |
Checkout URI | https://github.com/idra-lab/z1_ros2.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
z1_bringup | 0.0.0 |
z1_description | 0.0.0 |
z1_hardware_interface | 0.0.0 |
z1_examples | 0.0.0 |
README
Unitree Z1 ROS2 package
This is a community-driven package that enable the Z1 Manipulator from Unitree to work in ROS2.
Quick Start
To use this package in ROS2, first clone this repository in a ROS2 workspace, e.g.:
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/idra-lab/z1_ros2.git
All external dependencies can be installed with rosdep
:
rosdep update
rosdep install --from-paths ~/ros2_ws/src --ignore-src
Make sure that you sourced the ROS2 global workspace (source /opt/ros/humble/setup.bash
) and then simply build the workspace as:
cd ~/ros2_ws
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Finally, make sure to source also the built workspace (source ~/ros2_ws/install/setup.bash
).
ROS2 packages
This repository contains different sub-packages:
-
z1_description
: contains the URDFs for the Z1 robot, as well as its meshes; -
z1_bringup
: contains configuration and launch files for the Z1 manipulator; -
z1_hardware_interface
: provides the ROS2 control hardware interface for the Z1 manipulator; -
z1_examples
: contains some simple scripts to test and validate the functionalities of the robot;
For more information for each package, please refer to the corresponding README
.
Robot in action
To get started with the Z1 manipulator in the simulation environment, you may call
ros2 launch z1_bringup z1.launch.py starting_controller:=joint_trajectory_controller
This make sure to launch the robot with the joint_trajectory_controller
, which provide a simple motion planning facility.
To test the proper functionality, we can use the waypoint_test.py
script to send a default plan as follows:
ros2 run z1_examples waypoint_test.py
The outcome of the simulation shall be the following:
By using the same bringup launch file, it becomes really easy to transition from the simulation environment to the connection with the real robot. It is necessary to launch
ros2 launch z1_bringup z1.launch.py starting_controller:=joint_trajectory_controller sim_ignition:=false
alongside with the waypoint_test.py
executable, and the hardware interface which connects to the real robot is loaded over the simulator interface, and the robot performs the same motion.
Note: this example uses the position
command interface for the robot (as specified in the configuration file for the joint_trajectory_controller
), and you may have some trouble replicating the simulation on your machine.
As mentioned in this issue, a temporary fix is to delete all appearences of the effort
command interface from the z1.ros2_control.xacro
.
Note that this is a problem of the ROS2 control plugin for Ignition, and not some misconfiguration of this package; the connection with the hardware does not suffer this problem.
A better fix to deleting parts from the URDF is planned but not implemented yet.
Contributing
Everyone is welcome to contribute to this repository.
If you want to improve something, or have some particular request, please first open an issue to disclose your idea with everyone.
As general rule, please develop your feature/bug-fix on a new branch, and create a pull request targeting the development branch (devel
).
There we will make sure that the change is working as expected, and will update the reference of the main
branch accordingly, to guarantee the stability of such branch.