0
$\begingroup$

I'm trying to perform Localization in outdoor and indoor situations, and I would like to remap the /tf publisher from AMCL node so I can redirect it to a mux where I could select which algorithm transform should I use.

If I'm not wrong, using the remap tag would also affect not the publisher but also the subscriber, and I can't do that since AMCL needs the transform from the laser_frame to odom.

I thought this idea because I haven't seen any way to stop AMCL from publishing, without exiting the node.

Could I do this somehow? Or am I doing something wrong?

$\endgroup$

2 Answers 2

1
$\begingroup$

If you use navigation AMCL implementation, consider using the tf_broadcast param.

It controls whether the broadcast happens or not and it supports dynamic reconfigure, which makes it possible to update the param on-the-fly.

$\endgroup$
1
  • $\begingroup$ Hello Dimitry, and thanks for the answer. That's good to know, I was expecting somehow a dynamic reconfigure setup in AMCL package, and I was stunned that there wan't, but didn't take into account that it could be done in navigation. At the moment I'm not using it, but I might, which in that case, it could be done with this. $\endgroup$
    – ÁngeLoGa
    Nov 9, 2023 at 9:00
1
$\begingroup$

Dmitry's solution should work, but it seems cleaner to me if you make the mux responsible for publishing the map->odom transform, and disable this feature in the amcl node. The mux would subscribe to the robot's pose published by amcl node.

$\endgroup$
1
  • $\begingroup$ Hello Mike, thank you for the answer. Your approach was my first suggestion. I thought that the main focus of AMCL node was to publish the tf in order to do the localization, but from your answer I can tell that I could still count with the published amcl_pose msg in order to "create" the tf stimated by AMCL, right? I'll get into this and see if I get it to work! $\endgroup$
    – ÁngeLoGa
    Nov 9, 2023 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.