Skip to content

Commit b638a6c

Browse files
authored
Merge pull request #1572 from JuliaRobotics/master
v0.30.1-rc1
2 parents d8c8257 + 5a736ae commit b638a6c

22 files changed

+554
-173
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- master
77
- develop
88
- release**
9+
workflow_dispatch:
910
jobs:
1011
test-stable:
1112
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.group }}

Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "IncrementalInference"
22
uuid = "904591bb-b899-562f-9e6f-b8df64c7d480"
33
keywords = ["MM-iSAMv2", "Bayes tree", "junction tree", "Bayes network", "variable elimination", "graphical models", "SLAM", "inference", "sum-product", "belief-propagation"]
44
desc = "Implements the Multimodal-iSAMv2 algorithm."
5-
version = "0.30.0"
5+
version = "0.30.1"
66

77
[deps]
88
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
@@ -29,6 +29,7 @@ MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"
2929
NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c"
3030
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
3131
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
32+
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
3233
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
3334
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3435
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
@@ -62,8 +63,9 @@ MetaGraphs = "0.7"
6263
NLSolversBase = "7.6"
6364
NLsolve = "3, 4"
6465
Optim = "1"
66+
OrderedCollections = "1"
6567
ProgressMeter = "1"
66-
RecursiveArrayTools = "2"
68+
RecursiveArrayTools = "2.31.1"
6769
Reexport = "1"
6870
Requires = "1"
6971
StaticArrays = "1"

src/Factors/GenericFunctions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function convert(::Union{Type{<:AbstractFactor}, Type{<:ManifoldPrior}},
185185
M = DFG.getTypeFromSerializationModule(obj.varType) |> getManifold
186186

187187
# TODO this is too excessive
188-
e0 = identity_element(M)
188+
e0 = getPointIdentity(M)
189189
# u0 = getPointIdentity(obj.varType)
190190
p = AMP.makePointFromCoords(M, obj.p, e0) #, u0)
191191

@@ -204,7 +204,7 @@ end
204204
function samplePointPartial(M::AbstractDecoratorManifold,
205205
z::Distribution,
206206
partial::Vector{Int},
207-
p=identity_element(M),
207+
p=getPointIdentity(M),
208208
retraction_method::AbstractRetractionMethod=ExponentialRetraction())
209209
dim = manifold_dimension(M)
210210
Xc = zeros(dim)

src/Factors/LinearRelative.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ getDimension(::InstanceType{LinearRelative{N}}) where {N} = N
3737
# new and simplified interface for both nonparametric and parametric
3838
function (s::CalcFactor{<:LinearRelative})(z, x1, x2)
3939
# TODO convert to distance(distance(x2,x1),z) # or use dispatch on `-` -- what to do about `.-`
40-
# v0.21+, should return residual
41-
!(z isa Vector{Float64}) && (@warn "H" z x1 x2)
4240
return z .- (x2 .- x1)
4341
end
4442

src/IncrementalInference.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ using Manifolds
1616
using RecursiveArrayTools: ArrayPartition
1717
export ArrayPartition
1818

19+
using OrderedCollections: OrderedDict
20+
1921
export ℝ, AbstractManifold
20-
export ProductRepr
22+
# export ProductRepr
2123
# common groups -- preferred defaults at this time.
2224
export TranslationGroup, RealCircleGroup
2325
# common non-groups -- TODO still teething problems to sort out in IIF v0.25-v0.26.

src/ManifoldSampling.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ function sampleTangent end
1111

1212
# Sampling MKD
1313
function sampleTangent(M::AbstractDecoratorManifold, x::ManifoldKernelDensity, p=mean(x))
14-
# get legacy matrix of coordinates and selected labels
15-
coords, lbls = sample(x.belief,1)
16-
X = hat(x.manifold, p, coords)
17-
return X
14+
# get legacy matrix of coordinates and selected labels
15+
#TODO make sure that when `sample` is replaced in MKD, coordinates is a vector
16+
coords, lbls = sample(x.belief,1)
17+
X = hat(x.manifold, p, coords[:])
18+
return X
1819
end
1920

2021
function sampleTangent(x::ManifoldKernelDensity, p=mean(x))
@@ -30,10 +31,6 @@ function sampleTangent(M::AbstractDecoratorManifold, z::Distribution, p=getPoint
3031
return hat(M, p, rand(z,1)[:]) #TODO find something better than (z,1)[:]
3132
end
3233

33-
#TODO, re-evaluate this. special case for the RealCircleGroup to return a vector see https://github.com/JuliaManifolds/Manifolds.jl/issues/489
34-
function sampleTangent(M::RealCircleGroup, z::Distribution, p=getPointIdentity(M))
35-
return hat(M, [0.0], rand(z,1))
36-
end
3734

3835
"""
3936
$SIGNATURES

src/ManifoldsExtentions.jl

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,16 @@ end
4040

4141
#FIXME fix back to SA
4242
function getPointIdentity(G::SpecialOrthogonal{N},::Type{T}=Float64) where {N,T<:Real}
43-
# return SMatrix{N,N, T}(I)
43+
# return SMatrix{N,N, T}(I)
4444
return Matrix{T}(I, N, N)
4545
end
4646

4747
function getPointIdentity(G::TranslationGroup{Tuple{N}},::Type{T}=Float64) where{N,T<:Real}
48-
# return zeros(SVector{N,T})
48+
# return zeros(SVector{N,T})
4949
return zeros(T,N)
5050
end
5151

5252
function getPointIdentity(G::RealCircleGroup,::Type{T}=Float64) where T<:Real
5353
# return zero(T)
5454
return [zero(T)]
5555
end
56-
57-
58-
59-
# function Manifolds.allocate_result(G::SemidirectProductGroup, ::typeof(getPointIdentity))
60-
# @warn "allocate_result(G::SemidirectProductGroup, ::typeof(getPointIdentity)"
61-
# M = base_manifold(G)
62-
# N, H = M.manifolds
63-
# np = allocate_result(N, getPointIdentity)
64-
# hp = allocate_result(H, getPointIdentity)
65-
# return ArrayPartition(np, hp)
66-
# end

src/NumericalCalculations.jl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,6 @@ end
164164
# internal function to dispatch view on either vector or matrix, rows are dims and samples are columns
165165
_getindextuple(tup::Tuple, ind1::Int) = [getindex(t, ind1) for t in tup]
166166

167-
# TODO, likely a shortlived function, and should be replaced with ccw.hypoParams::Tuple(hypo1, hypo2,...), made at construction and allows direct hypo lookup
168-
# DevNotes, also see new `hyporecipe` approach (towards consolidation CCW CPT FMd CF...)
169-
function _view(nt::NamedTuple, idxs::AbstractVector{<:Integer})
170-
varParams = tuple([nt[i] for i in idxs]...)
171-
tup = tuple(varParams...)
172-
nms = keys(nt)[idxs]
173-
return NamedTuple{nms,typeof(tup)}(tup)
174-
# tuple([nt[i] for i in idxs]...)
175-
end
176167

177168
function _buildCalcFactorMixture( ccwl::CommonConvWrapper,
178169
_fmd_,
@@ -225,8 +216,12 @@ function _buildCalcFactorLambdaSample(ccwl::CommonConvWrapper,
225216
_slack = nothing )
226217
#
227218

219+
# TODO from obsolete _view:
220+
# Should be replaced with ccw.hypoParams::Tuple(hypo1, hypo2,...), made at construction and allows direct hypo lookup
221+
# DevNotes, also see new `hyporecipe` approach (towards consolidation CCW CPT FMd CF...)
222+
228223
# build a view to the decision variable memory
229-
varValsHypo = _view(ccwl.params, cpt_.activehypo)
224+
varValsHypo = ccwl.params[cpt_.activehypo]
230225
# tup = tuple(varParams...)
231226
# nms = keys(ccwl.params)[cpt_.activehypo]
232227
# varValsHypo = NamedTuple{nms,typeof(tup)}(tup)

0 commit comments

Comments
 (0)