# 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: 1. **cyclonedds_ws**: Houses ROS2 message definitions split between `unitree_go` and `unitree_api` packages 2. **example/src**: Contains implementation examples for state reading and motor control 3. **Configuration scripts**: `setup.sh`, `setup_local.sh`, and `setup_default.sh` for 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: - `/sportmodestate` or `/lf/sportmodestate`: Position, velocity, foot coordinates, gait information - `/lowstate` or `/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.