From: Steffen J. <Ste...@gm...> - 2005-08-30 05:40:51
|
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. Problem 2: My player config file defines two position devices: driver ( name "vfh" provides ["position:3"] requires ["position:0" "laser:0"] max_speed 0.15 max_turnrate 40 safety_dist 0.10 distance_epsilon 0.2 angle_epsilon 360 free_space_cutoff 100000000.0 ) driver ( name "stage" provides ["position:0" "laser:0"] samples 181 model "robot" ) 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? Many thanks, Steffen. -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner |