Skip to content

Commit b2f4a6d

Browse files
committed
unpackDistribution fixes covar
1 parent 7134287 commit b2f4a6d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

IncrementalInferenceTypes/src/serialization/services/SerializingDistributions.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,20 @@ function DFG.unpack(dtr::PackedFullNormal)
2828
end
2929
DFG.unpack(dtr::PackedRayleigh) = Rayleigh(dtr.sigma)
3030

31+
32+
# function unpackDistribution(dtr::PackedFullNormal)
33+
34+
# SM = SymmetricPositiveDefinite(length(dtr.mu))
35+
# S = reshape(dtr.cov, length(dtr.mu), :)
36+
# ch = check_point(SM, S; atol = 1e-9)
37+
# if !isnothing(ch)
38+
# @warn "IMU Covar check" ch
39+
# S = (S + S') / 2
40+
# S = S + diagm((diag(S) .== 0)*1e-15)
41+
# ch = check_point(SM, S)
42+
# !isnothing(ch) && @error "IMU Covar check" ch
43+
# end
44+
45+
# # return MvNormal(dtr.mu, reshape(dtr.cov, length(dtr.mu), :))
46+
# return MvNormal(dtr.mu, S)
47+
# end

0 commit comments

Comments
 (0)