Skip to content

[WIP] Rao-Blackwellized Particle Filter #73

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Rao-Blackwellized Particle Filter #73

wants to merge 1 commit into from

Conversation

jihodori
Copy link

@jihodori jihodori commented Nov 14, 2024

Pull request to open-source RBPF that uses GaussianFilters.jl (https://github.com/sisl/GaussianFilters.jl)

@jihodori jihodori requested a review from zsunberg November 14, 2024 18:20
Copy link
Member

@zsunberg zsunberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be concatenated (vcat)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants