forked from stella-cv/stella_vslam
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (133 loc) · 4.89 KB
/
main.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: CI
on:
push:
branches: [ros]
pull_request:
branches: [ros]
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
with:
source: "."
exclude: "./3rd"
extensions: "h,cc"
clangFormatVersion: 6
style: file
inplace: False
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/stella_vslam-ros:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install stella_vslam
run: |
git clone -b main --depth 1 https://github.com/stella-cv/stella_vslam.git
cd stella_vslam
git submodule update -i --recursive
mkdir build
cd build
source /opt/ros/${ROS_DISTRO}/setup.bash # need to find libg2o
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j $(($(nproc) / 2))
make install
- name: build ros packages
run: |
mkdir -p /ros_ws/src
cp -r . /ros_ws/src/stella_vslam_ros
cd /ros_ws
source /opt/ros/${ROS_DISTRO}/setup.bash
catkin_make -j$(($(nproc) / 2))
- name: run run_slam (mono)
run: |
source /ros_ws/devel/setup.bash
roscore&
rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint&
rosrun tf2_ros static_transform_publisher 0 0 0 -1.57 0.0 -1.57 base_footprint cam0&
rosrun stella_vslam_ros run_slam -v /datasets/orb_vocab/orb_vocab.fbow -c stella_vslam/example/euroc/EuRoC_mono.yaml --map-db-out map_mono.msg /camera/image_raw:=/cam0/image_raw&
sleep 1
rosbag play /datasets/EuRoC/MH_04_difficult.bag
if ! pkill -0 run_slam; then exit 1; fi
pkill -SIGINT -f run_slam
while pkill -0 run_slam 2> /dev/null; do sleep 1; done
pkill -SIGINT -f static_transform_publisher
pkill -SIGINT roscore
- name: run slam (stereo)
run: |
source /ros_ws/devel/setup.bash
roscore&
rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint&
rosrun tf2_ros static_transform_publisher 0 0 0 -1.57 0.0 -1.57 base_footprint cam0&
rosrun stella_vslam_ros run_slam -r -v /datasets/orb_vocab/orb_vocab.fbow -c stella_vslam/example/euroc/EuRoC_stereo.yaml --map-db-out map_stereo.msg /camera/left/image_raw:=/cam0/image_raw /camera/right/image_raw:=/cam1/image_raw&
sleep 1
rosbag play /datasets/EuRoC/MH_04_difficult.bag
if ! pkill -0 run_slam; then exit 1; fi
pkill -SIGINT -f run_slam
while pkill -0 run_slam 2> /dev/null; do sleep 1; done
pkill -SIGINT -f static_transform_publisher
pkill -SIGINT roscore
- name: run localization
run: |
source /ros_ws/devel/setup.bash
roscore&
rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint&
rosrun tf2_ros static_transform_publisher 0 0 0 -1.57 0.0 -1.57 base_footprint cam0&
rosrun stella_vslam_ros run_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -c stella_vslam/example/euroc/EuRoC_mono.yaml --map-db-in map_mono.msg /camera/image_raw:=/cam0/image_raw&
sleep 5
rosbag play /datasets/EuRoC/MH_04_difficult.bag
pkill -SIGINT -f run_slam
pkill -SIGINT -f static_transform_publisher
pkill -SIGINT roscore
rosdep:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/ros:noetic-ros-base-with-git
env:
ROS_LOG_DIR: ${GITHUB_WORKSPACE}/.ros
steps:
- name: Checkout stella_vslam repo
uses: actions/checkout@v3
with:
repository: stella-cv/stella_vslam
path: stella_vslam
submodules: recursive
- name: install stella_vslam
run: |
cd stella_vslam
rosdep update
apt update
rosdep install -y -i --from-paths .
mkdir build
cd build
source /opt/ros/${ROS_DISTRO}/setup.bash # need to find libg2o
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j $(($(nproc) / 2))
make install
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies for stella_vslam_ros
run: |
mkdir -p /ros_ws/src
cp -r . /ros_ws/src/stella_vslam_ros
cd /ros_ws
rosdep update
apt update
rosdep install -y -i --from-paths src --skip-keys=stella_vslam
- name: build stella_vslam_ros
run: |
cd /ros_ws
source /opt/ros/${ROS_DISTRO}/setup.bash
catkin_make -j$(($(nproc) / 2))