2.3 KiB
Unitree ROS2
Source: https://github.com/unitreerobotics/unitree_ros2 Fetched: 2026-02-13 Type: GitHub Repository README
Unitree ROS2 Support Overview
Project Description
This repository provides ROS2 integration for Unitree quadruped robots. The implementation leverages CycloneDDS, which serves as both the Unitree SDK2 communication backbone and ROS2's middleware, enabling "direct use of ROS2 messages for robot control without SDK wrapping."
Supported Platforms
Robots: Go2, B2, H1 Operating Systems & ROS2 Versions:
- Ubuntu 20.04 with ROS2 Foxy
- Ubuntu 22.04 with ROS2 Humble (recommended)
Repository Structure
The workspace contains three main components:
- cyclonedds_ws: Houses ROS2 message definitions split between
unitree_goandunitree_apipackages - example/src: Contains implementation examples for state reading and motor control
- Configuration scripts:
setup.sh,setup_local.sh, andsetup_default.shfor environment initialization
Key Installation Steps
Installation involves three phases: dependency installation, CycloneDDS compilation (unnecessary for Humble), and package compilation using colcon.
Critical dependency: "The cyclonedds version of Unitree robot is 0.10.2," requiring specific middleware configuration rather than default ROS2 installations.
Communication Topics
State acquisition occurs through topic subscriptions:
/sportmodestateor/lf/sportmodestate: Position, velocity, foot coordinates, gait information/lowstateor/lf/lowstate: Motor states, IMU data, power information, force sensors/wirelesscontroller: Remote control input values
Robot control uses publisher patterns:
/api/sport/request: High-level locomotion commands via SportClient interface/lowcmd: Direct motor torque, position, and velocity commands
Example Applications
The repository includes executable examples demonstrating state acquisition and control:
- Motion state monitoring
- Low-level sensor data collection
- Wireless controller input handling
- Motor control demonstrations
- ROS bag recording examples
Visualization Support
The project supports RViz2 integration for sensor visualization, demonstrated with LiDAR point cloud display using frame transformations.