Skip to content

Commit 7b1a456

Browse files
authored
Merge pull request #1350 from JuliaRobotics/21Q3/fix/getmeasparam_ascoord
more cleanup, rm getManifolds
2 parents b5e6750 + d4fcf61 commit 7b1a456

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- develop
88
- release**
99
jobs:
10-
test:
10+
test-stable:
1111
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1212
runs-on: ${{ matrix.os }}
1313
env:
@@ -17,7 +17,6 @@ jobs:
1717
matrix:
1818
version:
1919
- '1.6'
20-
- 'nightly'
2120
os:
2221
- ubuntu-latest
2322
arch:
@@ -49,6 +48,44 @@ jobs:
4948
with:
5049
file: lcov.info
5150

51+
# hacky way to remove code coverage from nightly
52+
test-nightly-nocov:
53+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
54+
runs-on: ${{ matrix.os }}
55+
env:
56+
JULIA_PKG_SERVER: ""
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
version:
61+
- 'nightly'
62+
os:
63+
- ubuntu-latest
64+
arch:
65+
- x64
66+
steps:
67+
- uses: actions/checkout@v2
68+
- uses: julia-actions/setup-julia@v1
69+
with:
70+
version: ${{ matrix.version }}
71+
arch: ${{ matrix.arch }}
72+
- uses: actions/cache@v1
73+
env:
74+
cache-name: cache-artifacts
75+
with:
76+
path: ~/.julia/artifacts
77+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
78+
restore-keys: |
79+
${{ runner.os }}-test-${{ env.cache-name }}-
80+
${{ runner.os }}-test-
81+
${{ runner.os }}-
82+
- uses: julia-actions/julia-buildpkg@latest
83+
- run: |
84+
git config --global user.name Tester
85+
git config --global user.email [email protected]
86+
- uses: julia-actions/julia-runtest@latest
87+
continue-on-error: ${{ matrix.version == 'nightly' }}
88+
5289
upstream-dev:
5390
#if: github.ref != 'refs/heads/release**'
5491
name: Upstream Dev

src/FactorGraph.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,14 @@ function resetVariable!(varid::VariableNodeData;
288288
for pt in pts
289289
fill!(pt, 0.0)
290290
end
291-
pn = manikde!(pts, zeros(AMP.Ndim(val)), getManifolds(varid))
291+
pn = manikde!(getManifold(varid), pts, bw=zeros(Ndim(val)))
292292
setValKDE!(varid, pn, false, 0.0)
293293
# setVariableInferDim!(varid, 0)
294294
# setVariableInitialized!(vari, false)
295295
nothing
296296
end
297297

298-
resetVariable!(vari::DFGVariable; solveKey::Symbol=:default )::Nothing = resetVariable!(getSolverData(vari), solveKey=solveKey)
298+
resetVariable!(vari::DFGVariable; solveKey::Symbol=:default ) = resetVariable!(getSolverData(vari), solveKey=solveKey)
299299

300300
function resetVariable!(dfg::G,
301301
sym::Symbol;
@@ -383,7 +383,6 @@ function setDefaultNodeData!( v::DFGVariable,
383383
sp = Int[0;]
384384
(valpts, bws) = if initialized
385385
pN = resample(getBelief(v))
386-
# pN = AMP.manikde!(randn(dims, N), getManifolds(varType));
387386
bws = getBW(pN)[:,1:1]
388387
pNpts = getPoints(pN)
389388
isinit = true

src/ParametricUtils.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ struct MixedCircular <: Optim.Manifold
381381
isCircular::BitArray
382382
end
383383

384-
# FIXME getManifolds is being deprecated, use getManifold instead.
385384
function MixedCircular(fg::AbstractDFG, varIds::Vector{Symbol})
386385
circMask = Bool[]
387386
for k = varIds

src/TreeMessageUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function addLikelihoodsDifferentialCHILD!(cliqSubFG::AbstractDFG,
313313
# calculate the general deconvolution between variables
314314
pts, = approxDeconv(tfg, afc.label, solveKey) # solveFactorMeasurements
315315
# @show sft
316-
newBel = manikde!(pts, sft) # getManifolds(sft)
316+
newBel = manikde!(pts, sft)
317317
# replace dummy factor with real deconv factor using manikde approx belief measurement
318318
fullFct = _sft(newBel)
319319
deleteFactor!(tfg, afc.label)

src/Variables/DefaultVariables.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export Circular, Circle
77
Base.convert(::Type{<:Tuple}, ::InstanceType{Manifolds.Euclidean{Tuple{N}, ℝ}} ) where N = tuple([:Euclid for i in 1:N]...)
88
Base.convert(::Type{<:Tuple}, ::InstanceType{Manifolds.Circle{ℝ}}) = (:Circular,)
99

10-
# Base.convert(::Type{<:Tuple}, mani::MB.AbstractManifold) = getManifolds(mani)
10+
1111

1212

1313
## Euclid 1
@@ -22,10 +22,6 @@ DevNotes
2222
"""
2323
@defVariable ContinuousScalar TranslationGroup(1) [0.0;]
2424

25-
# Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::InstanceType{ContinuousScalar}) = Manifolds.Euclidean(1)
26-
27-
28-
## Euclid N
2925

3026

3127
"""
@@ -37,10 +33,9 @@ struct ContinuousEuclid{N} <: InferenceVariable end
3733
ContinuousEuclid(x::Int) = ContinuousEuclid{x}()
3834

3935
# not sure if these overloads are necessary since DFG 775?
40-
DFG.getManifold(::InstanceType{ContinuousEuclid{N}}) where N = TranslationGroup(N)
41-
# DFG.getManifold(::ContinuousEuclid{N}) where N = TranslationGroup(N)
36+
DFG.getManifold(::InstanceType{ContinuousEuclid{N}}) where N = TranslationGroup(N)
4237
DFG.getDimension(val::InstanceType{ContinuousEuclid{N}}) where N = manifold_dimension(getManifold(val))
43-
# DFG.getDimension(val::ContinuousEuclid{N}) where N = manifold_dimension(getManifold(val))
38+
4439

4540
DFG.getPointType(::Type{ContinuousEuclid{N}}) where N = Vector{Float64}
4641
DFG.getPointIdentity(M_::Type{ContinuousEuclid{N}}) where N = zeros(N) # identity_element(getManifold(M_), zeros(N))
@@ -60,8 +55,6 @@ Circular is a `Manifolds.Circle{ℝ}` mechanization of one rotation, with `theta
6055
@defVariable Circular Circle() [0.0;]
6156

6257

63-
# Base.convert(::Type{<:ManifoldsBase.AbstractManifold}, ::InstanceType{Circular}) = Manifolds.Circle()
64-
6558

6659

6760
#

0 commit comments

Comments
 (0)