On Fri, Aug 19, 2005 at 10:08:58PM +0100, fly roadto wrote:
> Hi,
> I tried "isPose2DReady ()", and it returned false. so there wasn't data
> come from Stage to the SimulationInterface. how can i get the data from the
> Stage?
You need to wait for it until it becomes ready. In order for it to be ready
though, you need to call get2DPose () first. Okay, I know, it's a bit
complicated, but this is the way the Player server really works. First you
send a request, then wait for the reply and then get the data. Example:
get2DPose (); // send a PLAYER_SIMULATION_GET_POSE2D request
while (!isPose2DReady()); // wait until you get a reply
// and get the actual pose
PlayerSimulationPose2D pose = getSimulationPose2D();
Remember that you need to add the object's name in front of the above
methods.
> another problem is like this:
> set2DPose("pioneer", 1000, 1000, 0);
> .......
> set2DPose("pioneer", 2000, 2000, 0);
> the first set method works, but the second one doesn't. how can i make it
> work?
I cannot test it right now, but that sounds weird. Are you executing them
one after another? Is 2000 somewhat outside your map?
> Another problem is about the mapInterface
> when i ran the code:
> PositionInterface post = player.requestInterfacePosition(0, 'r');
> SimulationInterface simulation =
> player.requestInterfaceSimulation(0, 'r');
> MapInterface map = player.requestInterfaceMap(0, 'e');
> i got error:
> [PlayerClient] : Got response for device 4(stage) with access: r
> [PlayerClient] : Got response for device 31(stage) with access: r
> [PlayerClient] : Got response for device 42() with access: e
> [PlayerClient] : Error was replied from the server!
You need to change 'e' into 'r'. 'e' stands for error, 'r' for read.
Example:
MapInterface map = player.requestInterfaceMap(0, 'r');
> thank you very much
No problem mate. Cheers!
> Jun
Yours sincerely,
Radu Bogdan Rusu
--
| Radu Bogdan Rusu | http://www.rbrusu.com
| Intelligent Autonomous Systems Group
| Technische Universitaet Muenchen
|