ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
To my understanding message definitions are used to generate POD structures. A recursive definition would generate an infinite structure, e.g. in C++ :
struct Node
{
Node neighbor;
};
Note that an array of Node should do the trick but it seems it does not compile either, though the C++ version is fine:
struct Node
{
std::vector<Node> neighbors;
};
In your case one could suggest an array of id's to represent the neighbors of the node.