$ show abizovnuralem/go2_ros2_sdk
This repository is a complete ROS2 software development kit for the Unitree Go2 quadruped robot. It provides a high-level SDK (go2_robot_sdk) with clean architecture (domain, application, infrastructure, presentation) that enables connection to the robot via WebRTC (Wi-Fi) or CycloneDDS (Ethernet), reception and decoding of real-time data (LiDAR, IMU, joint states, camera, odometry), and control commands (movement, stance, joystick). It includes multiple ROS2 packages: go2_interfaces (25+ custom message types), lidar_processor (Python and C++ nodes for LiDAR point cloud decoding and aggregation), speech_processor (ElevenLabs TTS with caching and robot playback), coco_detector (object detection using PyTorch FasterRCNN), and launch files for SLAM (slam_toolbox) and autonomous navigation (Nav2). The repository also contains URDF models, calibration files, RViz configurations, Docker support, and multi-robot namespace remapping. While primarily an application for controlling and monitoring the Go2 robot, it includes data-processing components (LiDAR decoding, IMU filtering, object detection) that give it a hybrid data-research character. The codebase demonstrates professional ROS2 development practices with modular design, abstract interfaces, and multiple language implementations.
The LLM identified 3 files worth highlighting for reuse:
Decodes multiple data types (IM, joint states, odometry, lidar, camera, foot force) from binary mesages received via WebRTC. It parses the message header to determine type, then extracts and yields typed domain objects (e.g., ImuData, JointState, LidarData). This compoonent is isolated (only depends on domain entities) and reusable for any robot with a similar binary protocol, showing a clean pattern for message routing and decoding.
Generates standardized JSON command strings for robot control, including movement (linear/angular velocity), stance, stand up/down, and custom WebRTC API commands. The functions are parameterized (e.g., `gen_command('Move', body=...)`) and produce the exact format expected by the robot. This module can be extracted and reused with any JSON-based API, demonstrating a clean command builder pattern.
Implements inverse kinematics for the Unitree Go2's leg geometry (FL, FR, RL, R) using geometric approach. It computes joint angles from foot position relative to hip. While robot-specific, the pattern of using datum (leg parameters) and solving using trigonometric functions is self-contained and can be adapted for any quadruped. The code is clean, well-documented, and demonstrates non-obvious skill in robotic kinematics.