File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,20 @@ def convert(to: Annotated[OutputDataInterface, typer.Argument(help="Desired data
7575 show_default = True )] = True ) -> None :
7676 console .print (f"Converting { input_dir } to { to } format at { output_dir } " )
7777 if to == OutputDataInterface .ros2 :
78- if not input_dir .is_dir ():
79- print ("Processing..." )
80- rosconvert .convert (input_dir , output_dir / input_dir .stem )
81- else :
82- for item in track (list (input_dir .iterdir ()), description = "Processing..." ):
83- if item .suffix == '.bag' :
84- rosconvert .convert (item , output_dir / item .stem )
78+ print ("Processing..." )
79+ rosconvert .convert (
80+ sorted ([f for f in input_dir .glob ("*.bag" )]) if input_dir .is_dir () else [input_dir ],
81+ output_dir / input_dir .stem ,
82+ dst_version = None ,
83+ compress = None ,
84+ compress_mode = "file" ,
85+ default_typestore = None ,
86+ typestore = None ,
87+ exclude_topics = [],
88+ include_topics = [],
89+ exclude_msgtypes = [],
90+ include_msgtypes = []
91+ )
8592 else :
8693 with RosReader (input_dir ) as reader :
8794 with OutputDataInterface_lut [to ](output_dir , rgb_convert = rgb_conversion ,
You can’t perform that action at this time.
0 commit comments