Unitree Interface:
The unitree_interface package is a ROS 2 (Jazzy) bridge for the Unitree G1 humanoid robot that abstracts away DDS communication behind standard ROS topics and services. It’s split into two components: UnitreeInterface, which handles the ROS-facing API including subscriptions, publishers, services, and a control mode state machine, and UnitreeSDKWrapper, which manages all the underlying SDK/DDS communication. Both share CycloneDDS domain 0, so no domain ID separation is needed. The node operates as a state machine cycling through Monostate, Idle, HighLevel, LowLevel, and Emergency modes. HighLevelMode exposes velocity and arm commands via the locomotion client and arm SDK respectively, while LowLevelMode (compile-time gated) allows direct per-joint motor control with CRC-32 checksums. Joint topology is defined at compile time in topology.hpp, mapping all 29 joints by URDF name to index with gearbox-based default gains. Mode transitions are validated and exposed via a service, joint state feedback is published at ~500Hz, and an estop subscription in both active modes triggers a terminal damping state.


Fig : Modes and Transitions.