From: Paul O. <new...@ki...> - 2009-10-08 11:44:44
|
On Thu, 8 Oct 2009, Michael Bienia wrote: > Hello, > > I use Player 3.0 with a Pioneer robot and wondered myself why the > odometry interface always returns (0,0) for the position. > After digging through the code I found the issue in commit 7109 [0]: > In this commit the datatype of DistConvFactor from the RobotParams_t > structure changes from double to int while the values are still of a > double type (see robot_params.cc). As this value is used to compute the > moved distance it will always be 0 (for some robots as it multiplies > with 0 for them) and thus keeping the returned position at the current > value. > > Changing the definition back to double fixes it, but I'm not sure if > it's really the correct fix for it. > > Regards, > Michael > Yes, it is correct and I'm pretty sure I've commited some time ago something like this for sonar readings published by p2os driver. I don't know why at some point of time few of double precission fields in configuration structure were changed to integers for p2os driver, looks like that for erratic driver which is quite similar this was not done. As a result, some things stopped to work correctly for p2os-based robots while erratic robots are still operated fine. Patches that revert this situation are welcome, I can't guess which values should be reverted back to double and which should be left as integers, I don't have that much time to study p2os reference book (I don't even know if I have one for our pioneers and if it is up to date). BTW, What's going on to Player? List of patches on a tracker is getting longer. I wanted to ask you Michael to submit a patch with your changes, but who knows when it will be applied. Paul > 0: > http://playerstage.svn.sourceforge.net/viewvc/playerstage/code/player/trunk/server/drivers/mixed/p2os/robot_params.h?r1=6597&r2=7109 > http://playerstage.svn.sourceforge.net/viewvc/playerstage/code/player/trunk/server/drivers/mixed/p2os/robot_params.cc?r1=6374&r2=7109 > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > |