Best Practice for Suscriber and Publisher
Hi everyone, I heard somewhere that the best practice for a node was to create a file receiving and publishing all the message, and then to collect these datas from another file if we need to process them.
Something like this :
process.cpp <===> SuscribeAndPublish.cpp <================================>Node 2 l___________________________________/
Node 1
Sorry for the poor schema ahaha
I'm not sure what you're asking.
Sorry if i'm not clear. Someone told me, it was better to have a file supposed to collect and send message on topic, and other files suposed to process the differents algorithm we use. My question is : how do we transfer data from those different files
Usually, a node subscribes to the topics that it needs, processes the data, and publishes data if need be.
Yes, but will it do it on the same file ? (for instance is it possible to have multiple files per nodes ?) I'm finding a lot of examples of basic suscriber and publisher on the net, but nothing with a real processing. Do you have some examples ?
Moreover, is there any advice to implement a ros node, in object-oriented aspect ?
What do you mean by
? Are you asking if you can have multiple nodes per file (like a *.py or *.cpp file)?
No. I know this is possible. What i'm asking is explanations (or examples) on how these nodes with multiples files are working.