From: Radu B. R. <ve...@in...> - 2005-05-07 16:57:47
|
On Mon, May 02, 2005 at 09:31:58AM -0500, Matthew Johnson wrote: > Thanks, I'll update to 1.6.2d and try it. Sounds great. Btw, I just released 1.6.2e. > I am trying to obtain the (X,Y) position of a sonar contact based on the > geometry of the sensor and the range in order to map out objects in the > environment. I did not see this functionality in the current Player > sonar interface or java client, but stop me if it already exists. I still do not really understand what you are trying to achieve. The geometry of a sonar sensor is already defined in the .inc/.cfg files, if we're talking about a simulated robot. On a real robot, the implemented driver might have that information stored. In both cases, sonar.queryGeometry() followed by isPGSTReady and getPGST (btw, I think there's a small bug , the name of the method is getPLCT instead of getPGST, and it should be isPSGTReady instead of isPGSTReady - I'll fix both of them in the CVS and 1.6.3) should give you what you need. My head is spinning, guess I'm just tired from the plane. :) If you can, please explain again (in more words) what are you trying to do exactly and I'm sure that we can eventually find a solution for it. :) Cheers, Radu. > > Matt > > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of Radu > Bogdan Rusu > Sent: Sunday, May 01, 2005 3:56 AM > To: jav...@li... > Subject: Re: [Java-player-users] geometry > > > On Fri, Apr 29, 2005 at 09:46:14AM -0500, Matthew Johnson wrote: > > I am using your JavaClient 1.6.2a for Player 1.6.2 with a Pioneer in > > gazebo 0.5.1. I can get the ranges, but not the geometry. There is a > > queryGeometry method, but when I handle the response, it is always > zero. > > Has this worked for anybody? If so, what am I missing? > > Hello Matt, > > Sorry for replying so late. I'm away in a short vacation in Germany, so > reading mails has to go to level 2 priority. :) > > About your problem... In order to get the sonar geometry you should > query it > first with queryGeometry (), then check in a loop if the geometry has > been > read from the Player server using isPGSTReady (). If isPGSTReady returns > true you should be able to get it using getPLCT () as a PlayerSonarGeomT > object (don't forget to import javaclient.structures.* !). > > That said, it would be best to upgrade to JavaClient 1.6.2d, since I'm > fixing bugs on a daily basis nowadays. The CVS has been left behind, but > I > will upgrade it as soon as I get back to the campus, sometime at the end > of > next week. > > Cheers, > Radu. > > > > > > > > > Matt > > Yours sincerely, Radu Bogdan Rusu -- | Radu Bogdan 'veedee' Rusu | http://www.rbrusu.com | PhD student/teaching assistant | Robotics Research Group, Technical University of Cluj-Napoca[.ro] | The optimist sees a task in every problem. | The pessimist sees a problem in every task. |