File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,14 @@ int main(int /*argc*/, char ** /*argv*/)
4848 RCLCPP_INFO (logger_, " Using transport: %s" , transport.c_str ());
4949
5050 const std::string bagged_cloud_topic = " /point_cloud" ;
51- const std::string shared_directory = ament_index_cpp::get_package_share_directory (
52- " point_cloud_transport_tutorial" );
53- const std::string bag_file = shared_directory + " /resources/rosbag2_2023_08_05-16_08_51" ;
51+ std::filesystem::path shared_directory;
52+ ament_index_cpp::get_package_share_directory (" point_cloud_transport_tutorial" , shared_directory);
53+ const std::filesystem::path bag_file = shared_directory / " resources" /
54+ " rosbag2_2023_08_05-16_08_51" ;
5455
5556 // boiler-plate to tell rosbag2 how to read our bag
5657 rosbag2_storage::StorageOptions storage_options;
57- storage_options.uri = bag_file;
58+ storage_options.uri = bag_file. string () ;
5859 storage_options.storage_id = " mcap" ;
5960 rosbag2_cpp::ConverterOptions converter_options;
6061 converter_options.input_serialization_format = " cdr" ;
You can’t perform that action at this time.
0 commit comments