This package provides a complete ROS 2 Jazzy integration for the Unitree Go2 quadrupedal robot using the CHAMP controller framework. It includes custom configuration packages and robot description models specifically adapted for ROS 2, enabling simulation, control, and autonomous operation capabilities.
The Go2 is a quadrupedal robot manufactured by Unitree Robotics, designed for both research and commercial applications. It features powerful actuators, advanced sensor integration, and a robust mechanical design capable of navigating various terrains.
CHAMP (Coupled Hybrid Automata for Mobile Platforms) is an open-source development framework designed for quadrupedal robots. It provides a hierarchical control system that combines pattern modulation and impedance control techniques for efficient locomotion.
- ✅ Complete ROS 2 Jazzy integration
- ✅ URDF model adapted to ROS 2 control framework
- ✅ Gazebo Harmonic simulation support
- ✅ Teleoperation using keyboard
- ✅ RVIZ visualization
- ✅ Integrated gait control and configuration
- ✅ Simulated sensors (in progress):
- ✅ IMU
- ✅ 2D LiDAR (Hokuyo)
- ✅ 3D LiDAR (Velodyne)
- ✅ 3D LiDAR (4D Lidar L1) (need some imporvments)
- ✅ Mono Camera
- ❌ Depth Camera
- ❌ GPS
- ✅ Point cloud visualization in RVIZ
- ✅ Multiple sensor configurations available
- ❌ Full SLAM functionality (Coming soon)
- ❌ Navigation 2 integration (Coming soon)
- Ubuntu 24.04
- ROS 2 Jazzy
- Gazebo Sim Harmonic
sudo apt update
sudo apt install ros-jazzy-gazebo-ros2-control
sudo apt install ros-jazzy-xacro
sudo apt install ros-jazzy-robot-localization
sudo apt install ros-jazzy-ros2-controllers
sudo apt install ros-jazzy-ros2-control
sudo apt install ros-jazzy-velodyne
sudo apt install ros-jazzy-velodyne-description
cd ~/ros2_ws/src
git clone https://github.com/khaledgabr77/unitree_go2_ros2
cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y
cd ~/ros2_ws
colcon build
source install/setup.bash
Launch the Gazebo simulation:
ros2 launch unitree_go2_sim unitree_go2_launch.py
The package now includes both Velodyne 3D LiDAR
and 4D Lidar L1
sensors. You can visualize the point cloud data in RVIZ:
Launch Gazebo with RVIZ:
ros2 launch unitree_go2_sim unitree_go2_launch.py rviz:=true
Velodyne Lidar and 4D Lidar L1
Velodyne Lidar Beams
4D Lidar L1 Beams
Velodyne Lidar and 4D Lidar L1 Beams
Mono Camera
Control the robot using keyboard:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
The gait configuration for the robot is found in unitree_go2_sim/config/gait/gait.yaml
. You can modify the following parameters:
Parameter | Description |
---|---|
Knee Orientation | How the knees should be bent (.>> .>< .<< .<>) |
Max Linear Velocity X | Maximum forward/reverse speed (m/s) |
Max Linear Velocity Y | Maximum sideways speed (m/s) |
Max Angular Velocity Z | Maximum rotational speed (rad/s) |
Stance Duration | How long each leg spends on the ground while walking |
Leg Swing Height | Trajectory height during swing phase (m) |
Leg Stance Height | Trajectory depth during stance phase (m) |
Robot Walking Height | Distance from hip to ground while walking (m) |
CoM X Translation | Offset to compensate for weight distribution |
Odometry Scaler | Multiplier to calculated velocities for dead reckoning |
champ/
: Core controllers and state estimation for CHAMPunitree_go2_description/
: URDF models, meshes, and world filesunitree_go2_sim/
: Simulation launch files and configuration
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project builds upon and incorporates work from the following projects:
- Unitree Robotics - For the Go2 robot description (URDF model)
- CHAMP - For the quadruped controller framework
- CHAMP Robots - For robot configurations and setup examples
- unitree-go2-ros2 - ROS 2 package with gazebo classic