quadruped_ros2_control/hardwares/hardware_unitree_mujoco
Huang Zhenbiao 30e1dd627b add real go2 test 2025-03-30 11:04:48 +08:00
..
include/hardware_unitree_mujoco add real go2 test 2025-03-30 11:04:48 +08:00
launch add unitree hardware network config 2025-03-29 10:59:00 +08:00
src add real go2 test 2025-03-30 11:04:48 +08:00
CMakeLists.txt add unitree hardware network config 2025-03-29 10:59:00 +08:00
HardwareUnitree.xml init commit 2024-09-09 22:18:19 +08:00
README.md add unitree hardware network config 2025-03-29 10:59:00 +08:00
package.xml add and tested lidar simulation 2025-02-27 10:09:12 +08:00

README.md

Hardware Unitree Mujoco

This package contains the hardware interface based on unitree_sdk2 to control the Unitree robot in Mujoco simulator.

In theory, it also can communicate with real robot, but it is not tested yet. You can use go2 simulation in unitree_mujoco. In this simulation, I add foot force sensor support.

*[x] [2025-01-16] Add odometer states for simulation.

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

Tested environment:

  • Ubuntu 24.04
    • ROS2 Jazzy
  • Ubuntu 22.04
    • ROS2 Humble

Build Command:

cd ~/ros2_ws
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.

<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:

source ~/ros2_ws/install/setup.bash
ros2 launch hardware_unitree_mujoco visualize.launch.py