Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

set(dependencies
ament_index_cpp
brain_box_msgs
builtin_interfaces
camera_info_manager
Expand Down Expand Up @@ -143,6 +144,9 @@ install(DIRECTORY include/
install(DIRECTORY launch/
DESTINATION share/${PROJECT_NAME}
)
install(DIRECTORY config
DESTINATION share/${PROJECT_NAME}
)
install(
TARGETS am_utils
EXPORT am_utilsTargets
Expand Down
4 changes: 4 additions & 0 deletions config/mcap_writer_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
compression: "Zstd"
compressionLevel: "Fastest"
chunkSize: 786432
noChunkCRC: true
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<depend>rosbag2</depend>
<depend>rosbag2_cpp</depend>
<depend>rosbag2_storage</depend>
<depend>rosbag2_storage_mcap</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>
<depend>stereo_msgs</depend>
Expand All @@ -36,6 +37,7 @@
<depend>tf2_ros</depend>
<depend>visualization_msgs</depend>
<depend>cv_bridge</depend>
<depend>ament_index_cpp</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
2 changes: 2 additions & 0 deletions src/vb_util_lib/bag_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ void BagLogger::startLogging(std::string prefix, unsigned log_level)

rosbag2_storage::StorageOptions storage_options;
storage_options.uri = /*std::string("sqlite:///") +*/ file_name_;
storage_options.storage_id = "mcap";
storage_options.storage_config_uri = ament_index_cpp::get_package_share_directory("am_utils") + "/config/mcap_writer_options.yaml";
writer_ = std::make_unique<rosbag2_cpp::Writer>();
writer_->open(storage_options);
printf("Opening bag file %s\n", file_name_.c_str());
Expand Down
Loading