I am startirg using JavaClient for Player Stage.
I have downloaded the Javaclient 2.0.1 version and I am trying to run the examples (space wanderer, wall follower, etc.) but it seems like something is wrong.
When I try to debug the application, the PlayerClient object is created succesfully, so I suppose the connection to player server is ok, and the requestInterfacePosition2D is ok also.
however, when the PlayerClient object tries to call requestInterfaceSonar method, it returns a null reference. The same happens with laser and other devices.
I changed the method invocation order, so I call first the requestInterfaceSonar(0, PlayerConstants.PLAYER_OPEN_MODE) method, and after that I call the requestInterfacePosition2D (0, PlayerConstants.PLAYER_OPEN_MODE) method. In this way, the PlayerClient returns an interface for the sonar finally.
Nevertheles, the robot does't move in spite of it sets a velocity of 0.2 en each step. The position is always the same, it is not updated, so it get the same sonar readings. I have set the MotorPower to enabe anyway. I am using a Player Stage simulation, not a real-world robot.
Thank you very much for your help!
Llévate Messenger en el móvil a todas partes ¡Conéctate!