1

I am building a range-only localisation application that I would like to use an MRPT particle filter for. I am looking at the MRPT example applications:

ro-localization
pf-localization
rbpf-slam

All of these run fine on the sample data, but the resulting pose is returned in 2D only. The pf-localization sample has a use_3D_poses = true setting, but this just adds a 0 return for the Z axis.

I have tried adding Z values to the beacons, but the pose Z is always zero. How can I use the MRPT particle filter in 3D space, instead of 2D?

I am only interested in the XYZ position values of the mobile node.

How can I use my own live data? I have:

Anchor positions Distance from Anchor to Mobile node.

I am using MRPT on windows, built from source.

anti
  • 3,011
  • 7
  • 36
  • 86

1 Answers1

1

The different RO-SLAM and RO-localization possibilities are now better described in this page of MRPT docs.

On using pf-localization with your own data, you could directly use a custom program making use of mrpt::slam::CMonteCarloLocalization3D. Alternatively, you could stay tuned to the latest version of mrpt (git branch develop) where we'll very soon port the existing pf-localization CLI app into a C++ class in mrpt::apps. The advantage of the latter is to reuse all the log file writing, 3D scenes grabbing and online visualization, etc. But nothing prevents you to jump straight ahead and build your own app based on pf-localization as a starting point.

(Disclaimer: I'm the lead developer of MRPT)

Jose Luis Blanco
  • 705
  • 6
  • 10
  • Hi Jose! Thanks for getting back to me, and for all your amazing work. I have my data as `Anchor structs (int ID, Vector3f position)` and then every sample I get `distance structs (int Anchor ID, float distance)` I am using UWB, so would need the awesome features that `ro-localisation` has to ignore dropouts, spikes etc. What are the rough steps i would need to do to create a new app based on the same code? Or does `CMonteCarloLocalization3D.` have the same functionality? – anti Oct 30 '19 at 18:40
  • ..additionally, what difference in accuracy would I see using live data in `ro-localization` vs ` RBPF-SLAM` ? Which approach would you suggest? – anti Oct 30 '19 at 18:43
  • I would suggest copying the code of apps/ro-localization into your own project, read about writing a CMakeLists.txt that uses MRPT libs to polish the CMakeLists.txt, then changing the code to read from whenever you want instead of reading from a .rawlog file. – Jose Luis Blanco Oct 31 '19 at 19:41
  • On the other question: rbpf-slam should work for building the map, once the map is built, go with the regular ro-localization PF (without the RB- part...). Cheers – Jose Luis Blanco Oct 31 '19 at 19:41
  • Hi again, I started this process, but it looks like the pf-localization code is hardcoded to use 2d data in places. The `use_3D_poses ` bool in the example appears to have no effect. Is this right? or am i missing something. Thanks yet again! – anti Nov 07 '19 at 20:41
  • Hmm... nope, the use of `use_3D_poses` actually ends up selecting which instantiation of the PF problem will be run, so it will use a different class for 2D and 3D. Perhaps there are some forgotten uses of 2D poses in the pf-localization app for debugging, measuring distances to ground-truth, etc. but the PF estimation can indeed be run in either 2D or 3D. – Jose Luis Blanco Nov 09 '19 at 21:04