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.
- URDF ✅
- Joint states sync in real time ✅
- IMU sync in real time ✅
- Joystick control in real time ✅
- Go2 topics info in real time ✅
- Foot force sensors info in real time ✅
- Lidar stream (added pointCloud2) ✅
- Camera stream ✅
- Foxglove bridge ✅
- Laser Scan ✅
- SLAM (slam_toolbox) ✅
- Navigation (nav2) ✅
- Object detection
- AutoPilot
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!
✨ 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)
Real time Go2 Air/PRO/EDU joints sync:
Go2 Air/PRO/EDU lidar point cloud:
Real time Go2 Air/PRO ROS2 topics
Tested systems and ROS2 distro
systems | ROS2 distro | Build status |
---|---|---|
Ubuntu 22.04 | iron | |
Ubuntu 22.04 | humble | |
Ubuntu 22.04 | rolling |
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 --recurse-submodules https://github.com/abizovnuralem/go2_ros2_sdk.git
cd go2_ros2_sdk
sudo apt install python3-pip clang
pip install -r requirements.txt
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
You need to install ros2 and rosdep package first.
https://docs.ros.org/en/humble/Installation.html
source /opt/ros/$ROS_DISTRO/setup.bash
cd ros2_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build
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
To use Foxglove, you need to install Foxglove Studio:
sudo snap install foxglove-studio
- Open Foxglove Studio and press "Open Connection".
- In the "Open Connection" settings, choose "Foxglove WebSocket" and use the default configuration ws://localhost:8765, then press "Open".
- (Optional) You can also import a default layout view from the foxglove.json file located inside this repository.
To contribute or modify the project, refer to these resources for implementing additional features or improving the existing codebase. PRs are welcome!
Special thanks to @legion1581, @tfoldi, @budavariam, @alex.lin and TheRoboVerse community!
This project is licensed under the BSD 2-clause License - see the LICENSE file for details.