diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f930f43..82a2f5f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: run: shell: bash container: - image: ghcr.io/ymd-stella/stella-cv/stella_vslam-ros2:humble + image: ghcr.io/ymd-stella/stella-cv/stella_vslam-ros2:iron env: ROS_LOG_DIR: ${GITHUB_WORKSPACE}/.ros steps: @@ -84,7 +84,7 @@ jobs: 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)& + (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 @@ -92,7 +92,7 @@ jobs: run: shell: bash container: - image: ghcr.io/ymd-stella/stella-cv/ros:humble-ros-base + image: ghcr.io/ymd-stella/stella-cv/ros:iron-ros-base env: ROS_LOG_DIR: ${GITHUB_WORKSPACE}/.ros steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e8861b..3b28aaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,7 @@ find_package(tf2_geometry_msgs REQUIRED) find_package(tf2_msgs REQUIRED) find_package(tf2_ros REQUIRED) find_package(rosbag2_cpp REQUIRED) +find_package(rosbag2_storage REQUIRED) # thread library find_package(Threads REQUIRED) diff --git a/package.xml b/package.xml index e20b677..8a0c5b2 100644 --- a/package.xml +++ b/package.xml @@ -33,6 +33,7 @@ tf2_msgs tf2_ros rosbag2_cpp + rosbag2_storage ament_cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index afdb082..62dbf5d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,8 @@ foreach(EXECUTABLE_TARGET IN LISTS EXECUTABLE_TARGETS) tf2_geometry_msgs tf2_msgs tf2_ros - rosbag2_cpp) + rosbag2_cpp + rosbag2_storage) install(TARGETS ${EXECUTABLE_TARGET} DESTINATION lib/${PROJECT_NAME}) diff --git a/src/run_slam_offline.cc b/src/run_slam_offline.cc index c818e61..01ef41d 100644 --- a/src/run_slam_offline.cc +++ b/src/run_slam_offline.cc @@ -36,6 +36,7 @@ namespace fs = ghc::filesystem; #include #include #include +#include void tracking(const std::shared_ptr& slam_ros, const std::shared_ptr& cfg, @@ -267,7 +268,7 @@ int main(int argc, char* argv[]) { auto right_topic = op.add>("", "right", "right image topic name for stereo", "camera/right/image_raw"); auto color_topic = op.add>("", "color", "color image topic name for RGBD", "camera/color/image_raw"); auto depth_topic = op.add>("", "depth", "depth image topic name for RGBD", "camera/depth/image_raw"); - auto bag_storage_id = op.add>("", "storage-id", "rosbag2 storage id (default: sqlite3)", "sqlite3"); + auto bag_storage_id = op.add>("", "storage-id", "rosbag2 storage id (default: " + rosbag2_storage::get_default_storage_id() + ")", rosbag2_storage::get_default_storage_id()); auto vocab_file_path = op.add>("v", "vocab", "vocabulary file path"); auto setting_file_path = op.add>("c", "config", "setting file path"); auto mask_img_path = op.add>("", "mask", "mask image path", "");