From: Nils O. T. <no...@gm...> - 2005-07-14 00:27:31
|
Hi Thanks alot, will try that now... I was left under the impression that the way I was doing it was the standard way from the examples in th "How to..." I saw this threaded stuff in the source code but could not really figure out what it would change... Good luck in Munich, I'm from Germany myself :) regards, Ole -- Nils Ole Tippenhauer Exchange research student PAMI lab, University of Waterloo pami.uwaterloo.ca Radu Bogdan Rusu wrote: > On Tue, Jul 12, 2005 at 10:04:51AM -0400, Nils Ole Tippenhauer wrote: > >>I just did a similar post on the player mailinglist... readData() >>doesn't work fo r me either, but readAll() for the proxy works. This is >>an not fully working example but some code fragments of it taken from >>the stuff I'm currently working on: >> >>//At startup >>player = new PlayerClient("localhost",6665); >>position = player.requestInterfacePosition(0, 'r'); //a, r or w > > > Try adding player.runThreaded (-1, -1); for a kick. > >You're doing this the wrong way. Try calling [PlayerClient].runThreaded >(ms,nano); in your code. It will automatically run all the >[*Interface].readData() for you. I will do my best to upload a couple of >clear written examples for Javaclient soon. In the meantime, you can check >some stuff such as http://www.robotux.info/ai/neural/ for a working >example. You have several client<->player modes. Check http://player.robotux.info/group__player__interface__player.html#ga14 for details. > >>//now loop this stuff... >>player.readAll(); >>//update the global data so every behaviour can access it >>currentX=position.getX(); >>currentY=position.getY(); >>currentYaw=position.getYaw(); >>System.out.println("Position (" + currentX + "/"+ currentY + ") Angle >>is " + currentYaw); >> >>This is of course for the Odometry data... give it a try... >>I'm using plauer 1.6.4 and latest stable stage & latest stable playerclient >> >> >>cheers, Ole >> >>-- >>Nils Ole Tippenhauer >>Exchange research student >>PAMI lab, University of Waterloo >>pami.uwaterloo.ca >> >> >> >>Kenneth Mosher wrote: >> >>>I'm using Javaclient 1.6.4 (Player 1.6.4, simulating bot in stage) and >>>having some problems getting either odometry data or the simulation 2d pose >>>back. >>> >>>When trying to get odom data (readData then getX, getY on the position >>>interface) I keep getting garbage values (values jump all over the place) >>>without even moving my 'bot from its start position. >>> >>>When I try to use the simulation interface to get back a 2dPose and look at >>>the 'bot's co-ords that way, it just sits there waiting for a response (did >>>a get2DPose, kept waiting on isPose2DReady). >>> >>>At one point, I managed to get the simulation interface to connect to stage >>>(somehow; still not sure how) and got an error like "warning: No >>>permissions >>>to configure device lf:0"....? I read somewhere in the P/S mailing list >>>that that error could be due to an old version of Player or Stage, but I'm >>>using the latest release... >>> >>>Could someone please post a clear, working code example of how to do either >>>or both of these things (retrieve odometry data and retrive a simulation 2d >>>pose)? >>> >>>Thank you >>> >>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by the 'Do More With Dual!' webinar >>>happening >>>July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual >>>core and dual graphics technology at this free one hour event hosted by HP, >>>AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar >>>_______________________________________________ >>>Java-player-users mailing list >>>Jav...@li... >>>https://lists.sourceforge.net/lists/listinfo/java-player-users >>> >>> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening >>July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual >>core and dual graphics technology at this free one hour event hosted by HP, >>AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar >>_______________________________________________ >>Java-player-users mailing list >>Jav...@li... >>https://lists.sourceforge.net/lists/listinfo/java-player-users > > |