ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I dont know a perfect answer to this question, but this is how I'd like to put it. Cpp codes by default are single threaded and don't use multiple threads unless the multithreading library is used. Arduino itself is a single threaded microcontroller, so there's no question of subscribers running in parallely I guess. I think the subscriber callbacks would get executed in a serial fashion maybe in the form of a queue. ros::spinOnce() will make the code look for callbacks if any and execute them and the proceed with its function after callbacks are executed.