Publisher-related design problem
Let say I have some values set of Box attributes in a launch file as below:
<id="width" value="1"/>
<id="length" value="3"/>
<id="height" value="3"/>
<id="width2" value="3"/>
<id="length2" value="3"/>
<id="height2" value="4"/>
<id="width3" value="2"/>
<id="length3" value="3"/>
<id="height3" value="3"/>
These value I will read in a method and publish those. But the problem here how the publisher should look like as I don't want to limit the number of box only to 3, it could be set up to n, where n is a real number. Those all value will later be subscribed by another node that will construct a class like below:
Box
{
...
...
double width;
double length;
double height;
...
...
}
How do I achieve this? Thanks in advance.
The ROS parameter server supports arrays and maps. You should probably be using those.