Calling services within a for loop RosLibJS
Hi,
I was trying to call services from browser using roslibjs. I want to call services within a for loop like this:
for ( int i=0; i<3; i++)
{
callService1();
//wait for acknowledgement 1
callService2();
//wait for acknowledgement 2
}
I'm able to call the service. But, I don't know how to make Service 1 wait for the acknowledgement before starting the Service2. How do I accomplish this in roslibjs ?
Thanks and regards !