|
From: julian r. <ju...@ya...> - 2007-08-30 10:18:47
|
Hi
The position data from the position2d interface is never ready. As a result my while loop goes on forever. Here is my code:
// returns the robot's position as an array of floats
>> public float[] getPosition()
>> {
>> float[] pos = new float[3];
>> try{
>> while(!posi.isGeomReady()) {System.out.println("geom not ready");}
>>
>> PlayerPose geom = posi.getGeom().getPose();
>> pos[0] = geom.getPx();
>> pos[1] = geom.getPy();
>> pos[2] = geom.getPa();
>> }
>> catch(Exception e){ System.out.println("ERROR");}
>>
>> return pos;
>> }
If anybody could help me that would be great.
Thanks
Julian
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center. |