From 14273820d5e3515defdf585285393e0e2d3e11e6 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 12:18:49 +0100 Subject: [PATCH 1/7] first iter for ubuntu 24 ROS One CI --- .github/workflows/ros-build-test.yml | 75 ++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/ros-build-test.yml diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml new file mode 100644 index 00000000..b3977458 --- /dev/null +++ b/.github/workflows/ros-build-test.yml @@ -0,0 +1,75 @@ +name: Build and Test legged control + +on: + push: + branches: [ ubuntu24-ci ] + pull_request: + branches: [ ros-one-devel ] + +jobs: + build: + + strategy: + fail-fast: false + + runs-on: ubuntu-24.04 + container: + image: ubuntu:24.04 + + steps: + - name: Environment Info + run: | + apt-get update + apt-get install -y lsb-release + pwd + uname -r + lsb_release -a + + - name: System deps + run: | + apt-get update + apt-get install -y git ninja-build liburdfdom-dev liboctomap-dev libassimp-dev checkinstall wget rsync curl + + - name: ROS One installation + run: | + curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros1.list + apt-get update + apt-get install -y python3-rosdep python3-catkin-tools + rosdep init + echo "yaml https://ros.packages.techfak.net/ros-one.yaml one" | tee /etc/ros/rosdep/sources.list.d/1-ros-one.list + rosdep update + apt-get install -y ros-one-desktop + apt-get install -y ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller + + - name: Pinocchio from robotpkg + run: | + curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc | tee /etc/apt/keyrings/robotpkg.asc + echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/robotpkg.asc] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" | tee /etc/apt/sources.list.d/robotpkg.list + apt-get update + apt-get install -y robotpkg-coal robotpkg-pinocchio + echo "CMAKE_PREFIX_PATH=/opt/openrobots:${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - name: Checkout dependencies + run: | + git clone git@github.com:idra-lab/ocs2.git src/ocs2 + git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git src/ocs2_robotic_assets + + - uses: actions/checkout@v4 + with: + ref: ros-one-devel + path: src/legged_control + + - name: Rosdep + run: | + rosdep update + rosdep install --from-paths src --ignore-src -r -y + + - name: Build Release + shell: bash + run: | + source /opt/ros/one/setup.bash + catkin init + catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release + catkin build legged_controllers legged_unitree_description legged_gazebo legged_unitree_hw From fd723dbbaaca8af34c11822894a1c1bf2b55ba73 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 12:28:36 +0100 Subject: [PATCH 2/7] use https and specify correct branch --- .github/workflows/ros-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml index b3977458..3a68881c 100644 --- a/.github/workflows/ros-build-test.yml +++ b/.github/workflows/ros-build-test.yml @@ -53,7 +53,7 @@ jobs: - name: Checkout dependencies run: | - git clone git@github.com:idra-lab/ocs2.git src/ocs2 + git clone -b ros-one-devel https://github.com/idra-lab/ocs2.git git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git src/ocs2_robotic_assets - uses: actions/checkout@v4 From dfec9e155fa4ece04727c4cb909212113f300c99 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 12:46:24 +0100 Subject: [PATCH 3/7] fix working directory --- .github/workflows/ros-build-test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml index 3a68881c..ab9d527f 100644 --- a/.github/workflows/ros-build-test.yml +++ b/.github/workflows/ros-build-test.yml @@ -51,23 +51,27 @@ jobs: echo "CMAKE_PREFIX_PATH=/opt/openrobots:${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + - name: Create workspace + run: mkdir -p legged_ws/src + - name: Checkout dependencies run: | - git clone -b ros-one-devel https://github.com/idra-lab/ocs2.git - git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git src/ocs2_robotic_assets + git clone -b ros-one-devel https://github.com/idra-lab/ocs2.git legged_ws/src/ocs2 + git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git legged_ws/src/ocs2_robotic_assets - uses: actions/checkout@v4 with: ref: ros-one-devel - path: src/legged_control + path: legged_ws/src/legged_control - name: Rosdep run: | rosdep update - rosdep install --from-paths src --ignore-src -r -y + rosdep install --from-paths legged_ws/src --ignore-src -r -y - name: Build Release shell: bash + working-directory: legged_ws run: | source /opt/ros/one/setup.bash catkin init From bfeacf49d34cd359c3478a7d917d61da5ed2ac4f Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 12:58:24 +0100 Subject: [PATCH 4/7] add gazebo dep --- .github/workflows/ros-build-test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml index ab9d527f..b1814394 100644 --- a/.github/workflows/ros-build-test.yml +++ b/.github/workflows/ros-build-test.yml @@ -40,7 +40,7 @@ jobs: echo "yaml https://ros.packages.techfak.net/ros-one.yaml one" | tee /etc/ros/rosdep/sources.list.d/1-ros-one.list rosdep update apt-get install -y ros-one-desktop - apt-get install -y ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller + apt-get install -y ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller ros-one-gazebo-ros - name: Pinocchio from robotpkg run: | @@ -51,27 +51,23 @@ jobs: echo "CMAKE_PREFIX_PATH=/opt/openrobots:${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV - - name: Create workspace - run: mkdir -p legged_ws/src - - name: Checkout dependencies run: | - git clone -b ros-one-devel https://github.com/idra-lab/ocs2.git legged_ws/src/ocs2 - git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git legged_ws/src/ocs2_robotic_assets + git clone -b ros-one-devel https://github.com/idra-lab/ocs2.git src/ocs2 + git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git src/ocs2_robotic_assets - uses: actions/checkout@v4 with: ref: ros-one-devel - path: legged_ws/src/legged_control + path: src/legged_control - name: Rosdep run: | rosdep update - rosdep install --from-paths legged_ws/src --ignore-src -r -y + rosdep install --from-paths src --ignore-src -r -y - name: Build Release shell: bash - working-directory: legged_ws run: | source /opt/ros/one/setup.bash catkin init From 7618dec822be8138662b83739ead6a51f83f3d51 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 13:06:22 +0100 Subject: [PATCH 5/7] add gazebo ros control dep --- .github/workflows/ros-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml index b1814394..41098459 100644 --- a/.github/workflows/ros-build-test.yml +++ b/.github/workflows/ros-build-test.yml @@ -40,7 +40,7 @@ jobs: echo "yaml https://ros.packages.techfak.net/ros-one.yaml one" | tee /etc/ros/rosdep/sources.list.d/1-ros-one.list rosdep update apt-get install -y ros-one-desktop - apt-get install -y ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller ros-one-gazebo-ros + apt-get install -y ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller ros-one-gazebo-ros ros-one-gazebo-ros-control - name: Pinocchio from robotpkg run: | From eb490c63a3a0ea2fb11cafde9022d8217117d775 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 13:17:41 +0100 Subject: [PATCH 6/7] add lcm dep --- .github/workflows/ros-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ros-build-test.yml b/.github/workflows/ros-build-test.yml index 41098459..cf6d3320 100644 --- a/.github/workflows/ros-build-test.yml +++ b/.github/workflows/ros-build-test.yml @@ -28,7 +28,7 @@ jobs: - name: System deps run: | apt-get update - apt-get install -y git ninja-build liburdfdom-dev liboctomap-dev libassimp-dev checkinstall wget rsync curl + apt-get install -y git ninja-build liburdfdom-dev liboctomap-dev libassimp-dev liblcm-dev checkinstall wget rsync curl - name: ROS One installation run: | From 981e0a295a6e46ee293023b44ae81a95e044fad0 Mon Sep 17 00:00:00 2001 From: Gianni Lunardi Date: Wed, 18 Mar 2026 15:44:34 +0100 Subject: [PATCH 7/7] update instructions for ROS One --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index eb4d14be..be867a74 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # legged_control -> [!NOTE] -> You might be interested in this pipeline with perception, check [legged_perceptive](https://github.com/qiayuanl/legged_perceptive). +Code targeting [ROS One](https://ros.packages.techfak.net/) on Ubuntu 24.04 ## Publications @@ -41,13 +40,19 @@ https://user-images.githubusercontent.com/21256355/192135828-8fa7d9bb-9b4d-41f9- ## Installation +### ROS One +Follow the instructions on the [link](https://ros.packages.techfak.net/) to install `ros-one-desktop`, then add the following additional packages: +``` +sudo apt install ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller ros-one-gazebo-ros ros-one-gazebo-ros-control +``` + ### Source code -The source code is hosted on GitHub: [qiayuanliao/legged_control](https://github.com/qiayuanliao/legged_control). +The source code is hosted on GitHub: ``` -# Clone legged_control -git clone git@github.com:qiayuanliao/legged_control.git +# Clone legged_control on your ros_ws folder +git clone https://github.com/idra-lab/legged_control.git ``` ### OCS2 @@ -56,19 +61,19 @@ OCS2 is a large monorepo; **DO NOT** try to compile the whole repo. You only nee its dependencies following the step below. 1. Install `pinocchio` and `coal` (formerly known as `hpp-fcl`) from robotpkg, following [these instructions to add the robotpkg PPA](https://stack-of-tasks.github.io/pinocchio/download.html) -``` -sudo apt install robotpkg-pinocchio robotpkg-coal -``` -The tested Pinocchio version is 3.9, which comes as default for Ubuntu 24.04 + ``` + sudo apt install robotpkg-pinocchio robotpkg-coal + ``` + The tested Pinocchio version is 3.9, which comes as default for Ubuntu 24.04 2. Install extra dependencies: ``` - sudo apt install liburdfdom-dev liboctomap-dev libassimp-dev + sudo apt install liburdfdom-dev liboctomap-dev libassimp-dev liblcm-dev checkinstall wget rsync curl ``` 3. Clone OCS2 and the robotic assets. ``` # Clone OCS2 - git clone git@github.com:idra-lab/ocs2.git + git clone https://github.com/idra-lab/ocs2.git # Clone ocs2_robotic_assets git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git