Hi, I have a ULog file of about 2G and when I try to load it in PlotJuggler, it takes up all the memory that my machine have (16G). So I’m wondering what do people do to deal with large ULog file that can’t be seen with the tools at hands?
@bkueng How should people deal with very large ulog files? Can they be split safely - i.e. if I split at some point in the file, can I then plot the split parts?
@Ke2023 humm the issue is more with PlotJuggler I guess. Since when trying to load them I was having issue. So I don’t think that having the CSV instead would help. I ought to try though. Although I just tried today with a ULog of 2Go and didn’t have a problem. I need to close application first, but that’s it.
@hamishwillee I was trying to think of a solution to that problem. And I thought, maybe adding a parameter in PX4 which tell how big each log can be would help with that. Or yeah, just add one script to the PX4Tools repository that split the log in the size that you want would also work.
My take on this is that every tool and computer will have limits. Splitting a file might become a good alternative when that happens. You might already run into this if you tried to upload to FlightReview.
In any case, knowing splitting the file is possible/reasonable would be good, so it can be discarded as an option if not.
There’s currently no tool (that I’m aware of) to split logs. It would be possible to add one in pyulog though.
In general I’d rather aim for reducing the logged data in the first place, as large files are generally more difficult & expensive to handle. ulog_info tells you which data points need the most space.
Hi @bkueng thanks for the input, I’ll look into the ulog_info and check which one data point needs the most space and try to optimize.
Also, our use case of PX4 is a bit different from normal fixed-wing or drone operation, we are using it inside a High Altitude Balloon, which can be in the air for multiple hours. I think we are using the normal profile for the recording and ought to change it to something more lean.
Thanks @bkueng - makes sense. Though I am pretty sure someone will come up with a case where an impossibly big log is needed even with good design of data points.
@LudovicVanasse If you learn something from this that isn’t easily inferable from the docs and of broad interest would we great if we could have a paragraph or two on the right approach. Having not done it, I can’t be sure whether this is needed or not, but it would be good the next time someone asks to be able to point to a section in the docs that helps answer your question.
The maximum file size depends on the file system and OS.
The size limit on NuttX is currently around 2GB.
This could go in the logging topic, perhaps just before the dropouts section - seem reasonable?
The information about restarting is also interesting. Perhaps we should add a line in the usage section before the last line “For a list of all supported logger commands and parameters, use:”
Something like
If logging stops due to a write error, or reaching the maximum file size [insert link down to the new section], PX4 will automatically restart logging (to a new file).
I am not sure what the limitation is, but for files too large for the online FlightReview I open them in an offline version (local Python) if I am not interested in using PlotJuggler or if it is for some small check. It is both faster and handles larger files than the online version, but I haven’t tried it with 2GB files (350M is the largest I have needed).