Subcriber callback within a while loop?
Is it possible for a subscriber to make a callback within a while loop?... if so how then..
In my case i am Subscribing to topic which giving me a position of a robot. I have a array of 8 positions.
double position[8] = {2.0 , 3, 3.0, ...}
And in a while in a loop, I make to robot walk to those position, one after one. i
nt i = 0
while(i<8)
{
robotposition = position[i];
if(real_position == robotposition){
i++;
}
}
Here is the real_position, the real position of the robot, which I receive from a callback function.. The problem here is though that this value doesn't get updated when it is in the while loop.. and i don't why.. how do i do that?