ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I don't have experience with this use case. But in an at least similar situation (having to run multiple SLAM algorithms simultaneously, but only using one), we did something I could imagine could help here as well.

I'm assuming you have both, navigation with amcl and navigation with GPS setup and working. I.e. both run perfectly fine seperatly. Also, you need to have the origin of both aligned.

The most important thing is to handle tf then. Best would be if you remap the tf output of the localization nodes to nirvana (something like tf_disabled) or disable it altogether (amcl has the tf_broadcast parameter). Then create a node that subscribes to both pose topics of your localization algorithms (i.e. amcl_pose and equivalent). With those two topics you have the relevant information in your node. Your node then needs to evaluate your conditions (whether if this is a simple "if-in-here-than-this-localization" check or something more fancy like weighted average with adjustable weight or even something like a Kalman-Filter with dynamic covariances) and publish the result on a topic and broadcast the relevant transform to tf.

There are still some issues that need to be resolved:

  • you should avoid larger jumps, as this could badly influence the navigation/path_planning within move_base.
  • If you use a static costmap layer, the origins are again important
  • if you want to do some gps fencing around the pool, this obviously needs to be handleded in path_planning as well.