quadruped_ros2_control/hardwares/hardware_unitree_mujoco/README.md

57 lines
1.5 KiB
Markdown
Raw Normal View History

2024-09-09 22:18:19 +08:00
# Hardware Unitree Mujoco
2024-09-20 15:29:44 +08:00
This package contains the hardware interface based on [unitree_sdk2](https://github.com/unitreerobotics/unitree_sdk2) to control the Unitree robot in Mujoco simulator.
2024-09-24 21:50:46 +08:00
In theory, it also can communicate with real robot, but it is not tested yet. You can use go2 simulation in [unitree_mujoco](https://github.com/legubiao/unitree_mujoco). In this simulation, I add foot force sensor support.
2024-09-20 15:29:44 +08:00
2025-01-16 16:56:04 +08:00
*[x] **[2025-01-16]** Add odometer states for simulation.
2024-09-24 17:13:51 +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
* linear acceleration
* angular velocity
* orientation
* foot force sensor
## 2. Build
2024-09-20 15:39:50 +08:00
Tested environment:
* Ubuntu 24.04
* ROS2 Jazzy
* Ubuntu 22.04
* ROS2 Humble
Build Command:
2024-09-09 22:18:19 +08:00
```bash
cd ~/ros2_ws
2025-03-29 10:59:00 +08:00
colcon build --packages-up-to hardware_unitree_mujoco --symlink-install
```
## 3. Config network and domain
Since the real unitree robot has different network and domain name, you need to set the network and domain name in the xacro file.
```xml
<hardware>
<plugin>hardware_unitree_mujoco/HardwareUnitree</plugin>
<param name="domain">1</param>
<param name="network_interface">lo</param>
</hardware>
```
After modified the config, you can tried to visualize the robot info from real robot by following command:
```bash
source ~/ros2_ws/install/setup.bash
ros2 launch hardware_unitree_mujoco visualize.launch.py
2024-09-09 22:18:19 +08:00
```