OpenSimulationInterface / open-simulation-interface

A generic interface for the environmental perception of automated driving functions in virtual scenarios.
Other
267 stars 125 forks source link

txt2osi.py throws DecodeError #726

Closed carstendroesser closed 2 months ago

carstendroesser commented 1 year ago

I'd like to convert an osi trace file to a human readable .txth-file and vice versa. When using the scripts at /format, txt2osi throws an error.

Steps to reproduce the behavior:

  1. create a .txth-file: python3 osi2read.py -d some_file.osi -o some_file_human_readable
  2. convert .txth-file back to .osi: python3 txt2osi.py -d some_file_human_readable.txth

The following error is thrown:

Traceback (most recent call last):
  File "txt2osi.py", line 80, in <module>
    main()
  File "txt2osi.py", line 70, in main
    for message in sv:
  File "/some/path/to/open-simulation-interface/format/OSITrace.py", line 189, in get_messages_in_index_range
    message.ParseFromString(serialized_message)
google.protobuf.message.DecodeError: Error parsing message

When using -f separated as argument for osi2read.py, the error is as below:

Traceback (most recent call last):
  File "osi2read.py", line 63, in <module>
    main()
  File "osi2read.py", line 59, in main
    trace.make_readable(args.output)
  File "/some/path/to/open-simulation-interface/format/OSITrace.py", line 227, in make_readable
    for i in self.get_messages():
  File "/some/path/to/open-simulation-interface/format/OSITrace.py", line 189, in get_messages_in_index_range
    message.ParseFromString(serialized_message)
google.protobuf.message.DecodeError: Error parsing message

Could anyone help? The OSI File is not corrupted, as at some other point it can be read and replayed.

pmai commented 2 months ago

txt file format has been removed in 3.7.0 after long deprecation since 3.0.0. Closing related issue.