Conversation
zsunberg
requested changes
Nov 14, 2024
Comment on lines
+3
to
+6
| struct RaoBlackwellizedParticleFilter <: Updater | ||
| particle_filter::BasicParticleFilter | ||
| analytical_filter::AbstractFilter # https://github.com/sisl/GaussianFilters.jl/blob/master/src/kf_classes.jl#L7 | ||
| end |
Member
There was a problem hiding this comment.
Suggested change
| struct RaoBlackwellizedParticleFilter <: Updater | |
| particle_filter::BasicParticleFilter | |
| analytical_filter::AbstractFilter # https://github.com/sisl/GaussianFilters.jl/blob/master/src/kf_classes.jl#L7 | |
| end | |
| struct RaoBlackwellizedParticleFilter{PF, AF} <: Updater | |
| particle_filter::PF | |
| analytical_filter::AF | |
| end |
abstract field types can negatively effect performance. We should have a docstring explaining what is expected of particle_filter and analytical_filter.
| analytical_filter::AbstractFilter # https://github.com/sisl/GaussianFilters.jl/blob/master/src/kf_classes.jl#L7 | ||
| end | ||
|
|
||
| mutable struct RaoBlackwellizedParticleCollection{P, T<:AbstractVector{<:Number}, S<:Symmetric{<:Number}, SP, AP, R} <: RaoBlackwellizedParticleBelief |
Member
There was a problem hiding this comment.
I don't think this needs to be mutable
| normalized_weights = weights ./ sum(weights) | ||
| analytical_means = [belief.μ for belief in b.analytical_beliefs] | ||
| weighted_analytical_mean = sum(normalized_weights .* analytical_means) | ||
| return (particles_mean, weighted_analytical_mean) |
Member
There was a problem hiding this comment.
these should be concatenated (vcat)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request to open-source RBPF that uses GaussianFilters.jl (https://github.com/sisl/GaussianFilters.jl)