From: Nicola B. <ni...@ro...> - 2009-01-19 15:50:41
|
I use only one proxy in PULL mode, and I replace the rule with the following code: PlayerClient client("localhost"); PtzProxy pt(&client); client.SetDataMode(PLAYER_DATAMODE_PULL); client.SetReplaceRule(true, PLAYER_MSGTYPE_DATA); Maybe something's wrong? Cheers Nicola gbiggs wrote: > Have you set a replace rule for the message type you're getting old > values from? > > Geoff > > Toby Collett wrote: > Are you subscribed to other proxies as well as the ptz one? Read does > not guarantee to update all proxies (in fact in push mode it will only > update one). Set the fresh flag to 0 on the ptz proxy before you read > and if it is not set to 1 after the read then it has not been updated at > all. > > Toby > > 2009/1/8 Nicola Bellotto <nick@ro... > <mailto:nick@ro...>> > > Hi all, > > I am having a little problem with the PlayerClient::Read() function, > getting data from a pan-tilt unit PTU46 (in PULL mode). > A simple example to explain what happens: > - start with tilt = 0 > - send a command to reach tilt=0.2 > - wait for the PTU to reach the position > - read once the position with Read() -> get tilt=0 > - read once more the position with Read() -> get tilt=0.2 > > Basically Read() returns an old value before the most recent one, > which shouldn't happen in PULL mode. > The problem is somehow similar to a previous post about odometry: > http://sourceforge.net/mailarchive/message.php?msg_id=1173300103.10158.8.camel%40robot1 > > Peek() or PUSH mode obviously do not solve the problem. > Any idea? > > Cheers, > > Nicola > > > -- > Dr Nicola Bellotto > Active Vision Lab - Robotics Research Group > Department of Engineering Science > University of Oxford > Oxford OX1 3PJ, United Kingdom > Tel: +44 (0)1865 283052 > Fax: +44 (0)1865 283145 > http://www.robots.ox.ac.uk/~nick <http://www.robots.ox.ac.uk/%7Enick> > -- Dr Nicola Bellotto Active Vision Lab - Robotics Research Group Department of Engineering Science University of Oxford Oxford OX1 3PJ, United Kingdom Tel: +44 (0)1865 283052 Fax: +44 (0)1865 283145 http://www.robots.ox.ac.uk/~nick |