-
Notifications
You must be signed in to change notification settings - Fork 8
102 lines (91 loc) · 3.4 KB
/
test_ros2_jazzy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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
sudo apt install -y ros-jazzy-vision-msgs
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
mkdir moveit
cd moveit
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 . --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