Load 2D parameter from parameter server
Hi all,
I have a YAML file which successfully loads the following into the server:
joints: [ [name_1_1, name_1_2],
[name_2_1, name_2_2],
[name_3_1],
[name_4_1, name_4_2],
[name_5_1, name_5_2],
[name_6_1, name_6_2] ]
But I am having problems writing the c++ to return the contents. For a 1D vector I can easily use:
std::vector<std::string> names;
nh.getParam("/joints", names);
where the YAML could be:
joints: [name_1, name_2, name_3]
To go 2D I tried to load it with:
std::vector< std::vector<std::string> > names;
nh.getParam("/joints", names);
But I get a build error:
no matching function for call to ‘ros::NodeHandle::getParam(const char [17], std::vector<std::vector<std::basic_string<char> > >&)’
How can I load 2D parameters from the ros parameter server in C++?
Thank you in advance.