On systems where the folder ~/.config does not exist the program closes instantly with the following error:
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: cannot create directory: No such file or directory [/root/.config/rig_reconfigure]
[ros2run]: Aborted
Step to reproduce:
Delete ~/.config folder, then run
ros2 run rig_reconfigure rig_reconfigure
Potential solution:
Create the folder .config if doesn't already exists.
On systems where the folder ~/.config does not exist the program closes instantly with the following error:
Step to reproduce: Delete ~/.config folder, then run ros2 run rig_reconfigure rig_reconfigure
Potential solution: Create the folder .config if doesn't already exists.
To do so we can use the
std::filesystem::create_directories
function instead of thestd::filesystem::create_directory
on this line https://github.com/teamspatzenhirn/rig_reconfigure/blob/83f37b5c142ef40b7aa8d6285d9dcb4adbd180eb/src/rig_reconfigure.cpp#L74C9-L74C42