Skip to content

Commit

Permalink
Merge pull request #1626 from JuliaRobotics/22Q3/enh/manitestimpr
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Sep 7, 2022
2 parents b6559ad + b01a297 commit 8a11833
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ParametricUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ function getMeasurementParametric(s::AbstractFactor)
return getMeasurementParametric(Z)
end

getMeasurementParametric(fct::DFGFactor) = getMeasurementParametric(getFactorType(fct))
getMeasurementParametric(dfg::AbstractDFG, flb::Symbol) = getMeasurementParametric(getFactor(dfg, flb))

## ================================================================================================
## Parametric solve with Mahalanobis distance - CalcFactor
## ================================================================================================
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ end
if TEST_GROUP in ["all", "basic_functional_group"]
include("testSphereMani.jl")
include("testSpecialOrthogonalMani.jl")
include("testBasicManifolds.jl")
include("testSpecialEuclidean2Mani.jl")

# start as basic as possible and build from there
Expand Down
27 changes: 27 additions & 0 deletions test/testBasicManifolds.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# test Manifolds

using Manifolds
using Test

##

@testset "Basic Manifolds consistency check" begin
##

w = [-0.0;-0.78;-0.18]

M = SpecialEuclidean(3)
Mr = M.manifold[2]
pPq = ArrayPartition(zeros(3), exp(Mr, Identity(Mr), hat(Mr, Identity(Mr), w)))
rPc_ = exp(M, Identity(M), hat(M, Identity(M), [zeros(3);w]))
rPc = ArrayPartition(rPc_.parts[1], rPc_.parts[2])

@test isapprox(pPq.x[1], rPc.x[1])
@test isapprox(pPq.x[2], rPc.x[2])

##
end


##

0 comments on commit 8a11833

Please sign in to comment.