Re: Running simulation > 10Hz

Rich Mattes <[email protected]>
Newsgroups gmane.science.robotics.playerstage
Message-ID <[email protected]>
On 04/18/2013 08:13 AM, ulle wrote:
> Hi
>
> I don't think the client buffer is overflowing since I have to wait for
> Read() to execute. I tried to set the replace rules for all my proxies (i.e.
> myRangerProxy.SetReplaceRule(true, -1, -1) ) but I see no change.
> I have tried to use the ReadIfWaiting() function, but I only obtain the same
> messages a hundred times or so before a new message is available.
> Ok, good clarification regarding the log file, thanks.
>
> Just to make sure I got the repos right. I use
> https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk
> https://github.com/rtv/Stage.git
> https://github.com/pauldreik/Stage.git (Some updated bumper functionalities
> by Paul Dreik, a former coworker)
>
> Have any of you out there succeeded in obtaining measurements at around
> 100Hz or faster?
>
> Regards,
> Ulrik
>


I tried to reproduce your results using simple.{cfg,world}, trying to 
decipher from previous emails which settings were being used, and using 
the latest git master of Stage and svn trunk of Player.  It looks like 
when I set Stage's interval_sim to 10 and the pioneer model's 
update_interval to 10, I do see dropouts in position2d timestamps 
received by the Position2dProxy using the sample program at the bottom 
of this mail.  If I add client.SetDataMode(PLAYER_DATAMODE_PUSH), the 
dropouts go away.  The difference between the two modes is explained in [1].

I was also able to set the speedup flag to -1 in the world file, and 
still didn't see dropouts from my sample program with Stage's realtime 
factor hovering around 3.5.

Rich

[1] 
http://playerstage.sourceforge.net/doc/Player-svn/player/group__libplayerc__datamodes.html

Sample program:
#include <libplayerc++/playerc++.h>

using namespace PlayerCc;

int main (int argc, char *argv[])
{
         PlayerClient robot("localhost", 6665);
         Position2dProxy pp(&robot, 0);
         // Setting the datamode to PUSH gets rid of dropouts
         robot.SetDataMode(PLAYER_DATAMODE_PUSH);

         while(!pp.IsValid()){
                 robot.Read();
         }

         for(;;) {
                 robot.ReadIfWaiting();
                 if (pp.IsFresh()) {
                         pp.NotFresh();
                         std::cout << pp.GetDataTime() << ", " << 
robot.GetOverflowCount() << std::endl;
                 }
         }
}


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.