Skip to content

Refactored the ai worker controllers #21

Refactored the ai worker controllers

Refactored the ai worker controllers #21

Workflow file for this run

# The name of the workflow
name: CI
# Specifies the events that trigger the workflow
on:
push:
branches: [ jazzy, main ]
pull_request:
branches: [ jazzy, main ]
# Defines a set of jobs to be run as part of the workflow
jobs:
# The name of the job
ROS_CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ros_distribution:
# - humble
- jazzy
# - rolling
include:
# ROS 2 Humble Hawksbill
# - docker_image: ubuntu:jammy
# ros_distribution: humble
# ros_version: 2
# ROS 2 Jazzy Jalisco
- docker_image: ubuntu:noble
ros_distribution: jazzy
ros_version: 2
# ROS 2 Rolling Ridley
- docker_image: ubuntu:noble
ros_distribution: rolling
ros_version: 2
container:
image: ${{ matrix.docker_image }}
steps:
- name: Setup workspace
run: mkdir -p ros_ws/src
- name: Checkout code
uses: actions/checkout@v4
with:
path: ros_ws/src
- name: Setup ROS environment
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Install OSQP and OsqpEigen
shell: bash
run: |
set -e
apt-get update
apt-get install -y --no-install-recommends git cmake build-essential pkg-config
git clone --depth 1 https://github.com/osqp/osqp.git /tmp/osqp
cmake -S /tmp/osqp -B /tmp/osqp/build -G "Unix Makefiles"
cmake --build /tmp/osqp/build
cmake --build /tmp/osqp/build --target install
git clone --depth 1 https://github.com/robotology/osqp-eigen.git /tmp/osqp-eigen
cmake -S /tmp/osqp-eigen -B /tmp/osqp-eigen/build -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build /tmp/osqp-eigen/build
cmake --build /tmp/osqp-eigen/build --target install
- name: Check and Install ROS dependencies
shell: bash
run: |
set -e
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
echo "--- Updating rosdep definitions ---"
rosdep update
echo "--- Installing system dependencies for ROS 2 ${{ matrix.ros_distribution }} ---"
rosdep install --from-paths ros_ws/src --ignore-src -y -r --rosdistro ${{ matrix.ros_distribution }} --skip-keys "osqp-eigen robotis_interfaces"
echo "--- Performing rosdep check for ROS 2 ${{ matrix.ros_distribution }} ---"
if rosdep check --from-paths ros_ws/src --ignore-src --rosdistro ${{ matrix.ros_distribution }} --skip-keys "osqp-eigen robotis_interfaces"; then
echo "--- rosdep check passed ---"
else
echo "--- rosdep check failed: Missing system dependencies or unresolvable keys. ---"
exit 1
fi
- name: Build and Test
env:
CMAKE_PREFIX_PATH: /usr/local:${{ env.CMAKE_PREFIX_PATH }}
OsqpEigen_DIR: /usr/local/lib/cmake/OsqpEigen
LD_LIBRARY_PATH: /usr/local/lib:${{ env.LD_LIBRARY_PATH }}
uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_motion_controller/${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}/robotis_motion_controller_ci.repos"
package-name: |
motion_controller
motion_controller_core
motion_controller_models
motion_controller_ros
motion_controller_ros_py
rosdep-skip-keys: osqp-eigen
no-symlink-install: true