2024-09-10 22:30:30 +08:00
|
|
|
# Unitree Guide Controller
|
|
|
|
|
2024-09-20 15:29:44 +08:00
|
|
|
This is a ros2-control controller based on unitree guide. The original unitree guide project could be
|
|
|
|
found [here](https://github.com/unitreerobotics/unitree_guide). I used KDL for the kinematic and dynamic calculation, so
|
|
|
|
the controller performance has difference with the original one (sometimes very unstable).
|
2024-09-10 22:30:30 +08:00
|
|
|
|
2024-09-20 17:56:00 +08:00
|
|
|
Tested environment:
|
2024-10-18 11:47:31 +08:00
|
|
|
|
2024-09-20 17:56:00 +08:00
|
|
|
* Ubuntu 24.04
|
|
|
|
* ROS2 Jazzy
|
|
|
|
* Ubuntu 22.04
|
|
|
|
* ROS2 Humble
|
|
|
|
|
2024-09-30 17:48:59 +08:00
|
|
|
[![](http://i1.hdslb.com/bfs/archive/310e6208920985ac43015b2da31c01ec15e2c5f9.jpg)](https://www.bilibili.com/video/BV1aJbAeZEuo/)
|
2024-09-20 17:56:00 +08:00
|
|
|
|
2024-09-20 15:29:44 +08:00
|
|
|
## 1. Interfaces
|
|
|
|
|
|
|
|
Required hardware interfaces:
|
|
|
|
|
|
|
|
* command:
|
|
|
|
* joint position
|
|
|
|
* joint velocity
|
|
|
|
* joint effort
|
|
|
|
* KP
|
|
|
|
* KD
|
|
|
|
* state:
|
|
|
|
* joint effort
|
|
|
|
* joint position
|
|
|
|
* joint velocity
|
|
|
|
* imu sensor
|
2024-10-18 11:47:31 +08:00
|
|
|
* linear acceleration
|
|
|
|
* angular velocity
|
|
|
|
* orientation
|
2024-09-20 15:29:44 +08:00
|
|
|
|
|
|
|
## 2. Build
|
2024-10-18 11:47:31 +08:00
|
|
|
|
2024-09-10 22:30:30 +08:00
|
|
|
```bash
|
|
|
|
cd ~/ros2_ws
|
|
|
|
colcon build --packages-up-to unitree_guide_controller
|
2024-10-18 11:47:31 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## 3. Launch
|
|
|
|
|
|
|
|
### 3.1 Mujoco Simulation
|
|
|
|
|
|
|
|
```bash
|
|
|
|
source ~/ros2_ws/install/setup.bash
|
|
|
|
ros2 launch unitree_guide_controller mujoco.launch.py pkg_description:=go2_description
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3.2 Gazebo Classic 11 (ROS2 Humble)
|
|
|
|
```bash
|
|
|
|
source ~/ros2_ws/install/setup.bash
|
|
|
|
ros2 launch unitree_guide_controller gazebo_classic.launch.py pkg_description:=go2_description
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3.3 Gazebo Harmonic (ROS2 Jazzy)
|
|
|
|
```bash
|
|
|
|
source ~/ros2_ws/install/setup.bash
|
|
|
|
ros2 launch unitree_guide_controller gazebo.launch.py pkg_description:=go2_description
|
2024-10-10 22:44:32 +08:00
|
|
|
```
|