From nswoboda at clip.dia.fi.upm.es Fri Dec 12 11:57:25 2008 From: nswoboda at clip.dia.fi.upm.es (Nik) Date: Fri Dec 12 07:59:45 2008 Subject: [Pyro-developers] Player and Pyro problems when using the Erratic robot Message-ID: Hello, While using the Erratic robot (through Player, version 2.0.3) with Pyro we have been experiencing delays in sonar readings of 2 or 3 seconds (or more). Also even when pyro is 'idle' we see many console errors: ... error : tried to push 1/1 from 22:0 warning : tried to push onto a full message queue error : tried to push 1/1 from 5:0 warning : tried to push onto a full message queue error : tried to push 1/1 from 4:0 warning : tried to push onto a full message queue error : tried to push 1/1 from 22:0 warning : tried to push onto a full message queue error : tried to push 1/1 from 5:0 warning : other error on client 0 ... Using playerv we don't see any such problems so I assume that the problem is specific to the way that python (or pyro) handles the message queue. Has anyone else seen similar problems or could anyone offer any suggestions regarding what is happening? Many thanks, Nik ____________________________________________________ If I were to walk on water, the press would say I'm only doing it because I can't swim. -- Bob Stanfield From nswoboda at clip.dia.fi.upm.es Tue Dec 16 10:55:00 2008 From: nswoboda at clip.dia.fi.upm.es (Nik) Date: Tue Dec 16 06:57:19 2008 Subject: [Pyro-developers] Re: Player and Pyro problems when using the Erratic robot In-Reply-To: from "Nik" at Dec 12, 2008 05:57:25 PM Message-ID: I believe that I have a solution for the problem that I mentioned last week. According to the player client documentation there are two different modes for server/client data passing: PUSH and PULL. Supposedly by default PULL is used, but I have found that by explicitly setting the mode to PULL and then setting a add-replace rule to replace DATA messages in the queue with new ones with the same signature both the error messages and the delays in sonar readings disappear. Here is the diff (to pyrobot/robot/player.py): 504a505,513 > > # set datamode to pull > if self.runable._client.datamode(playerc.PLAYERC_DATAMODE_PULL) == 0: > print playerc.playerc_error_str() > > # set up the appropriate replacement rule for new data > if self.runable._client.set_replace_rule(-1,-1,playerc.PLAYER_MSGTYPE_DATA,-1,1) != 0: > print playerc.playerc_error_str() > Enjoy! Nik ____________________________________________________ Money can't buy happiness, but it can make you awfully comfortable while you're being miserable. -- C.B. Luce From dblank at brynmawr.edu Tue Dec 16 12:02:18 2008 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Tue Dec 16 08:04:26 2008 Subject: [Pyro-developers] Re: Player and Pyro problems when using the Erratic robot In-Reply-To: References: Message-ID: <4947DF1A.5060109@brynmawr.edu> Thanks, Nik! I will apply that fix. -Doug Nik wrote: > I believe that I have a solution for the problem that I mentioned last > week. > > According to the player client documentation there are two different > modes for server/client data passing: PUSH and PULL. Supposedly by > default PULL is used, but I have found that by explicitly setting the > mode to PULL and then setting a add-replace rule to replace DATA > messages in the queue with new ones with the same signature both the > error messages and the delays in sonar readings disappear. Here is the > diff (to pyrobot/robot/player.py): > > 504a505,513 >> # set datamode to pull >> if self.runable._client.datamode(playerc.PLAYERC_DATAMODE_PULL) == 0: >> print playerc.playerc_error_str() >> >> # set up the appropriate replacement rule for new data >> if self.runable._client.set_replace_rule(-1,-1,playerc.PLAYER_MSGTYPE_DATA,-1,1) != 0: >> print playerc.playerc_error_str() >> > > Enjoy! > > Nik