callBack() processing at lower rate than the topic messages ?
If callBack()
can't process the coming messages on time, what is going to happen with the unprocessed message, Will the later one overwrite the former message? for example:
void callBack(int a){
for(int i=0; i<a; i++){
Do some time consuming work...
}
}
if topic message sequence is a=100, 2, ... coming at high rate. at first message, a will equal to 100, when message "2" come while callBack()
still in for()
loop, how about the value of "a", 2 or 100?
Why don't you simply try it?
any suggestion on how to test it?
Simply print the value of a for some time...
each subscriber has Buffer and keep unprocessed msg in Buffer .if Buffer over flow the old msg ignored
yes, that's right. I got its detail at ros.org and it is just like what hamid said.