jrl-umi3218 / mc_rtc

mc_rtc is an interface for simulated and real robotic systems suitable for real-time control
BSD 2-Clause "Simplified" License
122 stars 36 forks source link

[utils] check for input file extension #346

Open rohanpsingh opened 1 year ago

rohanpsingh commented 1 year ago

Throw error if argv[1] does not have a .bin extension

gergondet commented 1 year ago

That's not super necessary, the FlatLog class checks that the log file is a valid mc_rtc log by checking for a magic number at the start of the file. What was the motivation for this?

rohanpsingh commented 1 year ago

In that case we could probably put the check early on. Currently, even if the input file is invalid, the program will generate an empty output file and then fail after. I agree it's not super important.

gergondet commented 1 year ago

I see, I think the nicer approach is to: