how to take same variable to two different nodes in cpp ?
hello ,
i want to take global variable one node to another without using publisher and subcriber ! can anyone give me idea ?
thanking you
It looks like an xy-problem, why do you want to do this and why subscribers/publishers can't be used ? Do you also want to avoid using a service or an action server ? You should give more details about what you want to achieve and what you've tried so far.
@Delb Yes, I have same question. For example I am creating a bool flag in one node, When I am going to PAss command from one node to another node I will set and reset the flag to publish 1, sometime my data not published in another node but flag reset successfully done. That's why I don't want to go for Publisher/Subscriber. If I am creating global var How can I call from another node. It will help better usage of var and (Pub/Sub).
@Mehikel Don't hesitate to open a new question, yours might not be related with OP's question. If you do, don't forget to detail what you want, the errors you get, even some code if relevant. A new question is always better than a commentary.
@Delb I want to share multiple flags between multiple nodes, and i'm not sure if using subscribers/publishers is the valid option Is service or action server the only option? Currently I'm using multiple subscribers/publishers
Again, please expand on why you want to share those flags. With the inputs you give pub/sub, service and action server are all valid options. Why is it bothering you to use pub/sub ? We can't advise you a propper solution with that little informations.