Best practice to handle data files
Hello,
I have a node that needs to load a binary firmware file in order to execute. I'm wondering what's the best way to handle this in ROS.
I've seen options pointing to adding a file/configure_file line in CMakeLists and then using a relative path from my .cpp; others seem to use install(); others yet say it's best to let the executable point directly to the file path in the package's source folder, using ros::package::getPath perhaps.
So, what's the best way?
Thanks in advance.
EDIT: I'm sceptical of the last option because I'm following recommendations to implement base functionalities independent from ROS and then have the ROS nodes act as wrappers. Therefore, my firmware loading happens in a base class in which I don't want to include "ros/package.h"