@@ -229,7 +229,8 @@ PYBIND11_MODULE(_storage, m) {
229229 std::vector<rosbag2_storage::TopicInformation> topics_with_message_count,
230230 std::string compression_format,
231231 std::string compression_mode,
232- std::unordered_map<std::string, std::string> custom_data)
232+ std::unordered_map<std::string, std::string> custom_data,
233+ std::string ros_distro)
233234 {
234235 return rosbag2_storage::BagMetadata{
235236 version,
@@ -243,10 +244,11 @@ PYBIND11_MODULE(_storage, m) {
243244 topics_with_message_count,
244245 compression_format,
245246 compression_mode,
246- custom_data
247+ custom_data,
248+ ros_distro,
247249 };
248250 }),
249- pybind11::arg (" version" ) = 7 ,
251+ pybind11::arg (" version" ) = rosbag2_storage::BagMetadata{}. version ,
250252 pybind11::arg (" bag_size" ) = 0 ,
251253 pybind11::arg (" storage_identifier" ) = " " ,
252254 pybind11::arg (" relative_file_paths" ) = std::vector<std::string>(),
@@ -258,7 +260,8 @@ PYBIND11_MODULE(_storage, m) {
258260 pybind11::arg (" topics_with_message_count" ) = std::vector<rosbag2_storage::TopicInformation>(),
259261 pybind11::arg (" compression_format" ) = " " ,
260262 pybind11::arg (" compression_mode" ) = " " ,
261- pybind11::arg (" custom_data" ) = std::unordered_map<std::string, std::string>())
263+ pybind11::arg (" custom_data" ) = std::unordered_map<std::string, std::string>(),
264+ pybind11::arg (" ros_distro" ) = " " )
262265 .def_readwrite (" version" , &rosbag2_storage::BagMetadata::version)
263266 .def_readwrite (" bag_size" , &rosbag2_storage::BagMetadata::bag_size)
264267 .def_readwrite (" storage_identifier" , &rosbag2_storage::BagMetadata::storage_identifier)
@@ -287,6 +290,7 @@ PYBIND11_MODULE(_storage, m) {
287290 .def_readwrite (" compression_format" , &rosbag2_storage::BagMetadata::compression_format)
288291 .def_readwrite (" compression_mode" , &rosbag2_storage::BagMetadata::compression_mode)
289292 .def_readwrite (" custom_data" , &rosbag2_storage::BagMetadata::custom_data)
293+ .def_readwrite (" ros_distro" , &rosbag2_storage::BagMetadata::ros_distro)
290294 .def (
291295 " __repr__" , [](const rosbag2_storage::BagMetadata & metadata) {
292296 return format_bag_meta_data (metadata);
0 commit comments