Skip to content

Commit

Permalink
Use get_default_storage_id
Browse files Browse the repository at this point in the history
  • Loading branch information
ymd-stella committed Jun 10, 2023
1 parent f00ffa3 commit 1379315
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<depend>tf2_msgs</depend>
<depend>tf2_ros</depend>
<depend>rosbag2_cpp</depend>
<depend>rosbag2_storage</depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
3 changes: 2 additions & 1 deletion src/run_slam_offline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace fs = ghc::filesystem;
#include <rclcpp/serialized_message.hpp>
#include <rosbag2_cpp/reader.hpp>
#include <rosbag2_cpp/readers/sequential_reader.hpp>
#include <rosbag2_storage/default_storage_id.hpp>

void tracking(const std::shared_ptr<stella_vslam_ros::system>& slam_ros,
const std::shared_ptr<stella_vslam::config>& cfg,
Expand Down Expand Up @@ -267,7 +268,7 @@ int main(int argc, char* argv[]) {
auto right_topic = op.add<popl::Value<std::string>>("", "right", "right image topic name for stereo", "camera/right/image_raw");
auto color_topic = op.add<popl::Value<std::string>>("", "color", "color image topic name for RGBD", "camera/color/image_raw");
auto depth_topic = op.add<popl::Value<std::string>>("", "depth", "depth image topic name for RGBD", "camera/depth/image_raw");
auto bag_storage_id = op.add<popl::Value<std::string>>("", "storage-id", "rosbag2 storage id (default: sqlite3)", "sqlite3");
auto bag_storage_id = op.add<popl::Value<std::string>>("", "storage-id", "rosbag2 storage id (default: " + rosbag2_storage::get_default_storage_id() + ")", rosbag2_storage::get_default_storage_id());
auto vocab_file_path = op.add<popl::Value<std::string>>("v", "vocab", "vocabulary file path");
auto setting_file_path = op.add<popl::Value<std::string>>("c", "config", "setting file path");
auto mask_img_path = op.add<popl::Value<std::string>>("", "mask", "mask image path", "");
Expand Down

0 comments on commit 1379315

Please sign in to comment.