Reputation: 1
Let's suppose I have a ROS metapackage A with some messages and other metapackage B with other messages. Is it possible to communicate A with B with msgs mechanism without making dependencies of each other? My aim is to let user clone metapackage A and build it totally independently of package B and symmetrically clone package B and build it independently of package A and with starting specific node allow to communicate them with some complex message. Is it even possible?
Daniel
Upvotes: 0
Views: 270
Reputation: 5019
As far as I know, this is not possible.
Let's say package A uses a message type that is defined in package B. In order to use this message type, you need to include the generated header file, which is only possible if you add B as a dependency of A.
There are two solutions I can think of (whether they are feasible for you, I don't know):
You could move all the message definitions of A and B to a separate package C (which only contains the messages and nothing more). A and B have then to depend on this new package C but have no dependencies between each other.
Another solution might be to use only standard message types that are already defined by ros. This is of course only a feasible solution, if the data you're sending fits in one of the standard message types.
Upvotes: 1