Using data from a ROS node in a separate C++/Python program
Suppose there is a user-defined ROS node. I make it publish to a topic. Now i want to use this data published to the topic as input to a C++/Python program. So how do I
- make the node publish to a topic?
- route the data from the topic as input to another separate C++/Python program?
Any reference/tutorial with concrete coding examples is sought.
Did I understand you right that you do not want to subscribe to this topic. Instead you want this data as a program parameter?
yes. i have a c++ function and the node is reading sensor data and processing it. i need the outputted data from this node as input for my c++ function. will subscribing to the topic to which this node publishes work? i amn't sure.
I guess that creating a subscriber node that executes your c++ function on callback should work... But I'm not sure what you are trying to do.
Yes, I think i should combine my code to a subscriber code and it should work.