Society of Robots - Robot Forum
Software => Software => Topic started by: Admin on September 11, 2009, 02:36:21 PM
-
I'm using WebbotLib v1.5 on an Axon.
The timer isn't outputting correct values. What I mean is, clockGetus() is disagreeing with delay_ms() . . .
For example, I tell it to delay_ms() for 60 seconds, then output the final time. Code below.
My guess is that its some kind of rounding error in the lib that just keeps adding up . . .
The results:
delay_ms() clockGetus()
10000 10238
30000 30716
45000 46075
61000 62457
Its like an additional 238ms are being added every 10 seconds!
start_freq = clockGetus();
delay_ms(60000);//input time in ms
end_freq = clockGetus();
duration_freq=(end_freq-start_freq);
rprintf("\n s: %ld\n",duration_freq/1000);
-
Is this using the last 1.5 official release or with the unfficial 1.5a release I emaied to you for testing/playing with servo judder?
-
Is this using the last 1.5 official release or with the unfficial 1.5a release I emaied to you for testing/playing with servo judder?
1.5 official release. ;D
(I was quick to downgrade after that 1.5a failure, hehe :P)
-
Thanks for your v1.5b.
It works! I told it to delay 45ms, and it outputted exactly 45000.
Also, it mostly fixed the servo twitching problem. It still happens, but its significantly reduced.
It doesn't seem to have broken anything, but then again I haven't tried the scheduler yet.
I believe you have a new release ready to ship ;D
-
New release: http://www.societyofrobots.com/robotforum/index.php?topic=7787.0 (http://www.societyofrobots.com/robotforum/index.php?topic=7787.0)
-
I hooked it up to an oscope today with an Axon.
It was accurate to the oscope within 0.58% of real time. Pretty darn good! I didn't try multiple Axons, but I'm sure they are all close.