-
Notifications
You must be signed in to change notification settings - Fork 20
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
Beam skipping in likelihood field model #187
Comments
Hi there @nahueespinosa @hidmic! should we create a new sensor model type called |
@DPR00 From the looks of it, these are the inputs of the algorithm:
One of these two problems need to be solved here:
In my view, the best solution would be to decouple the likelihood field from the likelihood field sensor model, and create a new free-function that implements the beam skipping algorithm. A bit of pseudo-code: auto likelihood_field = LikelihoodField{map};
auto sensor_model = LikelihoodFieldModel{likelihood_field, ...};
...
for (auto&& [measurement, ...] : data) {
auto filtered_measurement = skip_unlikely_beams(particles, measurement, ...);
particles |= beluga::actions::propagate(...) |
beluga::actions::reweight(sensor_model(std::move(filtered_measurement)) |
...
} As a side note, they don't seem to use the cubic formula to aggregate probabilities in this model, so we should look into that as well. |
They use log weights. I'd be inclined towards keeping the LikelihoodFieldModel for 2D in the same class, using the parametrization and abstractions discussed above, and deferring the weight discussion for #153. In my mind, we should eventually define a |
I wonder if, instead of implementing it, we should evaluate whether this actually makes a difference in performance. Is there empirical or bibliographic support for this feature? Does people use this? The multi-parameter statistical parameter for the beam moel models unmapped obstacles to some extent. The likelihood model lacks this term because it "sees through". At first sight, pre-selecting measurements that confirm the proposal distribution with no other model to support this sounds like selection bias to me. |
There's neither other than being a long standing feature in Nav2. We also won't know whether it makes a difference in performance until after we have tried it, but unlike most situations we could use Nav2 AMCL as the "reference" implementation for a quick validation.
It does come off as a hack to mitigate the numerical issues that motivate likelihood aggregation via sums of cubes. |
All in all, in general and from a process perspective, I'd like to have a standard procedure for validating improvement hypothesis such as this. Landing Ekumen-OS/lambkin#93 and #415 will get us one step closer to that. |
FTR I unearthed ros-planning/navigation#238. Those numbers they promised never saw the light of day, and yet it was merged, so I can only assume author and maintainer knew each other. |
Indeed, but notice that we know the sum of cubes works because it's the default and therefore we can infer people have been using it for years with no complains, even if it lacks rigorous support. That's not so clear for beam skipping; I can't really tell how many people actually use this, and the node defaults to not doing it, which maybe also speaks for how broadly relevant this feature is. I think doing a nav2-vs-nav2 sanity check would be a nice thing to do before embarking on an implementation that might require changes to API to get to work. |
I'm with you in everything but the Anyways, this goes beyond this feature. We don't have a clear vetting procedure for feature requests, so we go pursue them all and defer that choice to the user. In a perfect world, I'd first rank them based on theoretical soundness, then enforce data-driven checks. I wouldn't want to stall development until we have that though.
👍 I fully agree with that. FYI @DPR00. |
Interesting. @mikeferguson by any chance do you remember any context about the beam skipping feature in ros-planning/navigation#238 ? |
That's a long time ago - but looking at the repo it came from, and who was involved, I think this was used in the Kuri robot? I'm guessing there was a side conversation, but I don't have any metrics to provide on whether this does much to improve performance. |
@DPR00 the base skeleton benchmark is already up and working Ekumen-OS/lambkin#116 , feel free to take over. Notes:
nav2_amcl_likelihood_posenav2_amcl_likelihood_prob_posenav2_amcl_likelihood_beam_skip_poseRecommendations:
|
Thanks @glpuga for the help! Diff-drive plots:
Open image in a new tab for better visibility Omni-drive plots:
Open image in a new tab for better visibility |
Check that that are no "unknown" patches or obstacles in the map in the region the robot is driving over. I found some TorWIC maps that need manual fixing to solve this. This is probably an artifact of the operator walking in front of the robot when the data was gathered that were not picked up by cartographer. For example:
No idea, I had never seen that happen. I that using the first mcap file of the omni dataset? |
while the 24hs dataset is still running, the a broader set of datasets continues to confirm the trend that:
|
Updated report (same underliying data) where 95% confidence intervals around mean and median are now also calculated using bootstraping. |
Description
Beam skipping is a heuristic implemented in the likelihood_field_model_prob from
nav2
that can potentially help with dynamic obstacles. The idea is to ignore the beams for which the majority of the particles do not match the map, this would prevent the correct particles from getting down weighted due to unexpected obstacles such as humans.To do that, the algorithm first goes through all the particles and calculates the percentage of particles for which a particular beam matches the map, if it is below a certain threshold, it ignores that beam when calculating the weight of each particle in a second step. If the number of beams to be skipped falls below a certain threshold, it will disable beam skipping for that iteration and integrate all beams.
Definition of done
Beam skipping feature implemented in Beluga.
The text was updated successfully, but these errors were encountered: