Skip to content

The package provides a complete ROS 2 Jazzy integration for the Unitree Go2 quadrupedal robot using the CHAMP controller framework.

Notifications You must be signed in to change notification settings

khaledgabr77/unitree_go2_ros2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unitree Go2 ROS2

Unitree Go2

Overview

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.

About Unitree Go2

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.

About CHAMP Controller

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.

CHAMP Controller

Features

  • ✅ 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)

System Requirements

  • Ubuntu 24.04
  • ROS 2 Jazzy
  • Gazebo Sim Harmonic

Installation

1. Install ROS 2 Dependencies

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

2. Clone and Install CHAMP Controller and Go2 Simulation Packages

cd ~/ros2_ws/src
git clone https://github.com/khaledgabr77/unitree_go2_ros2

3. Install Dependencies

cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y

4. Build the Workspace

cd ~/ros2_ws
colcon build
source install/setup.bash

Usage

Gazebo Simulation

Launch the Gazebo simulation:

ros2 launch unitree_go2_sim unitree_go2_launch.py

Unitree Go2 Simulation

Watch Demo on YouTube

RVIZ Visualization

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

RVIZ Visualization

Velodyne Lidar and 4D Lidar L1

Velodyne Lidar and 4D Lidar L1

Velodyne Lidar Beams

Velodyne Lidar Beams

4D Lidar L1 Beams

4D Lidar L1 Beams

Velodyne Lidar and 4D Lidar L1 Beams

Velodyne Lidar and 4D Lidar L1 Beams

Mono Camera

Mono Camera

Teleoperation

Control the robot using keyboard:

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Tuning Gait Parameters

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

Velodyne Lidar and 4D Lidar L1

Project Structure

  • champ/: Core controllers and state estimation for CHAMP
  • unitree_go2_description/: URDF models, meshes, and world files
  • unitree_go2_sim/: Simulation launch files and configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgements

This project builds upon and incorporates work from the following projects:

License

About

The package provides a complete ROS 2 Jazzy integration for the Unitree Go2 quadrupedal robot using the CHAMP controller framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published