From: Radu B. R. <ru...@in...> - 2005-08-31 06:31:06
|
Hello Steffen, On Tue, Aug 30, 2005 at 07:40:38AM +0200, Steffen Jaensch wrote: > Hi, > > Problem 1: > > I'm using the vfh driver with the PositionInterface. How do I determine when > the robot has reached its goal? > > I've already tried to use getXSpeed and getYSpeed of the PositionInterface > and to do busy waiting until the robot stops. However, this doesn't work > satisfactorily, because it needs a very long delay (around one second) > before I can use the speed information without taking the risk that it is > not updated. Furthermore, busy waiting blocks my system unnecessarily. One second sounds a bit too much. Are you using the threaded mode? > In order to get access to the position device at index 0 I simply do: > ppd = playerClient.requestInterfacePosition(0, 'a'); > > To get access to vfh which runs at index 3, however, it does not suffice to > request the PositionInterface at index 3, but I have to do the request three > times. The first call returns position:1 (which does not exist), the second > returns position:2 and finally the third call returns the desired > PositionInterface for vfh. This is independend of what indices I speficy in > the request method. > > vfh = playerClient.requestInterfacePosition(3, 'a'); > vfh = playerClient.requestInterfacePosition(3, 'a'); > vfh = playerClient.requestInterfacePosition(3, 'a'); > > Is it a bug or do I do something wrong? Unfortunately, it is a bug. It has been on my "to fix" list for too long now. I will do it asap. > Many thanks, > Steffen. Cheers, Radu. -- | Radu Bogdan Rusu | http://www.rbrusu.com | Intelligent Autonomous Systems Group | Technische Universitaet Muenchen |