Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast forward upstream integration test branch for dfg #1681

Merged
merged 94 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
88e70c4
Fix parametric regression close #1648
Affie Dec 16, 2022
9d810cc
Merge pull request #1650 from JuliaRobotics/22Q4/fix/param_regression
dehann Dec 16, 2022
0a50afb
parametric supports nary factors
dehann Dec 26, 2022
7bd2bab
minor ccw type stab enh
dehann Dec 26, 2022
06e2e32
tuple types instead
dehann Dec 26, 2022
baead56
Merge pull request #1651 from JuliaRobotics/22Q4/enh/paramnary
dehann Dec 26, 2022
8bd9dd6
rm CF._measCount
dehann Dec 27, 2022
d802e63
suppress MH test
dehann Dec 27, 2022
f8d592e
bump v0.31.1
dehann Dec 27, 2022
5ad09af
Merge pull request #1652 from JuliaRobotics/22Q4/enh/rmcflegacymeas
dehann Dec 27, 2022
f5cbbc5
rm CF._legacyMeas
dehann Dec 27, 2022
c2d9b75
Merge pull request #1655 from JuliaRobotics/22Q4/refac/rm_cf_legacyMeas
dehann Dec 27, 2022
08b11f5
CF.fullvars is now a Tuple
dehann Dec 27, 2022
a704aeb
Merge pull request #1656 from JuliaRobotics/22Q4/refac/cf_fullvarstuple
dehann Dec 27, 2022
4ba0372
ccw make template fields of abstract types
dehann Dec 27, 2022
3b1a02d
Merge pull request #1657 from JuliaRobotics/22Q4/refac/ccw_typestab
dehann Dec 27, 2022
1bac966
ccw drop threadmodel, refac vartypes
dehann Dec 27, 2022
d6887cd
reduce ci testing load
dehann Dec 27, 2022
00cd50e
restore test
dehann Dec 27, 2022
9c356b6
ccw fullvariables as tuple
dehann Dec 27, 2022
577a63e
drop varTypes
dehann Dec 27, 2022
4081bfa
try impr codecov report
dehann Dec 27, 2022
d558674
fixing gh action syntax
dehann Dec 27, 2022
5f10b03
return test codecov
dehann Dec 27, 2022
a97513a
Merge pull request #1658 from JuliaRobotics/22Q4/refac/ccw_threadmode…
dehann Dec 27, 2022
4455287
cleaner ccw varTypes
dehann Dec 27, 2022
feb0728
ccw update comments
dehann Dec 27, 2022
84c8e9b
Merge pull request #1659 from JuliaRobotics/22Q4/refac/vartypescleaner
dehann Dec 27, 2022
0e33019
ccw.varValsAll, towards better multihypo handling
dehann Dec 27, 2022
286e9a0
update news
dehann Dec 27, 2022
72bcea4
Merge pull request #1660 from JuliaRobotics/22Q4/refac/ccw_varValsAll
dehann Dec 28, 2022
74df1f4
add CalcFactor.manifold, all factors getManifold
dehann Dec 28, 2022
0c7ebba
test fixes
dehann Dec 28, 2022
86babba
test fixes
dehann Dec 28, 2022
dc2696d
rn testCalcFactorHypos
dehann Dec 28, 2022
a01ee03
more test fixes
dehann Dec 28, 2022
4a37416
update news
dehann Dec 28, 2022
1c9dd13
enh comments
dehann Dec 29, 2022
90c25e1
bump v0.32.0
dehann Dec 29, 2022
2d4c5e3
Merge pull request #1662 from JuliaRobotics/22Q4/enh/cf_manifold
dehann Dec 29, 2022
081a24a
depr slow getClique warnings
dehann Dec 29, 2022
446ea03
rm depr from v0.32
dehann Dec 29, 2022
a16b620
Merge pull request #1663 from JuliaRobotics/22Q4/maint/fewdepr
dehann Dec 29, 2022
77df383
faster getManifold for factor calcs (ccw.manifold)
dehann Dec 29, 2022
96f1823
Merge pull request #1664 from JuliaRobotics/22Q4/enh/ccw_manifold
dehann Dec 29, 2022
e44811f
switch to using ccw.manifold
dehann Dec 29, 2022
3b5eda5
Merge pull request #1665 from JuliaRobotics/22Q4/enh/useccwmani
dehann Dec 29, 2022
fbae975
rm old test file testNumericRootGenericRandomized
dehann Dec 29, 2022
643bddb
move test order
dehann Dec 29, 2022
86fe2dc
better ccw field order towards multihypo checks
dehann Dec 29, 2022
d516322
ccw comments, found huge bug evalPotSpec dupl
dehann Dec 29, 2022
290b5b3
Merge pull request #1666 from JuliaRobotics/22Q4/refac/ccwfieldorder
dehann Dec 29, 2022
4558751
consolidate ccw.meas factor sampling
dehann Dec 30, 2022
8b42152
in-place ccw.measurement updates
dehann Dec 30, 2022
1caa998
fix partial mani test
dehann Dec 30, 2022
ee5cc5e
update NEWS
dehann Dec 30, 2022
2ef8cee
restore most of multihypo test
dehann Dec 30, 2022
15d4fbc
Merge pull request #1667 from JuliaRobotics/22Q4/refac/consolfctsampling
dehann Dec 30, 2022
049c6f6
towards better partial handling
dehann Jan 2, 2023
9d385b4
rm ccw.zDim
dehann Jan 2, 2023
fce0508
minor code layout update
dehann Jan 2, 2023
2ee36ed
drop ccw.xDim
dehann Jan 2, 2023
6b103c8
ccwl.varValsAll update in-place
dehann Jan 2, 2023
652a7fb
struct HypoRecipe
dehann Jan 2, 2023
8825c9f
ccw now non-mutable struct, and minor changes
dehann Jan 2, 2023
94baa0f
update news, compat, v0.31.1
dehann Jan 2, 2023
e1421f9
update test
dehann Jan 2, 2023
89254a1
update multihypo tests for HypoRecipe and
dehann Jan 2, 2023
320baa1
relax test uncertainty
dehann Jan 2, 2023
479f46c
test bug fix
dehann Jan 2, 2023
39a36ca
fix testing bug
dehann Jan 2, 2023
94310b6
Merge pull request #1669 from JuliaRobotics/23Q1/refac/enhccwdims
dehann Jan 2, 2023
487f099
Update README.md
dehann Jan 2, 2023
05debaf
add MetaPrior w test, the 0 numeric prior
dehann Jan 2, 2023
da6e38f
update News
dehann Jan 2, 2023
1ede511
amp compat v0.6.3
dehann Jan 3, 2023
ed89ad1
Merge pull request #1672 from JuliaRobotics/23Q1/enh/metaprior
dehann Jan 3, 2023
7f3bc12
DFG 19, upstream solveGraph! dispatch
dehann Jan 6, 2023
ca76fb8
incl DFG compat for v0.18.10
dehann Jan 16, 2023
5a49668
Merge pull request #1673 from JuliaRobotics/23Q1/api/dfg19solve
dehann Jan 16, 2023
6c23385
drop compat breaking change dfg19
dehann Jan 16, 2023
f26abe6
minor enhancements
dehann Jan 17, 2023
f99b01d
Upgrading PPEs to ZonedDateTime
GearsAD Jan 22, 2023
5c818c3
Merge pull request #1676 from JuliaRobotics/23Q1/enh/oaswip
dehann Jan 27, 2023
5a89599
update for DFG v0.19
dehann Jan 27, 2023
018f4d0
Return the variable and factor you create
GearsAD Jan 27, 2023
c015649
Merge branch '23Q1/enh/dfg19update' of github.com:JuliaRobotics/Incre…
GearsAD Jan 27, 2023
5b6f726
Default constructor on PPE
GearsAD Jan 28, 2023
6e3df8b
test fix, depr
dehann Jan 28, 2023
ea91992
Merge pull request #1678 from JuliaRobotics/23Q1/api/dfg19solve
dehann Jan 28, 2023
f171a84
better zone time support
dehann Jan 29, 2023
bb53470
Merge pull request #1677 from JuliaRobotics/23Q1/enh/dfg19update
dehann Jan 29, 2023
289c4b6
Merge pull request #1674 from JuliaRobotics/23Q1/compat/dropdfg18
dehann Jan 29, 2023
cdc5185
bump v0.32.2
dehann Jan 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 45 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
fail_ci_if_error: false
if: ${{ matrix.version != 'nightly' }}

upstream-dev:
name: Upstream Dev
upstream-dev-functional:
name: Upstr Dev Functional
runs-on: ubuntu-latest
env:
JULIA_PKG_SERVER: ""
Expand All @@ -55,10 +55,50 @@ jobs:
arch:
- x64
version:
- '1.8'
- '~1.9.0-0'
group:
- 'basic_functional_group'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: Upst Dev Functional
env:
IIF_TEST_GROUP: ${{ matrix.group }}
run: |
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="ApproxManifoldProducts",rev="master"));'
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="DistributedFactorGraphs",rev="master"));'
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.test("IncrementalInference"; coverage=false)'
shell: bash

upstream-dev-cases:
name: Upstr Dev Test Cases
runs-on: ubuntu-latest
env:
JULIA_PKG_SERVER: ""
strategy:
fail-fast: false
matrix:
arch:
- x64
version:
- '1.8'
group:
- 'test_cases_group'
steps:
- uses: actions/checkout@v2
Expand All @@ -79,7 +119,7 @@ jobs:
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: Upstream Dev
- name: Upstr Dev Cases
env:
IIF_TEST_GROUP: ${{ matrix.group }}
run: |
Expand All @@ -89,7 +129,7 @@ jobs:
shell: bash

test-debug-group:
needs: [ upstream-dev ]
needs: [ upstream-dev-functional ]
name: JL${{ matrix.version }} - ${{ matrix.group }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
Expand Down
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ Alternatively, either use the Github Blame, or the Github `/compare/v0.18.0...v0

The list below highlights breaking changes according to normal semver workflow -- i.e. breaking changes go through at least one deprecatation (via warnings) on the dominant number in the version number. E.g. v0.18 -> v0.19 (warnings) -> v0.20 (breaking). Note that ongoing efforts are made to properly deprecate old code/APIs

# Changes in v0.32

- Major internal refactoring of `CommonConvWrapper` to avoid abstract field types, and better standardization; towards cleanup of internal multihypo handling and naming conventions.
- Internal refactoring removing several legacy fields from `CalcFactor`.
- All factors now require a `getManifold` definition.
- Now have `CalcFactor.manifold` to reduce new allocation load inside hot-loop for solving.
- Fixed tesing issues in `testSpecialEuclidean2Mani.jl`.
- Refactored, consolidated, and added more in-place operations in surrounding `ccw.measurement`.
- Refactor `CommonConvWrapper` to a not non-mutable struct, with several cleanups and some updated compat requirements.
- Refactor interal hard type `HypoRecipe`.
- Add `MetaPrior` for adding meta data but not influencing the numerical solution.

# Changes in v0.31
- `FactorMetaData` is deprecated and replaced by `CalcFactor`.
- Updated `Base.deepcopy_internal` fix for use with Julia 1.8.1, see #1629.
- Added a few missing exports incl. `getTags`, `_update!, see #1626 #1628.
- Refactoring to remove `FactorMetadata` (#1611) and `ConvPerThread` (#1615, #1625) objects, which is consolidated into `CalcFactor` and `CommonConvWrapper`.
- Added JuliaFormatter, see #1620.
- Add `SnoopPrecompile.jl` on a few basic solve features to start, see #1631.
- Support n-ary parametric solving such as OAS factors.

# Changes in v0.30

Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "IncrementalInference"
uuid = "904591bb-b899-562f-9e6f-b8df64c7d480"
keywords = ["MM-iSAMv2", "Bayes tree", "junction tree", "Bayes network", "variable elimination", "graphical models", "SLAM", "inference", "sum-product", "belief-propagation"]
desc = "Implements the Multimodal-iSAMv2 algorithm."
version = "0.31.0"
version = "0.32.2"

[deps]
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
Expand Down Expand Up @@ -46,11 +46,11 @@ TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
ApproxManifoldProducts = "0.6"
ApproxManifoldProducts = "0.6.3"
BSON = "0.2, 0.3"
Combinatorics = "1.0"
DataStructures = "0.16, 0.17, 0.18"
DistributedFactorGraphs = "0.18.4"
DistributedFactorGraphs = "0.19"
Distributions = "0.24, 0.25"
DocStringExtensions = "0.8, 0.9"
FileIO = "1"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

[iif-deps-img]: https://juliahub.com/docs/IncrementalInference/deps.svg
[iif-deps-jlh]: https://juliahub.com/ui/Packages/IncrementalInference/NrVw2??page=2
[doi-img]: https://zenodo.org/badge/55802838.svg
[doi-url]: https://zenodo.org/badge/latestdoi/55802838
[doi-img]: https://zenodo.org/badge/DOI/10.5281/zenodo.7498643.svg
[doi-url]: https://doi.org/10.5281/zenodo.7498643

<!-- replicated in Caesar.jl README -->
[iif-ci-dev-img]: https://github.com/JuliaRobotics/IncrementalInference.jl/actions/workflows/ci.yml/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion attic/CliqueStateMachine_fetch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function blockUntilChildrenHaveStatus_StateMachine(csmc::CliqStateMachineContain

if st in [:null;]
infocsm(csmc, "4e, blockUntilChildrenHaveStatus_StateMachine, waiting cliq=$(cid), child status=$(st).")
wait(getSolveCondition(csmc.tree.cliques[cid]))
wait(getSolveCondition(getClique(csmc.tree,cid)))
notsolved = true
break
end
Expand Down
4 changes: 2 additions & 2 deletions attic/examples/BayesTreeIllustration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tree = emptyBayesTree()
buildTree!(tree, fge, p)

# Find potential functions for each clique
cliq = tree.cliques[1] # start at the root
cliq = getClique(tree,1) # start at the root
buildCliquePotentials(fg, tree, cliq);

drawTree(tree, show=true)
Expand All @@ -60,7 +60,7 @@ drawTree(tree, show=true)

## can also show the Clique Association matrix by first importing Cairo, Fontconfig, Gadfly

cliq = tree.cliques[1]
cliq = getClique(tree,1)
cliq = getClique(tree, :x0) # where is :x0 a frontal variable
spyCliqMat(cliq)

Expand Down
4 changes: 2 additions & 2 deletions attic/examples/MultiHypo2Door.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ plotKDE([upmsgs[:x0]; upmsgs[:l1]; upmsgs[:x1]], c=["red";"green";"blue"])

## swap iteration order
#TODO guess order from bellow
# getCliqueData(tree.cliques[2]).itervarIDs = [5;7;3;1]
getCliqueData(tree.cliques[2]).itervarIDs = [:x0, :x1, :l0, :l1]
# getCliqueData(getClique(tree,2)).itervarIDs = [5;7;3;1]
getCliqueData(getClique(tree,2)).itervarIDs = [:x0, :x1, :l0, :l1]

solveTree!(fg, tree)

Expand Down
6 changes: 3 additions & 3 deletions attic/examples/MultiHypo3Door.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ spyCliqMat(tree, :x2)
## swap iteration order

#TODO
# getCliqueData(tree.cliques[2]).itervarIDs = [9;7;1;3;5]
getCliqueData(tree.cliques[1]).itervarIDs = [:x1, :x0, :l2, :l1, :l0]
# getCliqueData(getClique(tree,2)).itervarIDs = [9;7;1;3;5]
getCliqueData(getClique(tree,1)).itervarIDs = [:x1, :x0, :l2, :l1, :l0]

solveTree!(fg, tree)

Expand Down Expand Up @@ -245,7 +245,7 @@ tree = buildTreeReset!(fg, drawpdf=true, show=true)
spyCliqMat(tree, :l0)
spyCliqMat(tree, :x2)

cliq = tree.cliques[2]
cliq = getClique(tree,2)

## quick debug

Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function getTreeCost_02(tree::AbstractBayesTree; alpha::Float64 = 1.0)
# Frontal and number of children.
ARR = Tuple{Symbol, Int}[]
for (cliqid, vex) in tree.cliques
afrtl = getCliqFrontalVarIds(tree.cliques[cliqid])[1]
afrtl = getCliqFrontalVarIds(getClique(tree, cliqid))[1]
numch = length(getChildren(tree, afrtl))
push!(ARR, (afrtl, numch))
end
Expand Down
94 changes: 31 additions & 63 deletions src/Deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,79 +27,47 @@ function convert(::Type{<:Prior}, prior::Dict{String, Any})
return Prior(z)
end

##==============================================================================
## Deprecate code below before v0.32
##==============================================================================

# NOTE Temporary fix? Overwrite deepcopy on MetaBayesTree to strip out copying the channels.
# see https://github.com/JuliaRobotics/IncrementalInference.jl/issues/1530
# possible fix in https://github.com/JuliaLang/julia/pull/46406
import Base.deepcopy_internal
VERSION < v"1.8.1" && function Base.deepcopy_internal(bt::MetaBayesTree, stackdict::IdDict)
if haskey(stackdict, bt)
return stackdict[bt]
# more legacy, dont delete yet
function Base.getproperty(ccw::CommonConvWrapper, f::Symbol)
if f == :threadmodel
@warn "CommonConvWrapper.threadmodel is obsolete" maxlog=3
return SingleThreaded
elseif f == :params
@warn "CommonConvWrapper.params is deprecated, use .varValsAll instead" maxlog=3
return ccw.varValsAll
elseif f == :vartypes
@warn "CommonConvWrapper.vartypes is deprecated, use typeof.(getVariableType.(ccw.fullvariables) instead" maxlog=3
return typeof.(getVariableType.(ccw.fullvariables))
else
return getfield(ccw, f)
end

mg = bt.bt

graph = deepcopy_internal(mg.graph, stackdict)
vprops = deepcopy_internal(mg.vprops, stackdict)
T = eltype(mg)
# dropping all edge data
eprops = Dict{MetaGraphs.SimpleEdge{T}, MetaGraphs.PropDict}()
gprops = deepcopy_internal(mg.gprops, stackdict)
weightfield = deepcopy_internal(mg.weightfield, stackdict)
defaultweight = deepcopy_internal(mg.defaultweight, stackdict)
metaindex = deepcopy_internal(mg.metaindex, stackdict)
indices = deepcopy_internal(mg.indices, stackdict)

mg_cpy = MetaDiGraph(
graph,
vprops,
eprops,
gprops,
weightfield,
defaultweight,
metaindex,
indices,
)

bt_cpy = MetaBayesTree(
mg_cpy,
bt.btid,
deepcopy_internal(bt.frontals, stackdict),
deepcopy_internal(bt.eliminationOrder, stackdict),
bt.buildTime,
)

stackdict[bt] = bt_cpy
return bt_cpy
end


# """
# $SIGNATURES
# Get `.factormetadata` for each CPT in CCW for a specific factor in `fg`.
# """
# _getFMdThread(ccw::CommonConvWrapper,
# thrid::Int=Threads.threadid()) = ccw.cpt[thrid].factormetadata
# #
# _getFMdThread(fc::Union{GenericFunctionNodeData,DFGFactor},
# thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(fc), thrid)
# #
# _getFMdThread(dfg::AbstractDFG,
# lbl::Symbol,
# thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(dfg, lbl), thrid)
# #

##==============================================================================
## Deprecate code below before v0.31
## Deprecate code below before v0.33
##==============================================================================

# export setThreadModel!
# introduced for approximate convolution operations
export SingleThreaded, MultiThreaded

function setThreadModel!(fgl::AbstractDFG; model = IIF.SingleThreaded)
#
@error("Obsolete, ThreadModel types are no longer in use.")
# for (key, id) in fgl.fIDs
# _getCCW(fgl, key).threadmodel = model
# end
return nothing
end

# should have been deleted in v0.31 but no harm in keeping this one a bit longer
@deprecate initManual!(w...; kw...) initVariable!(w...; kw...)



##==============================================================================
## Old parametric kept for comparason until code stabilize
## Old parametric kept for comparason until code is stabilized
##==============================================================================

"""
Expand Down
7 changes: 2 additions & 5 deletions src/ExportAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ export CSMHistory,
getCliqVarInitOrderUp,
getCliqNumAssocFactorsPerVar,

# introduced for approximate convolution operations
setThreadModel!,
SingleThreaded,
MultiThreaded,

# user functions
predictbelief,
propagateBelief,
Expand Down Expand Up @@ -361,4 +356,6 @@ export appendSeparatorToClique!
export buildTreeFromOrdering! # TODO make internal and deprecate external use to only `buildTreeReset!``
export makeSolverData!

export MetaPrior

#
6 changes: 3 additions & 3 deletions src/Factors/Circular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DFG.getManifold(::CircularCircular) = RealCircleGroup()

function (cf::CalcFactor{<:CircularCircular})(X, p, q)
#
M = getManifold(cf.factor)
M = cf.manifold # getManifold(cf.factor)
return distanceTangent2Point(M, X, p, q)
end

Expand Down Expand Up @@ -58,11 +58,11 @@ function getSample(cf::CalcFactor{<:PriorCircular})
# FIXME workaround for issue #TBD with manifolds CircularGroup,
# JuliaManifolds/Manifolds.jl#415
# no method similar(::Float64, ::Type{Float64})
return samplePoint(getManifold(cf.factor), cf.factor.Z, [0.0])
return samplePoint(cf.manifold, cf.factor.Z, [0.0])
end

function (cf::CalcFactor{<:PriorCircular})(m, p)
M = getManifold(cf.factor)
M = cf.manifold # getManifold(cf.factor)
Xc = vee(M, p, log(M, p, m))
return Xc
end
Expand Down
8 changes: 4 additions & 4 deletions src/Factors/GenericFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ end
# function (cf::CalcFactor{<:ManifoldFactor{<:AbstractDecoratorManifold}})(Xc, p, q)
function (cf::CalcFactor{<:ManifoldFactor})(Xc, p, q)
# function (cf::ManifoldFactor)(X, p, q)
M = cf.factor.M
M = cf.manifold # .factor.M
# M = cf.M
X = hat(M, p, Xc)
return distanceTangent2Point(M, X, p, q)
Expand Down Expand Up @@ -132,7 +132,7 @@ DFG.getManifold(f::ManifoldPrior) = f.M
function getSample(cf::CalcFactor{<:ManifoldPrior})
Z = cf.factor.Z
p = cf.factor.p
M = cf.factor.M
M = cf.manifold # .factor.M
basis = cf.factor.basis
retract_method = cf.factor.retract_method
point = samplePoint(M, Z, p, basis, retract_method)
Expand All @@ -145,7 +145,7 @@ end
# Xc = [SVector{dim}(rand(Z)) for _ in 1:N]

function (cf::CalcFactor{<:ManifoldPrior})(m, p)
M = cf.factor.M
M = cf.manifold # .factor.M
# return log(M, p, m)
return vee(M, p, log(M, p, m))
# return distancePrior(M, m, p)
Expand Down Expand Up @@ -234,7 +234,7 @@ DFG.getManifold(f::ManifoldPriorPartial) = f.M

function getSample(cf::CalcFactor{<:ManifoldPriorPartial})
Z = cf.factor.Z
M = getManifold(cf.factor)
M = cf.manifold # getManifold(cf.factor)
partial = collect(cf.factor.partial)

return (samplePointPartial(M, Z, partial),)
Expand Down
Loading