Skip to content
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

Make beluga_amcl a drop-in replacement of nav2_amcl #85

Closed
47 of 52 tasks
nahueespinosa opened this issue Jan 25, 2023 · 8 comments
Closed
47 of 52 tasks

Make beluga_amcl a drop-in replacement of nav2_amcl #85

nahueespinosa opened this issue Jan 25, 2023 · 8 comments
Labels
meta High-level information or task

Comments

@nahueespinosa
Copy link
Member

nahueespinosa commented Jan 25, 2023

Description

This ticket is meant to track the progress in making a drop-in replacement of nav2_amcl in terms of interface and parameters.
Specific features and requirements will be best tracked in their own issues.

Definition of done

Complete the implementation of the following list of parameters, services, publishers and subscribers:

@glpuga
Copy link
Collaborator

glpuga commented Feb 4, 2023

I just noticed that that ROS1 AMCL has a selective_resampling option that's not present in NAV2. This is different from the resample_interval option. This may be relevant if we decide that #95 is worth pursuing. Apparently it implements this paper:

Grisetti, Giorgio, Cyrill Stachniss, and Wolfram Burgard. "Improved techniques for grid mapping with rao-blackwellized particle filters."

It's a feature that was merged into Kinetic early in 2020, was then forwarded to Melodic, and is present in Noetic. However, it seems to have fallen through the cracks before it made it to NAV2 (this may be worth bringing up as well).

Screenshot from 2023-02-04 20-20-02

@nahueespinosa
Copy link
Member Author

Good find! I added a bullet point for this in #57.

@olmerg
Copy link
Collaborator

olmerg commented Mar 10, 2023

The two services implemented in nav2 are reinitialize_global_localization and request_nomotion_update , this service do not receive or return none, just generate an action inside the node:

  • Reinitialize global localization call pf_init_model and set initial_pose_is_known by true. This service Initialize the filter using some model which consists in create kd-tree for adaptive sampling, computing the new samples poses, adding samples to the histogram and re-compute cluster statistics. All of these use a uniform Pose generator over the map. It is like create again the object so I think we can use ParticleBaselineGeneration.
  • Request no motion update put in true force_update_. this variable modifies if we should update the filter. Additionally, when this flag is true the particle cloud is not published. Some additional point about this flag is that set to true on_cleanup and set false after it is used to decide read the laser. So conclusion this service forces the filter to work when there is no movement.

@olmerg
Copy link
Collaborator

olmerg commented Mar 10, 2023

About parameters:

  • save_pose_rate parameter (0.5). Maximum rate (Hz) at which to store the last estimated pose and covariance to the parameter server, in the variables initial_pose_ and initial_cov. This saved pose will be used on subsequent runs to initialize the filter (-1.0 to disable). This creates a variable called save_pose_period_ but this variable I do not find where is used. I do not find where initial_pose and initial_cov are used.
  • always_reset_initial_pose (false). Requires that AMCL is provided an initial pose either via topic or initial_pose parameter (with parameter set_initial_pose: true) when reset. Otherwise, by default AMCL will use the last known pose to initialize. This variable set initial_pose_is_known_ like false, which only can change by initial_pose topic or reinitialize_global_localization
  • first_map_only (false). Set this to true, when you want to load a new map published from the map_server. Just not update the map when the callback receives a new map.

@olmerg
Copy link
Collaborator

olmerg commented Mar 10, 2023

About todo in amcl_node,

  • TODO(ivanpauno): Intialize later maps from last known pose.
  • TODO(nahuel): Add a parameter for the timer period.
  • TODO(nahuel): Throttle the particle cloud publishing in the laser_callback method instead of using a ROS timer.
  • do we have ? When pausing and resuming, remember the last robot pose so we don't start at 0:0 again

@olmerg
Copy link
Collaborator

olmerg commented Mar 15, 2023

  • save_pose_rate parameter (0.5). Maximum rate (Hz) at which to store the last estimated pose and covariance to the parameter server, in the variables initial_pose_ and initial_cov. This saved pose will be used on subsequent runs to initialize the filter (-1.0 to disable). This creates a variable called save_pose_period_ but this variable I do not find where is used. I do not find where initial_pose and initial_cov are used.

This parameter come from ros 1 version the idea was "Is it time to save our last pose to the param server"
https://github.com/ros-planning/navigation/blob/noetic-devel/amcl/src/amcl_node.cpp#L1518

In ros2 the action to save the parameters is made during on_cleanup

@olmerg
Copy link
Collaborator

olmerg commented May 12, 2023

About parameters:

  • save_pose_rate parameter (0.5). Maximum rate (Hz) at which to store the last estimated pose and covariance to the parameter server, in the variables initial_pose_ and initial_cov. This saved pose will be used on subsequent runs to initialize the filter (-1.0 to disable). This creates a variable called save_pose_period_ but this variable I do not find where is used. I do not find where initial_pose and initial_cov are used.

This parameter is deprecated!!

nahueespinosa added a commit that referenced this issue May 15, 2023
Related to #183. Now the particle filter will use the last known
estimate for initialization when a new map arrives. Ideally we would
update the occupancy grid in the particle filter without losing the
current particle set, but that feature doesn't exist in Beluga yet.
Related to #85.

* Initialize filter with last known estimate when we have a map update
* Warn when callback messages are ignored
* Remove `this` usage for consistency
* Remove unused members of `AmclNode`
* Change configuration file to play nicely with the example rosbag
* Add `always_reset_initial_pose` parameter
* Add `first_map_only` parameter
* Add mutually exclusive callback group

Signed-off-by: Nahuel Espinosa <[email protected]>
@nahueespinosa nahueespinosa unpinned this issue May 16, 2023
@nahueespinosa
Copy link
Member Author

With #196 documenting the current compatibility state between beluga_amcl and nav2_amcl, this ticket is no longer necessary.

#172, #184 and #187 describe the remaining work to be done to achieve full feature parity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta High-level information or task
Projects
None yet
Development

No branches or pull requests

3 participants