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.
✨ 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)
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 Air/PRO/EDU lidar point cloud:
- 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
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 |
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
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.