Skip to content

Commit 455edaa

Browse files
authored
Updates for manifolds v0.10 (#754)
* Updates for manifolds v0.10 * fix getManifold(::DynPose2DynPose2) * add docstring to IMUDeltaGroup + references * Fix imu factor test, the factor looks correct
1 parent aa7549b commit 455edaa

25 files changed

+87
-61
lines changed

Project.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "RoME"
22
uuid = "91fb55c2-4c03-5a59-ba21-f4ea956187b8"
33
keywords = ["SLAM", "state-estimation", "MM-iSAM", "MM-iSAMv2", "inference", "robotics"]
44
desc = "Non-Gaussian simultaneous localization and mapping"
5-
version = "0.24.5"
5+
version = "0.24.6"
66

77
[deps]
88
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
@@ -26,6 +26,7 @@ OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
2626
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
2727
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
2828
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
29+
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
2930
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
3031
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
3132
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@@ -65,7 +66,7 @@ IncrementalInference = "0.35"
6566
Interpolations = "0.14, 0.15"
6667
KernelDensityEstimate = "0.5.1, 0.6"
6768
LinearAlgebra = "1.10"
68-
Manifolds = "0.9"
69+
Manifolds = "0.10.1"
6970
ManifoldsBase = "0.15"
7071
Optim = "0.22, 1"
7172
OrderedCollections = "1"

ext/RoMECameraModelsExt.jl

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ using StaticArrays
77
using Manifolds
88
using DocStringExtensions
99
using Optim
10+
using RecursiveArrayTools: ArrayPartition
1011

1112
import Base: convert
1213
import IncrementalInference: AbstractDFG, getFactorType, getVariable, getSolverData, CalcFactor, ls

src/Deprecated.jl

+8-3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ Base.convert(
6464
Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(AMP.SE2_Manifold)}) = (:Euclid, :Euclid, :Circular)
6565
Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(SE2E2_Manifold)}) = (:Euclid,:Euclid,:Circular,:Euclid,:Euclid)
6666
Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(BearingRange_Manifold)}) = (:Circular,:Euclid)
67+
Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(getManifold(DynPose2))}) = (:Euclid,:Euclid,:Circular,:Euclid,:Euclid)
6768

68-
Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(Manifolds.ProductGroup(ProductManifold(SpecialEuclidean(2), TranslationGroup(2))))}) = (:Euclid,:Euclid,:Circular,:Euclid,:Euclid)
69+
70+
Base.convert(
71+
::Type{<:Tuple},
72+
::IIF.InstanceType{typeof(Manifolds.ProductGroup(ProductManifold(SpecialEuclidean(2), TranslationGroup(2)), LeftInvariantRepresentation()))}
73+
) = (:Euclid,:Euclid,:Circular,:Euclid,:Euclid)
6974

7075

7176
# Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{Point2Point2}) = AMP.Euclid2
@@ -77,8 +82,8 @@ Base.convert(::Type{<:Tuple}, ::IIF.InstanceType{typeof(Manifolds.ProductGroup(P
7782
# Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{Pose2Pose2}) = AMP.SE2_Manifold
7883
# Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{Pose3Pose3}) = AMP.SE3_Manifold
7984
Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{DynPoint2DynPoint2}) = AMP.Euclid4
80-
Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{DynPose2DynPose2}) = SE2E2_Manifold
81-
Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{VelPose2VelPose2}) = SE2E2_Manifold
85+
Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{DynPose2DynPose2}) = begin @warn("FIXME"); SE2E2_Manifold end
86+
Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::IIF.InstanceType{VelPose2VelPose2}) = begin @warn("FIXME"); SE2E2_Manifold end
8287

8388

8489

src/RoME.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ using
2020
DocStringExtensions,
2121
DistributedFactorGraphs,
2222
TensorCast,
23-
ManifoldsBase
23+
ManifoldsBase,
24+
Manifolds
2425

2526
using StaticArrays
2627
using PrecompileTools
27-
28+
using RecursiveArrayTools
2829
# to avoid name conflicts
2930
import Manifolds
3031
using Manifolds: hat, ProductGroup, ProductManifold, SpecialEuclidean, SpecialOrthogonal, TranslationGroup, identity_element, submanifold_component, Identity, affine_matrix

src/factors/BearingRange2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mutable struct Pose2Point2BearingRange{B <: IIF.SamplableBelief, R <: IIF.Sampla
1212
range::R
1313
end
1414

15-
getManifold(::IIF.InstanceType{<:Pose2Point2BearingRange}) = ProductGroup(ProductManifold(SpecialOrthogonal(2), TranslationGroup(1)))
15+
getManifold(::IIF.InstanceType{<:Pose2Point2BearingRange}) = ProductGroup(ProductManifold(SpecialOrthogonal(2), TranslationGroup(1)), LeftInvariantRepresentation())
1616

1717
function getSample(cfo::CalcFactor{<:Pose2Point2BearingRange})
1818
# defaults, TODO better reuse

src/factors/DynPose2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ end
147147
preambleCache(::AbstractDFG, ::AbstractVector{<:DFGVariable}, ::DynPose2DynPose2) = zeros(5)
148148

149149
# FIXME ON FIRE, must update to new Manifolds style factors
150-
getManifold(::DynPose2DynPose2) = SE2E2_Manifold # not fully impl manifold yet
150+
getManifold(::DynPose2DynPose2) = getManifold(DynPose2)
151151
# FIXME, should produce tangents, not coordinates.
152152
getSample(cf::CalcFactor{<:DynPose2DynPose2}) = rand(cf.factor.Z)
153153
function (cf::CalcFactor{<:DynPose2DynPose2})(meas,

src/factors/Inertial/IMUDeltaFactor.jl

+20-14
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,28 @@ struct IMUDeltaManifold <: AbstractManifold{ℝ} end
1010

1111
# NOTE Manifold in not defined as a ProductManifold since we do not use the product metric. #701
1212
# also see related SE₂(3)
13+
"""
14+
IMUDeltaGroup
15+
16+
#TODO SpecialGalileanGroup(3)
17+
References:
18+
- https://hal.science/hal-02183498/document
19+
- TODO new reference: https://arxiv.org/pdf/2312.07555
1320
21+
Affine representation
22+
Δ = [ΔR Δv Δp;
23+
0 1 Δt;
24+
0 0 1] ⊂ ℝ⁵ˣ⁵
25+
26+
ArrayPartition representation (TODO maybe swop order to [Δp; Δv; ΔR; Δt])
27+
Δ = [ΔR; Δv; Δp; Δt]
28+
"""
1429
const IMUDeltaGroup = GroupManifold{ℝ, IMUDeltaManifold, MultiplicationOperation}
1530

16-
IMUDeltaGroup() = GroupManifold(IMUDeltaManifold(), MultiplicationOperation())
31+
IMUDeltaGroup() = GroupManifold(IMUDeltaManifold(), MultiplicationOperation(), LeftInvariantRepresentation())
1732

1833
Manifolds.manifold_dimension(::IMUDeltaManifold) = 9
1934

20-
# Affine representation
21-
# Δ = [ΔR Δv Δp;
22-
# 0 1 Δt;
23-
# 0 0 1] ⊂ \R^5x5
24-
25-
# ArrayPartition representation (TODO maybe swop order to [Δp; Δv; ΔR; Δt])
26-
# Δ = [ΔR; Δv; Δp; Δt]
2735

2836
function Manifolds.identity_element(M::IMUDeltaGroup) # was #SMatrix{5,5,Float64}(I)
2937
ArrayPartition(
@@ -387,10 +395,8 @@ function (cf::CalcFactor{<:IMUDeltaFactor})(
387395
q_vel,
388396
b::SVector{6,T} = zeros(SVector{6,Float64})
389397
) where T <: Real
390-
p_t = Dates.value(cf.cache.timestams[1])*1e-9
391-
q_t = Dates.value(cf.cache.timestams[2])*1e-9
392-
p = ArrayPartition(p_SE3.x[2], p_vel, p_SE3.x[1], p_t)
393-
q = ArrayPartition(q_SE3.x[2], q_vel, q_SE3.x[1], q_t)
398+
p = ArrayPartition(p_SE3.x[2], p_vel, p_SE3.x[1])
399+
q = ArrayPartition(q_SE3.x[2], q_vel, q_SE3.x[1])
394400
return cf(Δmeas, p, q, b)
395401
end
396402

@@ -466,7 +472,7 @@ function IMUDeltaFactor(
466472
S = Σ[1:9,1:9]
467473
ch = check_point(SM, S; atol = 1e-9)
468474
if !isnothing(ch)
469-
@warn "IMU Covar check" ch
475+
@warn "IMU Covar check" ch maxlog=1
470476
S = (S + S') / 2
471477
S = S + diagm((diag(S) .== 0)*1e-15)
472478
ch = check_point(SM, S)
@@ -480,7 +486,7 @@ function IMUDeltaFactor(
480486
Δt,
481487
Δ,
482488
SMatrix{10,10,Float64}(Σ),
483-
J_b,
489+
SMatrix{10,6,Float64}(J_b),
484490
SA[a_b...; ω_b...],
485491
IMUMeasurements(
486492
accels,

src/factors/PartialPose3.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ Pose3Pose3XYYaw(xy::SamplableBelief, yaw::SamplableBelief) = error("Pose3Pose3XY
109109
# Pose3Pose3XYYaw(z::SamplableBelief) = Pose3Pose3XYYaw(z, (1,2,4,5,6)) # (1,2,6))
110110
Pose3Pose3XYYaw(z::SamplableBelief) = Pose3Pose3XYYaw(z, (1,2,6))
111111

112-
getManifold(::Pose3Pose3XYYaw) = SpecialEuclidean(2)
112+
getManifold(::Pose3Pose3XYYaw) = SpecialEuclidean(2; vectors=HybridTangentRepresentation())
113113

114114

115115
## NOTE, Yaw only works if you assume a preordained global reference point, such as identity_element(Pose3)
116116
function (cfo::CalcFactor{<:Pose3Pose3XYYaw})(X, wTp, wTq )
117117
#
118-
M = SpecialEuclidean(2)
118+
M = SpecialEuclidean(2; vectors=HybridTangentRepresentation())
119119

120120
rx = normalize(view(wTp.x[2],1:2, 1))
121121
R = SA[rx[1] -rx[2];

src/factors/Pose2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Base.@kwdef struct Pose2Pose2{T <: IIF.SamplableBelief} <: IIF.AbstractManifoldM
3131
Z::T = MvNormal(Diagonal([1.0; 1.0; 1.0]))
3232
end
3333

34-
DFG.getManifold(::InstanceType{Pose2Pose2}) = Manifolds.SpecialEuclidean(2)
34+
DFG.getManifold(::InstanceType{Pose2Pose2}) = Manifolds.SpecialEuclidean(2; vectors=HybridTangentRepresentation())
3535

3636
Pose2Pose2(::UniformScaling) = Pose2Pose2()
3737

src/factors/Pose2Point2.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function (cfo::CalcFactor{<:Pose2Point2})(p_Xpq,
2424
w_T_p,
2525
w_Tl_q )
2626
#
27-
M = SpecialEuclidean(2)
27+
M = SpecialEuclidean(2; vectors=HybridTangentRepresentation())
2828

2929
p_T_qhat = ArrayPartition(SA[p_Xpq[1];p_Xpq[2]], SMatrix{2,2}([1 0; 0 1.]))
3030
_w_T_p = ArrayPartition(SA[w_T_p.x[1]...], SMatrix{2,2}(w_T_p.x[2]))

src/factors/PriorPose2.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ end
1616

1717
DFG.getManifold(::InstanceType{PriorPose2}) = getManifold(Pose2) # SpecialEuclidean(2)
1818

19-
@inline function _vee(::typeof(SpecialEuclidean(2)), X::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}) where T<:Real
19+
@inline function _vee(::typeof(SpecialEuclidean(2; vectors=HybridTangentRepresentation())), X::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}) where T<:Real
2020
return SVector{3,T}(X.x[1][1],X.x[1][2],X.x[2][2])
2121
end
2222

23-
@inline function _compose(::typeof(SpecialEuclidean(2)), p::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}, q::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}) where T<:Real
23+
@inline function _compose(::typeof(SpecialEuclidean(2; vectors=HybridTangentRepresentation())), p::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}, q::ArrayPartition{T, Tuple{SVector{2, T}, SMatrix{2, 2, T, 4}}}) where T<:Real
2424
return ArrayPartition(p.x[1] + p.x[2]*q.x[1], p.x[2]*q.x[2])
2525
end
2626

src/factors/Range2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Pose2Point2Range(Z::T) where {T <: IIF.SamplableBelief} = Pose2Point2Range(;Z)
4848
getManifold(::Pose2Point2Range) = TranslationGroup(1)
4949

5050

51-
function (cfo::CalcFactor{<:Pose2Point2Range})(rho, xi::Manifolds.ArrayPartition, lm)
51+
function (cfo::CalcFactor{<:Pose2Point2Range})(rho, xi::ArrayPartition, lm)
5252
# Basically `EuclidDistance`
5353
return rho .- norm(lm .- xi.x[1])
5454
end

src/services/AdditionalUtils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function makePosePoseFromHomography(
5151
covar=diagm([1,1,1,0.1,0.1,0.1].^2)
5252
)
5353
len = size(pHq,1)-1
54-
M = SpecialEuclidean(len)
54+
M = SpecialEuclidean(len; vectors=HybridTangentRepresentation())
5555
e0 = ArrayPartition(SVector(0,0,0.), SMatrix{len,len}(1,0,0,0,1,0,0,0,1.))
5656
pTq = ArrayPartition(SVector(pHq[1:len,end]...), SMatrix{len,len}(pHq[1:len,1:len]))
5757
e0_Cpq = vee(M, e0, log(M, e0, pTq))

src/services/FixmeManifolds.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MB.manifold_dimension(::_SE2E2) = 5
2121

2222
function AMP.makePointFromCoords(::typeof(SE2E2_Manifold), p::AbstractVector{<:Real})
2323
α = p[3]
24-
Manifolds.ArrayPartition(([p[1], p[2]]), [cos(α) -sin(α); sin(α) cos(α)], ([p[4], p[5]]))
24+
ArrayPartition(([p[1], p[2]]), [cos(α) -sin(α); sin(α) cos(α)], ([p[4], p[5]]))
2525
end
2626

2727
function AMP.getPoints(mkd::ManifoldKernelDensity{M}) where {M <: typeof(SE2E2_Manifold)}
@@ -30,11 +30,11 @@ function AMP.getPoints(mkd::ManifoldKernelDensity{M}) where {M <: typeof(SE2E2_M
3030
end
3131

3232
function Statistics.mean(::typeof(SE2E2_Manifold), pts::AbstractVector)
33-
se2_ = (d->Manifolds.ArrayPartition(submanifold_component(d, 1), submanifold_component(d, 2))).(pts)
34-
mse2 = mean(Manifolds.SpecialEuclidean(2), se2_)
35-
e2_ = (d->Manifolds.ArrayPartition(submanifold_component(d, 3))).(pts)
33+
se2_ = (d->ArrayPartition(submanifold_component(d, 1), submanifold_component(d, 2))).(pts)
34+
mse2 = mean(Manifolds.SpecialEuclidean(2; vectors=HybridTangentRepresentation()), se2_)
35+
e2_ = (d->ArrayPartition(submanifold_component(d, 3))).(pts)
3636
me2 = mean(Euclidean(2), e2_)
37-
Manifolds.ArrayPartition(submanifold_component(mse2, 1), submanifold_component(mse2, 2), submanifold_component(me2, 1))
37+
ArrayPartition(submanifold_component(mse2, 1), submanifold_component(mse2, 2), submanifold_component(me2, 1))
3838
end
3939

4040
# AMP._makeVectorManifold(::M, prr::ProductRepr) where {M <: typeof(SE2E2_Manifold)} = coords(M, prr)

src/services/ManifoldUtils.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
function homography_to_coordinates(
9-
M::typeof(SpecialEuclidean(3)),
9+
M::typeof(SpecialEuclidean(3; vectors=HybridTangentRepresentation())),
1010
pHq::AbstractMatrix{<:Real}
1111
)
1212
Mr = M.manifold[2]
@@ -15,7 +15,7 @@ function homography_to_coordinates(
1515
end
1616

1717
function coordinates_to_homography(
18-
M::typeof(SpecialEuclidean(3)),
18+
M::typeof(SpecialEuclidean(3; vectors=HybridTangentRepresentation())),
1919
pCq::AbstractVector
2020
)
2121
e0 = Identity(M)

src/variables/VariableTypes.jl

+14-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $(TYPEDEF)
3232
3333
Pose2 is a SE(2) mechanization of two Euclidean translations and one Circular rotation, used for general 2D SLAM.
3434
"""
35-
@defVariable Pose2 SpecialEuclidean(2) ArrayPartition(SA[0;0.0],SA[1 0; 0 1.0])
35+
@defVariable Pose2 SpecialEuclidean(2; vectors=HybridTangentRepresentation()) ArrayPartition(SA[0;0.0],SA[1 0; 0 1.0])
3636

3737
"""
3838
$(TYPEDEF)
@@ -44,7 +44,7 @@ Future:
4444
- Work in progress on AMP3D for proper non-Euler angle on-manifold operations.
4545
- TODO the AMP upgrade is aimed at resolving 3D to Quat/SE3/SP3 -- current Euler angles will be replaced
4646
"""
47-
@defVariable Pose3 SpecialEuclidean(3) ArrayPartition(SA[0;0;0.0],SA[1 0 0; 0 1 0; 0 0 1.0])
47+
@defVariable Pose3 SpecialEuclidean(3; vectors=HybridTangentRepresentation()) ArrayPartition(SA[0;0;0.0],SA[1 0 0; 0 1 0; 0 0 1.0])
4848

4949

5050
@defVariable Rotation3 SpecialOrthogonal(3) SA[1 0 0; 0 1 0; 0 0 1.0]
@@ -57,7 +57,8 @@ Future:
5757
SpecialOrthogonal(3),
5858
TranslationGroup(3),
5959
TranslationGroup(3)
60-
)
60+
),
61+
LeftInvariantRepresentation()
6162
),
6263
ArrayPartition(
6364
SA[1 0 0; 0 1 0; 0 0 1.0],
@@ -74,7 +75,8 @@ Future:
7475
ProductManifold(
7576
TranslationGroup(3),
7677
TranslationGroup(3)
77-
)
78+
),
79+
LeftInvariantRepresentation()
7880
),
7981
ArrayPartition(
8082
SA[0; 0; 0.0],
@@ -104,7 +106,14 @@ Note
104106
- The `SE2E2_Manifold` definition used currently is a hack to simplify the transition to Manifolds.jl, see #244
105107
- Replaced `SE2E2_Manifold` hack with `ProductManifold(SpecialEuclidean(2), TranslationGroup(2))`, confirm if it is correct.
106108
"""
107-
@defVariable DynPose2 Manifolds.ProductGroup(ProductManifold(SpecialEuclidean(2), TranslationGroup(2))) ArrayPartition(ArrayPartition(SA[0;0.0],SA[1 0; 0 1.0]),SA[0;0.0])
109+
@defVariable(
110+
DynPose2,
111+
Manifolds.ProductGroup(
112+
ProductManifold(SpecialEuclidean(2; vectors=HybridTangentRepresentation()), TranslationGroup(2)),
113+
LeftInvariantRepresentation()
114+
),
115+
ArrayPartition(ArrayPartition(SA[0;0.0],SA[1 0; 0 1.0]),SA[0;0.0])
116+
)
108117

109118

110119

test/inertial/testIMUDeltaFactor.jl

+7-4
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jl = RoME.Jr(M, -X)
141141
X = hat(M, SA[1,0,0, 0,0,0, 0,0,θ, 1] * 0.1)
142142
p = exp(M, ϵ, X)
143143

144-
M_SE3 = SpecialEuclidean(3)
144+
M_SE3 = SpecialEuclidean(3; vectors=HybridTangentRepresentation())
145145
X_SE3 = hat(M_SE3, getPointIdentity(M_SE3), SA[1,0,0, 0,0,θ] * 0.1)
146146
p_SE3 = exp_lie(M_SE3, X_SE3)
147147
@test isapprox(p.x[3], p_SE3.x[1])
@@ -172,11 +172,14 @@ fac = RoME.IMUDeltaFactor(
172172
# Rotation part
173173
M_SO3 = SpecialOrthogonal(3)
174174
ΔR = identity_element(M_SO3)
175-
for g in imu.gyros[1:end-1]
175+
#NOTE internally integration is done from 2:end
176+
# at t₀, we start at identity
177+
# - the measurement at t₀ is from t₋₁ to t₀ and therefore part of the previous factor
178+
# - the measurement at t₁ is from t₀ to t₁ with the time dt of t₁ - t₀
179+
for g in imu.gyros[2:end]
176180
exp!(M_SO3, ΔR, ΔR, hat(M_SO3, Identity(M_SO3), g*dt))
177181
end
178-
#TODO I would have expected these 2 to be exactly the same
179-
@test isapprox(M_SO3, fac.Δ.x[1], ΔR; atol=1e-5)
182+
@test isapprox(M_SO3, fac.Δ.x[1], ΔR)
180183
# Velocity part
181184
@test isapprox(fac.Δ.x[2], [0,0,8.81], atol=1e-3) # after 1 second at 9.81 m/s
182185
# position part

test/testBearing2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using Manifolds: hat
1010

1111
@testset "Testing Bearing2D factor" begin
1212
##
13-
M = SpecialEuclidean(2)
13+
M = SpecialEuclidean(2; vectors=HybridTangentRepresentation())
1414
ϵ = getPointIdentity(M)
1515
ps = [exp(M, ϵ, hat(M, ϵ, [0.,0,0]))]
1616
push!(ps, exp(M, ϵ, hat(M, ϵ, [5.,0,0])))

test/testBearingRange2D.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ addFactor!(fg, [:x0; :l1], p2br, graphinit=false)
340340

341341
# check the forward convolution is working properly
342342
_pts = getPoints(propagateBelief(fg, :x0, ls(fg, :x0); N)[1])
343-
p_μ = mean(SpecialEuclidean(2), _pts)
343+
p_μ = mean(SpecialEuclidean(2; vectors=HybridTangentRepresentation()), _pts)
344344

345345
_pts = IIF.getCoordinates.(Pose2, _pts)
346346
@cast pts[j,i] := _pts[i][j]

test/testDidsonFunctions.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ addFactor!(fg, [:x0;:x1], meas, graphinit=false)
5151
pts = approxConv(fg, :x0x1f1, :x0)
5252

5353

54-
p2 = manikde!(SpecialEuclidean(3), pts);
54+
p2 = manikde!(SpecialEuclidean(3; vectors=HybridTangentRepresentation()), pts);
5555

5656

5757
end

test/testParametric.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ IIF.initParametricFrom!(fg)
171171

172172
PM, varLabels, r, Σ = IIF.solveGraphParametric(fg) #autodiff=:finite)
173173

174-
@test isapprox(SpecialEuclidean(2), r[1], ArrayPartition([2, 0.], [0 -1; 1 0.]), atol = 1e-3)
174+
@test isapprox(SpecialEuclidean(2; vectors=HybridTangentRepresentation()), r[1], ArrayPartition([2, 0.], [0 -1; 1 0.]), atol = 1e-3)
175175

176176
@test isapprox(r[2], [1, 1], atol = 1e-3)
177177
@test isapprox(r[3], [1, -1], atol = 1e-3)

test/testParametricCovariances.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ addFactor!(fg, [:x0,:x1], Pose2Pose2(MvNormal([0.9,0,0], diagm([sqrt(0.03),0.1,0
4646
##
4747

4848
IIF.autoinitParametric!(fg)
49-
IIF.solveGraph!(fg)
49+
# IIF.solveGraph!(fg)
5050

5151
@test isapprox( [0;0;0.], getPPESuggested(fg, :x0, :parametric); atol=1e-4 )
5252
@test isapprox( [1.05;0;0], getPPESuggested(fg, :x1, :parametric); atol=1e-4 )

0 commit comments

Comments
 (0)