quadruped_ros2_control/controllers/rl_quadruped_controller
Huang Zhenbiao 6e2b77a5c8 fix rl controller problem at gazebo 2025-03-31 19:22:29 +08:00
..
include/rl_quadruped_controller add real go2 test 2025-03-30 11:04:48 +08:00
launch simplified structure for rl controller 2025-03-03 23:37:42 +08:00
src fix rl controller problem at gazebo 2025-03-31 19:22:29 +08:00
CMakeLists.txt simplified structure for rl controller 2025-03-03 23:37:42 +08:00
README.md fix rl controller problem at gazebo 2025-03-31 19:22:29 +08:00
package.xml simplified structure for rl controller 2025-03-03 23:37:42 +08:00
rl_quadruped_controller.xml tried go2 rl control but failed 2024-10-10 21:22:58 +08:00

README.md

RL Quadruped Controller

This repository contains the reinforcement learning based controllers for the quadruped robot.

Tested environment:

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

2. Build

2.1 Installing libtorch

You can also choose libtorch with cuda. Just remember to download for c++ 11 ABI version. The position to place libtorch is also not fixed, just need to config the .bashrc.

cd ~/CLionProjects/
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.5.0%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.5.0+cpu.zip
cd ~
rm -rf libtorch-cxx11-abi-shared-with-deps-2.5.0+cpu.zip
echo 'export Torch_DIR=~/libtorch' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/libtorch/lib' >> ~/.bashrc

2.2 Build Controller

cd ~/ros2_ws
colcon build --packages-up-to rl_quadruped_controller --symlink-install

3. Launch

3.1 Mujoco Simulation

Warm Reminder: You need to launch Unitree Mujoco C++ Simulation before launch the controller.

source ~/ros2_ws/install/setup.bash
ros2 launch rl_quadruped_controller mujoco.launch.py pkg_description:=go2_description

3.2 Gazebo Classic 11 (ROS2 Humble)

source ~/ros2_ws/install/setup.bash
ros2 launch rl_quadruped_controller gazebo_classic.launch.py pkg_description:=a1_description

3.3 Gazebo Harmonic (ROS2 Jazzy)

source ~/ros2_ws/install/setup.bash
ros2 launch rl_quadruped_controller gazebo.launch.py pkg_description:=go2_description