diff --git a/ros2bag/ros2bag/verb/convert.py b/ros2bag/ros2bag/verb/convert.py index 775cdee0f9..1b356b6f7d 100644 --- a/ros2bag/ros2bag/verb/convert.py +++ b/ros2bag/ros2bag/verb/convert.py @@ -42,8 +42,7 @@ def main(self, *, args): if len(input_bag) > 2: raise argparse.ArgumentTypeError( f'--input expects 1 or 2 arguments, {len(input_bag)} provided') - storage_options = StorageOptions() - storage_options.uri = input_bag[0] + storage_options = StorageOptions(uri=input_bag[0]) if len(input_bag) > 1: storage_options.storage_id = input_bag[1] input_options.append(storage_options) diff --git a/rosbag2_py/src/rosbag2_py/_storage.cpp b/rosbag2_py/src/rosbag2_py/_storage.cpp index c504700496..48d04e619e 100644 --- a/rosbag2_py/src/rosbag2_py/_storage.cpp +++ b/rosbag2_py/src/rosbag2_py/_storage.cpp @@ -41,12 +41,11 @@ PYBIND11_MODULE(_storage, m) { &rosbag2_cpp::ConverterOptions::output_serialization_format); pybind11::class_(m, "StorageOptions") - .def(pybind11::init<>()) .def( pybind11::init< std::string, std::string, uint64_t, uint64_t, uint64_t, std::string, std::string, bool>(), pybind11::arg("uri"), - pybind11::arg("storage_id"), + pybind11::arg("storage_id") = "", pybind11::arg("max_bagfile_size") = 0, pybind11::arg("max_bagfile_duration") = 0, pybind11::arg("max_cache_size") = 0,