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.

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

"MichaƂ Konarski" <m4jkel@gmail.com> wrote:
Hi,

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++) {
pc.Read();
}
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 :)
Michal



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!
http://p.sf.net/sfu/zoho_dev2dev_nov


Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users