quadruped_ros2_control/controllers/rl_quadruped_controller/README.md

1.1 KiB

RL Quadruped Controller

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

Tested environment:

  • Ubuntu 24.04
    • ROS2 Jazzy

2. Build

2.1 Installing libtorch

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

2.2 Build Controller

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

3. Launch

3.1 Mujoco Simulation

source ~/ros2_ws/install/setup.bash
ros2 launch rl_quadruped_controller mujoco.launch.py pkg_description:=go2_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