Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/ros-build-test.yml
Original file line number Diff line number Diff line change
@@ -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 liblcm-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 ros-one-gazebo-ros ros-one-gazebo-ros-control

- 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 -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: 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
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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 ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller
sudo apt install liburdfdom-dev liboctomap-dev libassimp-dev wget rsync curl ros-one-controller-interface ros-one-realtime-tools ros-one-joint-state-controller ros-one-imu-sensor-controller
```
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
Expand Down
Loading