quadruped_ros2_control/descriptions/unitree/go2_description/README.md

84 lines
2.0 KiB
Markdown
Raw Normal View History

2024-09-09 22:18:19 +08:00
# Unitree Go2 Description
2024-10-10 22:44:32 +08:00
2024-09-09 22:18:19 +08:00
This repository contains the urdf model of go2.
2024-10-01 13:48:49 +08:00
![go2](../../../.images/go2.png)
2024-09-30 20:02:56 +08:00
2024-09-20 15:39:50 +08:00
Tested environment:
2024-10-10 22:44:32 +08:00
2024-09-20 15:39:50 +08:00
* Ubuntu 24.04
2024-10-10 22:44:32 +08:00
* ROS2 Jazzy
2024-09-20 15:39:50 +08:00
* Ubuntu 22.04
2024-10-10 22:44:32 +08:00
* ROS2 Humble
2024-09-09 22:18:19 +08:00
## Build
2024-10-10 22:44:32 +08:00
2024-09-09 22:18:19 +08:00
```bash
cd ~/ros2_ws
2024-10-10 10:23:54 +08:00
colcon build --packages-up-to go2_description --symlink-install
2024-09-09 22:18:19 +08:00
```
## Visualize the robot
2024-10-10 22:44:32 +08:00
2024-09-09 22:18:19 +08:00
To visualize and check the configuration of the robot in rviz, simply launch:
2024-10-10 22:44:32 +08:00
2024-09-09 22:18:19 +08:00
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch go2_description visualize.launch.py
```
2024-09-25 21:01:50 +08:00
## Launch ROS2 Control
2024-10-10 22:44:32 +08:00
2024-10-10 10:23:54 +08:00
### Mujoco Simulator
2024-10-10 22:44:32 +08:00
2024-09-25 21:01:50 +08:00
* Unitree Guide Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch unitree_guide_controller mujoco.launch.py
2024-09-25 21:01:50 +08:00
```
* OCS2 Quadruped Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch go2_description ocs2_control.launch.py
```
2024-10-10 21:22:58 +08:00
* RL Quadruped Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch go2_description rl_control.launch.py
```
2024-10-10 22:44:32 +08:00
### Gazebo Classic 11 (ROS2 Humble)
* Unitree Guide Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch unitree_guide_controller gazebo_classic.launch.py
```
### Gazebo Harmonic (ROS2 Jazzy)
2024-10-10 22:44:32 +08:00
2024-10-10 10:23:54 +08:00
* Unitree Guide Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch unitree_guide_controller gazebo.launch.py
2024-10-10 10:23:54 +08:00
```
2024-10-10 21:22:58 +08:00
* RL Quadruped Controller
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch go2_description gazebo_rl_control.launch.py
```
2024-10-10 22:44:32 +08:00
## When used for isaac gym or other similiar engine
2024-09-09 22:18:19 +08:00
Collision parameters in urdf can be amended to better train the robot:
Open "go2_description.urdf" in "./go2_description/urdf",
and amend the ` box size="0.213 0.0245 0.034" ` in links of "FL_thigh", "FR_thigh", "RL_thigh", "RR_thigh".
2024-10-10 22:44:32 +08:00
For example, change previous values to ` box size="0.11 0.0245 0.034" ` means the length of the thigh is shortened from
0.213 to 0.11, which can avoid unnecessary collision between the thigh link and the calf link.
2024-09-09 22:18:19 +08:00
2024-10-10 22:44:32 +08:00
The collision model before and after the above amendment are shown as "Normal_collision_model.png" and "
Amended_collision_model.png" respectively.
2024-09-09 22:18:19 +08:00