.px4log to csv conversion

I downloaded the px4log file from QGrouncControl. I installed px4tools and used the command python sdlog2_dump.py filename.px4log > output.csv. However I get an error:

Traceback (most recent call last):
File “sdlog2_dump.py”, line 334, in
_main()
File “sdlog2_dump.py”, line 331, in _main
parser.process(fn)
File “sdlog2_dump.py”, line 135, in process
raise Exception(“Invalid header at %i (0x%X): %02X %02X, must be %02X %02X”
% (bytes_read + self.__ptr, bytes_read + self.__ptr, head1, head2, self.MSG_HEAD
1, self.MSG_HEAD2))
Exception: Invalid header at 0 (0x0): 55 4C, must be A3 95

Why am I getting this error. I tried running this using regular python and through Anaconda as well. I ran it in windows and Linux also. But I still have errors. Can someone guide me with the correct method?

I’m not sure about the issue here, but I recommend you try the new PX4 logger (.ulg files) and tools (https://github.com/PX4/pyulog).

You can also upload them to https://logs.px4.io/ for a nice overview.

1 Like