Skip to content

Commit efd2df6

Browse files
authored
Merge pull request #863 from JuliaRobotics/master
v0.18.1-rc1
2 parents ebdd8b6 + 24ef7c0 commit efd2df6

File tree

7 files changed

+38
-27
lines changed

7 files changed

+38
-27
lines changed

NEWS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ Listing news on any major breaking changes in DFG. For regular changes, see int
22

33
# v0.18.0
44

5-
- Unpack of GenericFactorNodeData now get `dfg::AbstractDFG` and `varOrder::Vector{Symbol}`, deprecating previous use of `convert` without the graph context (#832).
5+
- Unpack of GenericFactorNodeData with `reconstrFactorData` now gets `dfg::AbstractDFG` and `varOrder::Vector{Symbol}`, deprecating previous use of `convert` without the graph context (#832).
66
- Switch to GraphsDFG, deprecating archived LightGraphs.jl (#826).
77
- Workaround: packed factor data `.fnc` encoded as base64 to avoid escape character problems (#834).
8-
- Towards distributions serialized via JSON, getting away from custom strings.
8+
- Towards distributions serialized via JSON, getting away from custom strings (#848).
99
- `LocalDFG` replaces `DefaultDFG` (#844).
1010
- Optimized creation of CGDFG / `createDfgSessionIfNotExist` (#839, #815).
1111
- `plotDFG` replaces `dfgplot` (#841, #844).
1212
- `Neo4jDFG` replaces `CloudGraphsDFG` (#836).
1313

1414
# v0.16.0
1515

16-
- `{Packed}VariableNodeData.infoPerCoord::Vector{Float64}` replaces previous `.inferdim::Float64`. The change should have legacy support to help facilitate the transition. This datastore is likely to only become part of critical computations downstream in IncrementalInference.jl v0.26, even though the previous `.inferdim` data values are being populated there. (#804)
16+
- `{Packed}VariableNodeData.infoPerCoord::Vector{Float64}` replaces previous `.inferdim::Float64`. The change should have legacy support to help facilitate the transition. This datastore is likely to only become part of critical computations downstream in IncrementalInference.jl v0.26, even though the previous `.inferdim` data values are being populated there. (#804)

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DistributedFactorGraphs"
22
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
3-
version = "0.18.0"
3+
version = "0.18.1"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Click on badges to follow links:
44

5-
| Release v0.17 | Dev | Coverage | Documentation |
5+
| Release v0.18 | Dev | Coverage | Documentation |
66
|---------------|-----|----------|---------------|
77
| [![Build Status][dfg-ci-stb-img]][dfg-ci-stb-url] | [![CI][dfg-ci-dev-img]][dfg-ci-dev-url] <br> [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/JuliaRobotics/DistributedFactorGraphs.jl.svg)](https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues) | [![codecov.io][dfg-cov-img]][dfg-cov-url] <br> [![Percentage of issues still open](https://isitmaintained.com/badge/open/JuliaRobotics/DistributedFactorGraphs.jl.svg)](https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues) | [![docs](https://img.shields.io/badge/DFGDocs-latest-blue.svg)](http://juliarobotics.github.io/DistributedFactorGraphs.jl/latest/) <br> [![docs](https://img.shields.io/badge/CaesarDocs-latest-blue.svg)](http://juliarobotics.github.io/Caesar.jl/latest/)
88

99

1010
[dfg-ci-dev-img]: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/actions/workflows/ci.yml/badge.svg
1111
[dfg-ci-dev-url]: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/actions/workflows/ci.yml
12-
[dfg-ci-stb-img]: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/actions/workflows/ci.yml/badge.svg?branch=release%2Fv0.17
12+
[dfg-ci-stb-img]: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/actions/workflows/ci.yml/badge.svg?branch=release%2Fv0.18
1313
[dfg-ci-stb-url]: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/actions/workflows/ci.yml
1414
[dfg-cov-img]: https://codecov.io/github/JuliaRobotics/DistributedFactorGraphs.jl/coverage.svg?branch=master
1515
[dfg-cov-url]: https://codecov.io/github/JuliaRobotics/DistributedFactorGraphs.jl?branch=master

src/Neo4jDFG/services/CommonFunctions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ function _matchmergeVariableSubnode!(
315315
result = commit(tx)
316316
end
317317
length(result.errors) > 0 && error(string(result.errors))
318-
length(result.results[1]["data"]) != 1 && error("Cannot find subnode '$(ppe.solveKey)' for variable '$variablekey'")
319-
length(result.results[1]["data"][1]["row"]) != 1 && error("Cannot find subnode '$(ppe.solveKey)' for variable '$variablekey'")
318+
length(result.results[1]["data"]) != 1 && error("Cannot find desired subnode::'$(typeof(subnode))' for variable '$variablekey'")
319+
length(result.results[1]["data"][1]["row"]) != 1 && error("Cannot find desired subnode '$(typeof(subnode))' for variable '$variablekey'")
320320
return result.results[1]["data"][1]["row"][1]
321321
end
322322

src/services/CustomPrinting.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ function printVariable( io::IO, vert::DFGVariable;
7373
end
7474
printstyled(ioc, " VariableType: ", color=:blue, bold=true)
7575
println(ioc, vari)
76-
# println(ioc, "kde max: $(round.(getKDEMax(getKDE(vnd)),digits=4))")
77-
# println(ioc, "kde max: $(round.(getKDEMax(getKDE(vnd)),digits=4))")
76+
# println(ioc, "kde max: $(round.(getKDEMax(getBelief(vnd)),digits=4))")
77+
# println(ioc, "kde max: $(round.(getKDEMax(getBelief(vnd)),digits=4))")
7878
else
7979

8080
printstyled(ioc, summary(vert), bold=true, color=:blue)

src/services/Serialization.jl

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -379,22 +379,33 @@ function unpackFactor(dfg::G, packedProps::Dict{String, Any}) where G <: Abstrac
379379
# Parse it
380380
timestamp = ZonedDateTime(packedProps["timestamp"])
381381
nstime = Nanosecond(get(packedProps, "nstime", 0))
382-
if packedProps["tags"] isa String
383-
tags = JSON2.read(packedProps["tags"], Vector{Symbol})
384-
else
385-
tags = Symbol.(packedProps["tags"])
386-
# If tags is empty we need to make sure it's a Vector{Symbol}
387-
if length(tags) == 0
388-
tags = Vector{Symbol}()
389-
end
390-
end
391-
392-
# Get the stored variable order
393-
_variableOrderSymbols = if packedProps["_variableOrderSymbols"] isa String
394-
JSON2.read(packedProps["_variableOrderSymbols"], Vector{Symbol})
395-
else
396-
Symbol.(packedProps["_variableOrderSymbols"])
397-
end
382+
383+
_vecSymbol(vecstr) = Symbol[map(x->Symbol(x),vecstr)...]
384+
385+
# Get the stored tags and variable order
386+
@assert !(packedProps["tags"] isa String) "unpackFactor expecting JSON only data, packed `tags` should be a vector of strings (not a single string of elements)."
387+
@assert !(packedProps["_variableOrderSymbols"] isa String) "unpackFactor expecting JSON only data, packed `_variableOrderSymbols` should be a vector of strings (not a single string of elements)."
388+
tags = _vecSymbol(packedProps["tags"])
389+
_variableOrderSymbols = _vecSymbol(packedProps["_variableOrderSymbols"])
390+
# if packedProps["tags"] isa String
391+
# # TODO, legacy and should be removed
392+
# tags = JSON2.read(packedProps["tags"], Vector{Symbol})
393+
# else
394+
# # the preferred (and should be only) solution
395+
# tags = Symbol.(packedProps["tags"])
396+
# # If tags is empty we need to make sure it's a Vector{Symbol}
397+
# if length(tags) == 0
398+
# tags = Vector{Symbol}()
399+
# end
400+
# end
401+
# # Get the stored variable order
402+
# _variableOrderSymbols = if packedProps["_variableOrderSymbols"] isa String
403+
# # TODO, legacy and should be removed
404+
# JSON2.read(packedProps["_variableOrderSymbols"], Vector{Symbol})
405+
# else
406+
# # the preferred (and should be only) solution
407+
# Symbol.(packedProps["_variableOrderSymbols"])
408+
# end
398409

399410
data = packedProps["data"]
400411
datatype = packedProps["fnctype"]

test/attic/HexagonalCloud.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ for variable in getVariables(localFg)
5656
# variable.ppeDict[:default] = Dict{Symbol, VariableEstimate}(:Mean => VariableEstimate(:default, :Mean, means, now()))
5757
end
5858

59-
bel = getKDE(getVariable(localFg, :x0))
59+
bel = getBelief(getVariable(localFg, :x0))
6060
bel
6161

6262
# Push updates back to cloud.

0 commit comments

Comments
 (0)