Since you are doing a simple read (as opposed to a non-blocking read) the system will wait for new data to become available.

By default stage is compiled with a data rate of 10Hz.

If you search in the history of this mailing list, you'll find my messages relating to this same subject dating back 1 or 2 months ago with the variables needed to be changed in the source.

-- Sent from my ParanoidAndroid Galaxy Nexus with K-9 Mail.

"MichaƂ Konarski" <> wrote:

While writing my robot client problem I noticed that Read() functions
is very slow. I wrote a simple C++ program to test this separately:

PlayerClient pc("localhost",6000);
timespec t1, t2;

int i;
clock_gettime(CLOCK_MONOTONIC, &t1);
for (i = 0; i < 30; i++) {
clock_gettime(CLOCK_MONOTONIC, &t2);

float diff = (float)(t2.tv_sec - t1.tv_sec)*1000 + ((float)(t2.tv_nsec
- t1.tv_nsec))/(1000*1000);
cout << diff/i << "ms" << endl;

It measures how much time does PlayerClient.Read() take. I get results
of circa 100-120ms on both computers I tested (Core Duo and i7). Is
this normal? Is there a way to make it shorter? With times of 100ms my
clients don't receive sensor updates quick enough and my robots run
into wall.

Thank you for any help :)

Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!

Playerstage-users mailing list