Skip to content

Commit a4b3a7f

Browse files
authored
Merge pull request #1686 from JuliaRobotics/23Q1/enh/dfg20
update IIF for DFG v0.20
2 parents a662731 + 70f5639 commit a4b3a7f

File tree

8 files changed

+20
-8
lines changed

8 files changed

+20
-8
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
4040
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
4141
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
4242
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
43+
StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
4344
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
4445
TensorCast = "02d47bb6-7ce6-556a-be16-bb1710789e2b"
4546
TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"
@@ -50,7 +51,7 @@ ApproxManifoldProducts = "0.6.3"
5051
BSON = "0.2, 0.3"
5152
Combinatorics = "1.0"
5253
DataStructures = "0.16, 0.17, 0.18"
53-
DistributedFactorGraphs = "0.19.3"
54+
DistributedFactorGraphs = "0.19.3, 0.20"
5455
Distributions = "0.24, 0.25"
5556
DocStringExtensions = "0.8, 0.9"
5657
FileIO = "1"
@@ -72,6 +73,7 @@ Requires = "1"
7273
SnoopPrecompile = "1"
7374
StaticArrays = "1"
7475
StatsBase = "0.32, 0.33"
76+
StructTypes = "1"
7577
TensorCast = "0.3.3, 0.4"
7678
TimeZones = "1.3.1"
7779
julia = "1.8"

src/ExportAPI.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export AbstractDFG,
1212
setSolvedCount!,
1313
listSupersolves,
1414
listSolveKeys,
15-
deepcopySolvekeys!,
16-
deepcopySupersolve!,
15+
cloneSolveKey!,
1716
diagm,
18-
listDataEntries,
17+
listBlobEntries,
1918
FolderStore,
2019
addBlobStore!,
2120
addData!,
21+
addBlob!,
2222
getData,
2323
DFGVariable,
2424
DFGVariableSummary,

src/Factors/PartialPriorPassThrough.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ Base.@kwdef mutable struct PackedPartialPriorPassThrough <: AbstractPackedFactor
3232
partial::Vector{Int}
3333
end
3434

35+
# StructTypes.StructType(::Type{PackedPartialPriorPassThrough}) = StructTypes.UnorderedStruct()
36+
# StructTypes.idproperty(::Type{PackedPartialPriorPassThrough}) = :id
37+
# StructTypes.omitempties(::Type{PackedPartialPriorPassThrough}) = (:id,)
38+
39+
3540
function convert(
3641
::Union{Type{<:AbstractPackedFactor}, Type{<:PackedPartialPriorPassThrough}},
3742
obj::PartialPriorPassThrough,
@@ -52,4 +57,4 @@ function convert(
5257
return PartialPriorPassThrough(dens, tuple(obj.partial...))
5358
end
5459

55-
#
60+
#

src/IncrementalInference.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ using Dates,
4646
UUIDs,
4747
TensorCast
4848

49+
using StructTypes
50+
4951
using StaticArrays
5052

5153
using ManifoldsBase

src/SolverAPI.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ function solveTree!(
393393
allk = parse.(Int, ss_)
394394
nextk = length(allk) == 0 ? 0 : maximum(allk) + 1
395395
newKey = Symbol(:default_, nextk)
396-
deepcopySupersolve!(dfgl, newKey, :default; solvable = 1)
396+
cloneSolveKey!(dfgl, newKey, :default; solvable = 1)
397397
# foreach(x->updateVariableSolverData!(dfgl, x, getSolverData(getVariable(dfgl,x), :default), newKey, true, Symbol[]), ls(dfgl, solvable=1))
398398
@info "storeOld=true, previous :default deepcopied into $newKey for solvable==1 variables."
399399
end

src/entities/BeliefTypes.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ struct ParametricMessage <: MessageType end
1818

1919
abstract type PackedSamplableBelief end
2020

21+
StructTypes.StructType(::Type{<:PackedSamplableBelief}) = StructTypes.UnorderedStruct()
22+
2123
const SamplableBelief = Union{
2224
Distributions.Distribution,
2325
KDE.BallTreeDensity,

test/testFluxModelsDistribution.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ addFactor!(fg, [:x0;], pr)
5050
##
5151

5252
smpls = sampleFactor(fg, :x0f1, 10)
53-
@test smpls isa Vector{Vector{Float64}}
53+
@test eltype(smpls) <: Vector{<:Real}
54+
@test smpls isa Vector #{Vector{Float64}}
5455
@test length( smpls ) == 10
5556

5657
##

test/testSpecialEuclidean2Mani.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ DFG.getManifold(::ManiPose2Point2) = TranslationGroup(2)
276276

277277
# define the conditional probability constraint
278278
function (cfo::CalcFactor{<:ManiPose2Point2})(measX, p, q)
279-
#
279+
#
280280
M = SpecialEuclidean(2)
281281
q_SE = ArrayPartition(q, identity_element(SpecialOrthogonal(2), p.x[2]))
282282

0 commit comments

Comments
 (0)