This workspace contains the complete ROS2 integration for the Unitree Go2W (Wheeled) robot. Unlike the standard Go2, the Go2W features 16 active degrees of freedom (12 leg motors + 4 wheel motors). This workspace provides the drivers, description, and simulation tools necessary to control all 16 motors. Be sure to check cheatsheet.md for a quick reference on common commands and service calls.
go2w_ws/
├── src/
│ ├── go2w_bringup/ # Launch files and orchestration
│ ├── go2w_description/ # URDF, Xacro, Meshes (Converted to ROS2)
│ ├── go2w_driver/ # C++ Driver for 16-motor control
│ └── go2w_mock/ # Python-based Kinematic Simulation
├── cheatsheet.md # Quick reference for Service Calls
├── IMPLEMENTATION_DETAILS.md # Deep dive into code interactions
└── README.md
- OS: Ubuntu 22.04 LTS
- ROS2: Humble Hawksbill
- Dependencies:
unitree_sdk2unitree_ros2(for message definitions likeunitree_go)
-
Clone the workspace:
git clone <your-repo-url> go2w_ws cd go2w_ws
-
Build:
colcon build source install/setup.bash
Perfect for testing your code, visualization, and navigation logic without hardware.
Launch:
ros2 launch go2w_bringup go2w.launch.py rviz:=True sim:=TrueWhat to expect:
- RViz will open showing the Go2W model.
- TF Tree:
odom -> base_link -> ... -> FL_foot_motor(wheels). - Control: You can send commands to
/cmd_vel.
Deploying to the actual Go2W robot or an onboard PC.
Prerequisite: Ensure the Unitree LiDAR SDK service is running on the robot (provides /utlidar/robot_pose).
Launch:
ros2 launch go2w_bringup go2w.launch.pyThe driver intelligently forwards velocity commands to the active locomotion controller (Legs or Wheels).
Topic: /cmd_vel (geometry_msgs/Twist)
# Move Forward 0.5 m/s
ros2 topic pub --once /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.5}}"
# Spin Left 0.5 rad/s
ros2 topic pub --once /cmd_vel geometry_msgs/msg/Twist "{angular: {z: 0.5}}"Use ROS2 Services to switch robot behaviors. See cheatsheet.md for the full list.
# Stand Up
ros2 service call /mode go2_interfaces/srv/Mode "{mode: 'stand_up'}"
# Sit Down
ros2 service call /mode go2_interfaces/srv/Mode "{mode: 'sit'}"# Switch to Trot (while moving)
ros2 service call /switch_gait go2_interfaces/srv/SwitchGait "{d: 1}"For a technical breakdown of how we ported the description from ROS1, how we mapped the 16 motors in C++, and how the mock simulation works, read the Implementation Details.
- Unitree Robotics: For the hardware, SDK2, and base ROS2 packages.
- Unitree Go2 Robot ROS2 Driver: For the original
go2_driverimplementation which served as the foundation for this work. - unitree_ros: Source for the mesh files and URDF structure.
