Passing Matrices as params in Launch Files
I'd like to pass the data contained within a matrix as a parameter to several nodes in a launch file. This link states how to pass in std::vector<...>
params for bools, ints, doubles, etc. Is it possible to pass in something like a std::vector< std::vector<int> >
via the launch file?
I'm looking for something similar to this answer: given a launch file
<launch>
<node name="..." ...>
<rosparam param="matrix">
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
</rosparam>
</node>
</launch>
I'd like to recover the value of matrix
within the node by calling something similar to:
std::vector<std::vector<int> > matrix;
nh.getParam("matrix", matrix);
This method didn't work when I tried it though. Is there another way this can be done?
(I'm using ROS Kinetic on Ubuntu 16.04)