Skip to content

Merged in feature/ocs2_anymal_perception (pull request #690) #39

Merged in feature/ocs2_anymal_perception (pull request #690)

Merged in feature/ocs2_anymal_perception (pull request #690) #39

name: Build and Test OCS2
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
# build both Debug and Release mode
strategy:
fail-fast: false
matrix:
build_type: [ Debug, Release ]
# environment: regular Ubuntu with a vanilla ROS container
runs-on: ubuntu-latest
container:
image: ros:noetic
steps:
- name: Environment Info
run: |
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
- uses: actions/checkout@v2
with:
path: src/ocs2
- name: Rosdep
run: |
rosdep update
rosdep install --from-paths src --ignore-src -r -y
- name: Checkout dependencies
run: |
git clone --recurse-submodules https://github.com/leggedrobotics/pinocchio.git src/pinocchio
git clone --recurse-submodules https://github.com/leggedrobotics/hpp-fcl.git src/hpp-fcl
git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git src/ocs2_robotic_assets
- name: Install RaiSim
run: |
git clone --depth 1 https://github.com/raisimTech/raisimLib.git -b v1.1.01 src/raisim_tech
cd src/raisim_tech
mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
make -j4 && checkinstall
- name: Install ONNX Runtime
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz -P tmp/microsoft
tar xf tmp/microsoft/onnxruntime-linux-x64-1.7.0.tgz -C tmp/microsoft
rsync -a tmp/microsoft/onnxruntime-linux-x64-1.7.0/include/ /usr/local/include/onnxruntime
rsync -a tmp/microsoft/onnxruntime-linux-x64-1.7.0/lib/ /usr/local/lib
rsync -a src/ocs2/ocs2_mpcnet/ocs2_mpcnet_core/misc/onnxruntime/cmake/ /usr/local/share/onnxruntime
- name: Build (${{ matrix.build_type }})
shell: bash
run: |
source /opt/ros/noetic/setup.bash
catkin_make_isolated --use-ninja --merge --only-pkg-with-deps ocs2 --cmake-args -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Test
shell: bash
run: |
source devel_isolated/setup.bash
catkin_make_isolated --use-ninja --merge --only-pkg-with-deps ocs2 --catkin-make-args run_tests
catkin_test_results