Working of ROS subscribers in an Arduino code

asked 2020-10-08 23:52:18 -0500

electrophod gravatar image

updated 2020-10-08 23:52:46 -0500

I have some doubts which I wish to get clarified at one place related to ROS subscribers in an Arduino code.

1) Can I define multiple subscriber objects in an Arduino code ? If yes, would their callback functions run simultaneously in separate threads similar to how they work in rospy ?

2) How do subscriber callbacks work in an Arduino code ? In my python code (using rospy) if I put up an empty while loop instead of rospy.spin(), the code still runs and the subscriber callbacks get called as soon as messages are published on their respective topics. Similarly if I dont use ros::spinOnce() or ros::spin() in my Arduino code and keep an empty void loop, would my subscriber callbacks be called ?

Any other additional information or sources to understand this topic is also appreciated,

TIA

edit retag flag offensive close merge delete