how can we create a node publishing a random data using a class and without using a callback function
I want to create a publisher node without using a callback function as the title explains. Have you guys any suggestions?
You could read the documentation and tutorials and come back as soon as you run into a real problem.
Callbacks are used with the subscribers to get messages from topics, so just check the ros publisher tutorial