Skip to content

Unofficial ROS2 SDK support for Unitree GO2 AIR/PRO/EDU

License

Notifications You must be signed in to change notification settings

foyer-work/go2_ros2_sdk

 
 

Repository files navigation

Welcome to the Unitree Go2 ROS2 SDK Project!

We are delighted to present you with our integration of the Unitree Go2 ROS2 SDK, leveraging the innovative go2-WebRTC interface, originally designed by the talented @tfoldi. You can explore and utilize his groundbreaking work at go2-webrtc on GitHub.

This resourceful project is here to empower your Unitree GO2 AIR/PRO/EDU robots with ROS2 SDK capabilities. We're thrilled to offer an enhanced level of control and interaction, enabling you to take your robotics projects to new heights.

Exciting Features:

✨ Full ROS2 SDK support for your Unitree GO2

🤖 Compatible with AIR, PRO, and EDU variants

👣 Access to foot force sensors feedback (available on GO2 PRO/EDU)

Your feedback and support mean the world to us.

If you're as enthusiastic about this project as we are, please consider giving it a ⭐ star on our GitHub repository.

Your encouragement fuels our passion and helps us develop our RoadMap further. We welcome any help or suggestions you can offer!

Together, let's push the boundaries of what's possible with the Unitree Go2 and ROS2!

Real time Go2 Air/PRO/EDU joints sync:

Go2 joints sync

Go2 Air/PRO/EDU lidar point cloud:

Go2 point cloud

Go2 point cloud

Project RoadMap:

  1. URDF ✅
  2. Joint states sync in real time ✅
  3. IMU sync in real time ✅
  4. Joystick control in real time ✅
  5. Go2 topics info in real time ✅
  6. Foot force sensors info in real time ✅
  7. Lidar stream (added pointCloud2) ✅
  8. Camera stream ✅
  9. Foxglove bridge ✅
  10. Laser Scan ✅
  11. SLAM (slam_toolbox) ✅
  12. Navigation (nav2) ✅
  13. Object detection
  14. AutoPilot

Topic

Real time Go2 Air/PRO ROS2 topics

Go2 topic list

Go2 topic list

System requirements

Tested systems and ROS2 distro

systems ROS2 distro Build status
Ubuntu 22.04 iron example workflow
Ubuntu 22.04 humble example workflow

A single workspace can contain as many packages as you want, each in their own folder. You can also have packages of different build types in one workspace (CMake, Python, etc.). You cannot have nested packages.

Best practice is to have a src folder within your workspace, and to create your packages in there. This keeps the top level of the workspace “clean”.

Your workspace should look like:

workspace_folder/
    src/
      py_package_1/
          package.xml
          resource/py_package_1
          setup.cfg
          setup.py
          py_package_1/

      py_package_2/
          package.xml
          resource/py_package_2
          setup.cfg
          setup.py
          py_package_2/

clone this repo to src folder of your own ros2_ws repo

git clone https://github.com/abizovnuralem/go2_ros2_sdk.git
cd go2_ros2_sdk
pip install -r requirements.txt
sudo apt install ros-{ROS2_VER}-test-msgs
sudo apt install ros-{ROS2_VER}-tf2-sensor-msgs
cd ..
mkdir -p ros2_ws/src
copy all files inside go2_ros2_sdk folder to ros2_ws/src folder

install rust language support in your system https://www.rust-lang.org/tools/install

cargo should work in terminal

cargo --version

build it

source /opt/ros/<your_ros_ver>/setup.bash
cd ros2_ws
colcon build

Usage

don't forget to setup your GO2-robot in Wifi-mode and get IP then

export ROBOT_IP="Your robot ip"
cd ros2_ws
source install/setup.bash
ros2 launch go2_robot_sdk robot.launch.py

Foxglove

Foxglove bridge

To use Foxglove, you need to install Foxglove Studio:

sudo snap install foxglove-studio
  1. Open Foxglove Studio and press "Open Connection".
  2. In the "Open Connection" settings, choose "Foxglove WebSocket" and use the default configuration ws://localhost:8765, then press "Open".
  3. (Optional) You can also import a default layout view from the foxglove.json file located inside this repository.

SLAM

Slam

Development

To contribute or modify the project, refer to these resources for implementing additional features or improving the existing codebase. PRs are welcome!

Thanks

Special thanks to @legion1581, @tfoldi, @budavariam, @alex.lin and TheRoboVerse community!

License

This project is licensed under the BSD 2-clause License - see the LICENSE file for details.

About

Unofficial ROS2 SDK support for Unitree GO2 AIR/PRO/EDU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.7%
  • Python 10.9%
  • C 3.7%
  • CMake 3.5%
  • Rust 0.9%
  • Dockerfile 0.2%
  • Other 0.1%