Skip to content

Crazyswarm2 test 🐝 #169

Crazyswarm2 test 🐝

Crazyswarm2 test 🐝 #169

name: Crazyswarm2 test 🐝
# Controls when the action will run.
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *'
jobs:
cs2_at_crazylab:
runs-on: [self-hosted, linux]
timeout-minutes: 10
container:
image: ros:humble
options: --privileged
env:
CRAZY_SITE: crazylab-malmö
steps:
- name: Check out github source
uses: actions/checkout@v4
- name: Install Crazyswarm dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt install -y git swig libpython3-dev python3-numpy \
python3-yaml python3-matplotlib python3-pytest python3-scipy \
libpcl-dev libusb-1.0-0-dev sdcc gcc-arm-none-eabi \
curl python3-toml python3-pip
pip3 install rowan cflib transforms3d ruamel.yaml
DEBIAN_FRONTEND=noninteractive apt install -y ros-humble-motion-capture-tracking \
ros-humble-joy
DEBIAN_FRONTEND=noninteractive apt install -y uhubctl
- name: Clone Crazyswarm2 sources
run: |
mkdir -p ros2_ws/src
cd ros2_ws/src
rm -rf crazyswarm2 motion_capture_tracking
git clone https://github.com/IMRCLab/crazyswarm2.git --recursive
- name: Build Crazyswarm2
run: |
source /opt/ros/humble/setup.bash
cd ros2_ws
rm -rf install/ log/ build/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
shell: bash
- name: Reset power to all devices
run: python3 management/usb-power-reset.py -a reset
- name: Run Crazyswarm2 Server
run: |
source /opt/ros/humble/setup.bash
ls
source ros2_ws/install/setup.bash
ros2 launch swarms/cs2-test-yamls/launch.py
shell: bash