Skip to content

[WIP] Rao-Blackwellized Particle Filter#73

Open
jihodori wants to merge 1 commit intomasterfrom
rbpf
Open

[WIP] Rao-Blackwellized Particle Filter#73
jihodori wants to merge 1 commit intomasterfrom
rbpf

Conversation

@jihodori
Copy link
Copy Markdown

@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
Copy Markdown
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 thread src/raoblackwellized.jl
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
Copy Markdown
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.

Comment thread src/raoblackwellized.jl
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
Copy Markdown
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

Comment thread src/raoblackwellized.jl
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
Copy Markdown
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