Skip to content

Add parameter ros_map_to_cv_map_frame #357

Add parameter ros_map_to_cv_map_frame

Add parameter ros_map_to_cv_map_frame #357

Workflow file for this run

name: CI
on:
push:
branches: [ros2]
pull_request:
branches: [ros2]
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.12
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-ros2:humble
env:
ROS_LOG_DIR: ${GITHUB_WORKSPACE}/.ros
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build ros2 packages
run: |
mkdir -p /ros_ws/src
cp -r . /ros_ws/src/stella_vslam_ros
cd /ros_ws/src
git clone -b main --depth 1 https://github.com/stella-cv/stella_vslam.git
cd stella_vslam
git submodule update -i --recursive
cd ../..
export MAKEFLAGS="-j $(($(nproc) / 2))"
(source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --parallel-workers 1)
- name: convert rosbag
run: |
rosbags-convert --dst ./MH_04_difficult /datasets/EuRoC/MH_04_difficult.bag
- name: run run_slam (mono)
run: |
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 -1.57 0 0 -1.57 base_footprint cam0)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && source /ros_ws/install/setup.bash && ros2 run stella_vslam_ros run_slam -v /datasets/orb_vocab/orb_vocab.fbow -c /ros_ws/src/stella_vslam/example/euroc/EuRoC_mono.yaml --map-db-out map_mono.msg --ros-args -r /camera/image_raw:=/cam0/image_raw)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 bag play MH_04_difficult)
sleep 1
if ! pkill -0 run_slam; then exit 1; fi
echo "pkill -SIGINT -f run_slam"
pkill -SIGINT -f run_slam
while pkill -0 run_slam 2> /dev/null; do sleep 1; done
pkill -SIGINT -f static_transform_publisher
- name: run slam (stereo)
run: |
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 -1.57 0 0 -1.57 base_footprint cam0)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && source /ros_ws/install/setup.bash && ros2 run stella_vslam_ros run_slam -r -v /datasets/orb_vocab/orb_vocab.fbow -c /ros_ws/src/stella_vslam/example/euroc/EuRoC_stereo.yaml --map-db-out map_stereo.msg --ros-args -r /camera/left/image_raw:=/cam0/image_raw -r /camera/right/image_raw:=/cam1/image_raw)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 bag play MH_04_difficult)
sleep 1
if ! pkill -0 run_slam; then exit 1; fi
echo "pkill -SIGINT -f run_slam"
pkill -SIGINT -f run_slam
while pkill -0 run_slam 2> /dev/null; do sleep 1; done
pkill -SIGINT -f static_transform_publisher
- name: run localization
run: |
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 odom base_footprint)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 run tf2_ros static_transform_publisher 0 0 0 -1.57 0 -1.57 base_footprint cam0)&
(source /opt/ros/${ROS_DISTRO}/setup.bash && source /ros_ws/install/setup.bash && ros2 run stella_vslam_ros run_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -c /ros_ws/src/stella_vslam/example/euroc/EuRoC_mono.yaml --map-db-in map_mono.msg --ros-args -r /camera/image_raw:=/cam0/image_raw)&
sleep 5
(source /opt/ros/${ROS_DISTRO}/setup.bash && ros2 bag play MH_04_difficult)
pkill -SIGINT -f run_slam
pkill -SIGINT -f static_transform_publisher
- name: run slam offline (stereo)
run: |
(source /opt/ros/${ROS_DISTRO}/setup.bash && source /ros_ws/install/setup.bash && ros2 run stella_vslam_ros run_slam_offline -b MH_04_difficult -r -v /datasets/orb_vocab/orb_vocab.fbow -c /ros_ws/src/stella_vslam/example/euroc/EuRoC_stereo.yaml --map-db-out map_stereo.msg --left=/cam0/image_raw --right=/cam1/image_raw --ros-args -p publish_tf:=false)
rosdep:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/ros:humble-ros-base
env:
ROS_LOG_DIR: ${GITHUB_WORKSPACE}/.ros
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build ros2 packages
run: |
mkdir -p /ros_ws/src
cp -r . /ros_ws/src/stella_vslam_ros
cd /ros_ws/src
git clone --depth 1 https://github.com/stella-cv/stella_vslam.git
cd stella_vslam
git submodule update -i --recursive
cd ../..
rosdep update
apt update
rosdep install -y -i --from-paths src
export MAKEFLAGS="-j $(($(nproc) / 2))"
(source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --parallel-workers 1)