-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMCL] Add option to force nomotion update after initialpose #1226
[AMCL] Add option to force nomotion update after initialpose #1226
Conversation
When setting the new parameter force_nomotion_update_after_initialpose is set to true, a filter update is forced after the pose is re-initialized with a message on /initialpose. This often results in a better pose right after re-localization, without any motion needed.
I added another commit to add a second parameter |
amcl/cfg/AMCL.cfg
Outdated
@@ -28,6 +28,8 @@ gen.add("beam_skip_distance", double_t, 0, "Distance from a valid map point befo | |||
gen.add("beam_skip_threshold", double_t, 0, "Ratio of samples for which the scans are valid to consider as valid scan", 0.3, 0, 1) | |||
|
|||
gen.add("tf_broadcast", bool_t, 0, "When true (the default), publish results via TF. When false, do not.", True) | |||
gen.add("force_nomotion_update_after_initialpose", bool_t, 0, "When true, force a pose update after a new /initialpose is received.", False) | |||
gen.add("force_nomotion_update_after_set_map", bool_t, 0, "When true, force a pose update after a new map (and pose) has been set via the /set_map service.", False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to include "nomotion" in the names? These are pretty long variable names, and "force_update_after_X" seems to convey exactly what is going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikeferguson done
Thanks @mikeferguson! |
@mikeferguson would you be so kind and bloom a noetic release to get this in? |
Awesome, thank you @mikeferguson! |
force_update_after_initialpose
. When set totrue
, an update is forced on the next laser scan callback, such as when the/request_nomotion_update
service is called. This often results in an improved robot pose after a manual (not very precise) re-localization - without a need for the robot to move.now
, catching exceptions by value), normalizes how tf exceptions are caught.