Re: [Playerstage-users] Recent changes to localize interface (and amcl driver)?
Rich Mattes <[email protected]>
| Newsgroups | gmane.science.robotics.playerstage |
|---|---|
| Message-ID | <[email protected]> |
On 02/15/2011 11:27 PM, Murilo Fernandes Martins wrote:
> Hello all,
>
> I've just experienced the same problem reported in this thread.
>
> My program runs with player 3.1 rev.8835. On a different machine with
> rev.8947 I got the error reported in this thread. I also got the error
> with the latest svn trunk, rev.9036, which I just downloaded and
> installed.
>
> I had a look at the source code and the files playerc++.h and
> localizeproxy.cc (as well as the online documentation) are coherent,
> where the SetPose() function is defined/implemented as:
> void SetPose(double pose[3], double cov[3]);
>
> In my code, I have:
> double mean[3];
> double cov[3];
>
> Then, I checked the above patch for playernav (gui.c) and the variable
> relative to the covariance is defined as:
> static double cov[6] = { ... };
>
> I changed my code to:
> double mean[3];
> double cov[6];
>
> And now player doesn't crash (amcl appears to be working too).
>
> I skimmed through the amcl.cc file and I got rather confused,
> particularly with the implementation of PutDataLocalize(), where the
> assertion fails, and ProcessMessage().
>
> Has anyone come across this issue?
>
> I noticed that only the diagonal of the 3x3 matrix (the variance) is
> used in amcl, right?
> Could anyone kindly explain why it is now necessary to have a 3x3
> covariance matrix cov[6] (well, it makes sense, as mean[3] has 3
> elements) even though the function prototype/implementation defines it
> should be cov[3]?
>
> Perhaps the localizeproxy was not updated after changes to amcl...?!
>
> Regards,
>
> Murilo
>
The covariance array in the Localize interface was changed to be 6 units
long so that the entire covariance matrix could be passed (assuming it
is symmetric,) rather than just the diagonal elements. This change
effects all of the drivers that implement the localize interface, not
just amcl[1]. It does look like SetPose in playerc++ was overlooked
during that change; it should have a 6 element covarience array (the
playerc function it calls correctly assumes a 6 element covarience). I
will update this in the trunk and copy over corrected documentation.
If there are any other instances of the 3-element covariance array, they
will need to be fixed as well.
Rich
[1]
http://playerstage.sourceforge.net/doc/Player-svn/player/structplayer__localize__hypoth.html
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb