I guess the question is rather how to get some configuration from a launch file into the nodes, that you go on to store that information in an std::map
just an extra.
You most probably want to use the parameter server which is available to you per default when you run ROS.
You can store name-value pairs on the server in a launch file with the <param>
tag then you can access it in your node as described in the documentation.. In Brief:
ros::param::param<std::string>("default_param", default_param, "default_value");
Note that the parameter names are global, but you can set private parameters per node by putting the tag inside the <node>
tag:
<node ...>
<param name="foo" .../>
</node>
Then you need to use "~foo" to access it.
PS: It is possible to store an entire map with a single name on the parameter server, but I know of no way to use that feature with launch files. You will need to specify a parameter for each map element.
PPS:
Also note the convenient <rosparam>
tag that allows:
<rosparam>
my_parameter_1: 768
my_parameter_2: 480
</rosparam>