Dear Karan, good work. Actually I have one doubt, if I have two subscribers sb1 and sb2, and if sb2 callback depends on sb1 callback then how to ensure that sb1 callback will run before sb2 callback. PS:- sb2 callback is heavily coded as compared with sb1 as its critical callback
@fusybots5 сағат бұрын
Hello Soham Actually it depends on which topic is getting the msg first. But if somehow both of your topics are getting msg at the same time then the callback of 1st object will be called first because it will be placed first in the queue callback of ros spin. But to avoid the case when sub2 topic is getting msg first, then you can guard the function of sub2 with variable update form sub1. This will ensure that once the variable gets updated from sub1 then only it will execute sub2. And if you are not using any parallel executors or threads your callbacks will always work in sequence one by one depending on the frequency of message.
@sohampadhye54085 сағат бұрын
@fusybots currently I'm guarding sub2 .
@fusybots4 сағат бұрын
Nice!
@sohampadhye54088 күн бұрын
Good job🎉
@fusybots7 күн бұрын
Thanks
@fusybots3 ай бұрын
Full Explanation Video with code coming on channel. Subscribe for more videos like this.
@fusybots4 ай бұрын
If you are facing any challenges, feel free to write.