From: Nils O. T. <no...@gm...> - 2005-07-12 14:04:43
|
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 //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 > > |