unitree_ros_to_real/README.md

56 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2023-03-23 19:39:46 +08:00
Packages Version: v3.8.4
2021-09-01 20:58:06 +08:00
# Introduction
This package can send control command to real robot from ROS. You can do low-level control(namely control all joints on robot) and high-level control(namely control the walking direction and speed of robot).
2023-03-23 19:39:46 +08:00
This version is suitable for unitree_legged_sdk v3.8.4, namely Aliengo robot.
2021-09-01 20:58:06 +08:00
## Packages:
Basic message function: `unitree_legged_msgs`
The interface between ROS and real robot: `unitree_legged_real`
2022-05-24 16:05:24 +08:00
## Environment
2023-01-17 15:35:00 +08:00
We recommand users to run this package in Ubuntu 20.04 and ROS neotic environment
2022-05-24 16:05:24 +08:00
2023-01-17 15:41:41 +08:00
## Dependency
* [unitree_legged_sdk](https://github.com/unitreerobotics/unitree_legged_sdk/releases)
### Notice
2023-03-23 19:39:46 +08:00
The release [v3.8.4](https://github.com/unitreerobotics/unitree_legged_sdk/releases/tag/v3.8.4) only supports for robot: Aliengo.
2021-09-01 20:58:06 +08:00
# Build
2023-01-17 15:35:00 +08:00
You can use catkin_make to build ROS packages. First copy the package folder to `~/catkin_ws/src`, then download the corresponding unitree_legged_sdk into `~/catkin_ws/src/unitree_ros_to_real`.Be careful with the sdk folder name. It should be "unitree_legged_sdk" without version tag:
2021-09-01 20:58:06 +08:00
```
cd ~/catkin_ws
catkin_make
```
# Run the package
2023-03-23 19:39:46 +08:00
You can control your real Aliengo robot from ROS by this package.
2021-09-01 20:58:06 +08:00
2023-01-17 15:35:00 +08:00
Before you run expamle program, please run
2022-05-24 16:05:24 +08:00
2021-09-01 20:58:06 +08:00
```
2021-09-02 18:27:42 +08:00
roslaunch unitree_legged_real real.launch ctrl_level:=highlevel
2021-09-01 20:58:06 +08:00
```
2022-05-24 16:05:24 +08:00
or
```
roslaunch unitree_legged_real real.launch ctrl_level:=lowlevel
```
It depends which control mode you want to use.
2023-01-17 15:35:00 +08:00
Then, if you want to run high-level control mode, you can run example_walk node
2022-05-24 16:05:24 +08:00
```
rosrun unitree_legged_real example_walk
```
2021-09-01 20:58:06 +08:00
2023-01-17 15:35:00 +08:00
If you want to run low-level control mode, you can run example_position program node
2021-09-01 20:58:06 +08:00
```
2023-03-23 19:39:46 +08:00
rosrun unitree_legged_real example_position
2021-09-01 20:58:06 +08:00
```
2022-05-24 16:05:24 +08:00
And before you do the low-level control, please press L2+A to sit the robot down and then press L1+L2+start to make the robot into
2023-01-17 15:35:00 +08:00
mode in which you can do low-level control, finally make sure you hang the robot up before you run low-level control.