test moveit2 only for now #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ROS2 Jazzy | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
push: | |
branches: | |
- jazzy | |
schedule: | |
- cron: '0 10 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: | |
- { python: "3.12" } | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.config.python }} | |
- name: Lint sources | |
uses: pre-commit/[email protected] | |
webots_spot: | |
name: Webots Spot with Nav2 and Moveit2 | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install ROS2 Jazzy | |
run: > | |
sudo apt update | |
sudo apt install -y software-properties-common | |
sudo add-apt-repository universe | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | |
| sudo apt-key add - | |
sudo sh -c 'echo "deb [arch=amd64,arm64] | |
http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > | |
/etc/apt/sources.list.d/ros2-latest.list' | |
sudo apt update | |
sudo apt install -y ros-jazzy-ros-base | |
python3-colcon-common-extensions ros-dev-tools | |
- name: Install Webots 2023b | |
run: | | |
sudo apt update | |
sudo apt install -y wget dialog apt-utils psmisc lsb-release git | |
sudo wget https://github.com/cyberbotics/webots/releases/download/R2023b/webots_2023b_amd64.deb -O /tmp/webots.deb | |
sudo apt install -y /tmp/webots.deb xvfb | |
- name: Create Workspace | |
run: | | |
mkdir -p ~/ros2_ws/src | |
cp -r $GITHUB_WORKSPACE/. ~/ros2_ws/src/webots_ros2_spot | |
- name: Install Webots Spot Dependencies | |
run: | | |
cd ~/ros2_ws | |
source /opt/ros/jazzy/setup.bash | |
sudo rosdep init | |
rosdep update | |
sudo apt install -y libunwind-dev # Nav2 dependency | |
rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y --skip-keys webots_ros2 --skip-keys moveit | |
vcs import --recursive src --skip-existing --input src/webots_ros2_spot/webots_ros2_spot.repos | |
chmod +x src/webots_ros2/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py | |
- name: MoveIt2 Dependencies | |
run: | | |
cd ~/ros2_ws/src | |
git clone https://github.com/moveit/moveit2.git -b main | |
for repo in moveit2/moveit2.repos $(f="moveit2/moveit2_$ROS_DISTRO.repos"; test -r $f && echo $f); do vcs import < "$repo"; done | |
rosdep install -r --from-paths moveit2 --ignore-src --rosdistro $ROS_DISTRO -y | |
- name: Build Packages | |
run: | | |
cd ~/ros2_ws | |
source /opt/ros/jazzy/setup.bash | |
colcon build --symlink-install | |
source install/setup.bash | |
- name: Test | |
run: | | |
export WEBOTS_RELEASE_VERSION=2023b-rev1 | |
export WEBOTS_OFFSCREEN=1 | |
export CI=1 | |
export DEBIAN_FRONTEND=noninteractive | |
cd ~/ros2_ws | |
source install/setup.bash | |
colcon test --ctest-args tests --packages-select webots_spot --event-handlers console_direct+ --return-code-on-test-failure |