Skip to content

fiveages-sim/unitree-ros2-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unitree ROS2 Control

This package contains the hardware interface based on unitree_sdk2 to control the Unitree robot in Mujoco simulator or real Unitree Robots supported by sdk2.

For quadruped robot simulation, please use mujoco simulation in unitree_mujoco. In this simulation, I add foot force sensor support.

1. 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
cd ~/ros2_ws
colcon build --packages-up-to unitree_ros2_control --symlink-install

3. Deploy

Since the real unitree robot has different network and domain name, you need to set the network and domain name in the xacro file. Complete ROS2-Control xacro could be found at Unitree G1 Description.

<hardware>
    <plugin>hardware_unitree_sdk2/HardwareUnitree</plugin>
    <param name="domain">1</param>
    <param name="network_interface">lo</param>
</hardware>
  • Unitree Mujoco
    source ~/ros2_ws/install/setup.bash
    ros2 launch ocs2_arm_controller demo.launch.py robot:=unitree_g1 hardware:=unitree_sim
  • Real Unitree G1
    source ~/ros2_ws/install/setup.bash
    ros2 launch ocs2_arm_controller demo.launch.py robot:=unitree_g1 type:=revo2 hardware:=unitree_real
unitree.ros2.control.mp4

About

ROS2-Control Hardware Interface based on unitree_sdk2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors