Installation
Prerequisites
The legged_control2 library is written in C++. It is tested under Ubuntu 24.04 with library versions as provided in the package sources.
Source code
The source code is hosted on GitHub: qiayuanl/legged_control2.
# Clone legged_control2 git clone git@github.com:qiayuanl/legged_control2.git
Installation
Debian Source (recommended)
For Ubuntu 24.04 user, you can directly install the legged_control2 from the apt source.
Basic packages:
# Add apt source echo "deb [trusted=yes] https://github.com/qiayuanl/legged_buildfarm/raw/noble-jazzy-amd64/ ./" | sudo tee /etc/apt/sources.list.d/qiayuanl_legged_buildfarm.list echo "yaml https://github.com/qiayuanl/legged_buildfarm/raw/noble-jazzy-amd64/local.yaml jazzy" | sudo tee /etc/ros/rosdep/sources.list.d/1-qiayuanl_legged_buildfarm.list sudo apt-get update # Instsall basic packages sudo apt-get install ros-jazzy-legged-control-base
Simulation packages (Do not install in robot’s on-board computer):
# Add apt source echo "deb [trusted=yes] https://github.com/qiayuanl/simulation_buildfarm/raw/noble-jazzy-amd64/ ./" | sudo tee /etc/apt/sources.list.d/qiayuanl_simulation_buildfarm.list echo "yaml https://github.com/qiayuanl/simulation_buildfarm/raw/noble-jazzy-amd64/local.yaml jazzy" | sudo tee /etc/ros/rosdep/sources.list.d/1-qiayuanl_simulation_buildfarm.list sudo apt-get update # Install MuJoCo sudo apt install ros-jazzy-mujoco-ros2-control
Docker
For Ubuntu 18.04, 20.04 and 24.04 users, especially for Unitree on-board computers, you should use Docker.
We have pre-built Docker images for different specific robots. You can pull the image from Docker Hub. For more details, please refer to the TODO.
Build from Source
For Ubuntu 24.04 users, you can build from source.
Create a new colcon workspace:
mkdir -p ~/colcon_ws/src && cd ~/colcon_ws/src
Clone the source code:
git clone git@github.com:qiayuanl/legged_control2.git && cd ..
Install dependencies:
rosdep install --from-paths src --ignore-src -r -y
Build the workspace:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelwithDebInfo --packages-up-to legged_controllers