Closed jgkamat closed 7 years ago
Nice catch on the getcwd
usage, that definetly needs to be fixed :)
I think that exiting immediately is not the right thing to do, in case someone knows what they are doing. For example, RoboJackets intentionally runs vision
from the bin
directory, so that we can make the ./bin
folder a submodule and publish our config files.
I personally think that a console warning will be enough: in all the cases where I had this problem (both at competition, and in the issue referenced above), people checked the console when they realized something was wrong.
I think that a gui dialog is a good compromise though, so I'll add that in for now. Maybe in the future I'll make another PR creating a setting to squelch the warning.
Looks good, thanks!
During RoboCup 2017, there were two independent instances where someone ran vision from the
./bin
folder, which lost all configuration, and caused a lot of confusion.There's also the problem in #76, where the config system has a bunch of variables that expect the root of the repo to be the cwd.
To try to solve both of these problems, I've added a warning which will print when running from a directory other than the root of the repo. It's a little bit ugly, unfortunately, because I don't think ssl-vision uses boost (so I can't use
boost::filesystem
), but it's a start.Let me know if you have any feedback :smile: