JuliaRobotics / IncrementalInference.jl

Compare 057b704 ... +8 ... 959d766

Coverage Reach
services/EvalFactor.jl services/GraphInit.jl services/CliqueTypes.jl services/CalcFactor.jl services/FactorGradients.jl services/BayesNet.jl services/ApproxConv.jl services/HeatmapSampler.jl JunctionTree.jl ParametricUtils.jl CliqueStateMachine.jl FactorGraph.jl TreeDebugTools.jl TreeMessageUtils.jl Factors/GenericFunctions.jl Factors/Mixture.jl Factors/Circular.jl Factors/LinearRelative.jl Factors/DefaultPrior.jl Factors/PartialPriorPassThrough.jl Factors/EuclidDistance.jl Factors/MsgPrior.jl Factors/GenericMarginal.jl Factors/PartialPrior.jl CliqStateMachineUtils.jl SolverAPI.jl FGOSUtils.jl entities/JunctionTreeTypes.jl entities/OptionalDensities.jl entities/AliasScalarSampling.jl entities/BeliefTypes.jl entities/CliqueTypes.jl entities/FactorOperationalMemory.jl entities/FactorGradients.jl entities/SolverParams.jl CanonicalGraphExamples.jl NumericalCalculations.jl SerializingDistributions.jl ParametricCSMFunctions.jl ExplicitDiscreteMarginalizations.jl SolveTree.jl SolverUtilities.jl Flux/FluxModelsSerialization.jl Flux/FluxModelsDistribution.jl TreeBasedInitialization.jl AnalysisTools.jl DeconvUtils.jl TetherUtils.jl ODE/DERelative.jl ccolamd.jl SubGraphFunctions.jl AdditionalUtils.jl DispatchPackedConversions.jl GraphProductOperations.jl EmbeddedPlottingUtils.jl TreeMessageAccessors.jl ManifoldSampling.jl ConsolidateParametricRelatives.jl CompareUtils.jl SerializationMKD.jl RequireInteractiveUtils.jl NeedsResolution.jl Variables/DefaultVariables.jl VariableStatistics.jl IncrementalInference.jl Deprecated.jl DefaultNodeTypes.jl

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -354,7 +354,7 @@
Loading
354 354
                                          firvert::DFGVariable,
355 355
                                          Sj=getSolverData(firvert).separator)::DFGVariable
356 356
  #
357 -
  firstelim = 99999999999
357 +
  firstelim = (2^(Sys.WORD_SIZE-1)-1)
358 358
  for s in Sj
359 359
    temp = something(findfirst(isequal(s), elimorder), 0) # findfirst(p, s)
360 360
    if (temp < firstelim)

@@ -211,12 +211,13 @@
Loading
211 211
                                    destType::Type{<:InferenceVariable},
212 212
                                    factor::AbstractRelative;
213 213
                                    srcType::Type{<:InferenceVariable} = getVariableType(fg, srcLabel) |> typeof,
214 +
                                    doRef::Bool = true,
214 215
                                    refKey::Symbol=:simulated,
215 -
                                    prior = DFG._getPriorType(srcType)( MvNormal(getPPE(fg[srcLabel], refKey).suggested, diagm(ones(getDimension(srcType)))) ),
216 +
                                    prior = !doRef ? nothing : DFG._getPriorType(srcType)( MvNormal(getPPE(fg[srcLabel], refKey).suggested, diagm(ones(getDimension(srcType)))) ),
216 217
                                    atol::Real = 1e-2,
217 218
                                    destPrefix::Symbol = match(r"[a-zA-Z_]+", destRegex.pattern).match |> Symbol,
218 219
                                    srcNumber = match(r"\d+", string(srcLabel)).match |> x->parse(Int,x),
219 -
                                    overridePPE=nothing  )
220 +
                                    overridePPE = doRef ? nothing : zeros(getDimension(destType))  )
220 221
  #
221 222
  
222 223
  refVal = if overridePPE !== nothing
@@ -238,9 +239,13 @@
Loading
238 239
239 240
  # now check if we already have a landmark at this location
240 241
  varLms = ls(fg, destRegex) |> sortDFG
241 -
  ppeLms = getPPE.(getVariable.(fg, varLms), refKey) .|> x->x.suggested
242 -
  errmask = ppeLms .|> ( x -> isapprox(x, refVal; atol=atol) )
243 -
  already = any(errmask)
242 +
  already = if doRef
243 +
    ppeLms = getPPE.(getVariable.(fg, varLms), refKey) .|> x->x.suggested
244 +
    errmask = ppeLms .|> ( x -> isapprox(x, refVal; atol=atol) )
245 +
    any(errmask)
246 +
  else
247 +
    false
248 +
  end
244 249
245 250
  if already
246 251
    # does exist, ppe, variableLabel
@@ -260,12 +265,13 @@
Loading
260 265
                                    destType::Type{<:InferenceVariable},
261 266
                                    factor::AbstractPrior;
262 267
                                    srcType::Type{<:InferenceVariable} = getVariableType(fg, srcLabel) |> typeof,
268 +
                                    doRef::Bool = true,
263 269
                                    refKey::Symbol=:simulated,
264 270
                                    prior = typeof(factor)( MvNormal(getMeasurementParametric(factor)...) ),
265 271
                                    atol::Real = 1e-3,
266 272
                                    destPrefix::Symbol = match(r"[a-zA-Z_]+", destRegex.pattern).match |> Symbol,
267 273
                                    srcNumber = match(r"\d+", string(srcLabel)).match |> x->parse(Int,x),
268 -
                                    overridePPE=nothing  )
274 +
                                    overridePPE = doRef ? nothing : zeros(getDimension(destType))  )
269 275
  #
270 276
271 277
  refVal = if overridePPE !== nothing

@@ -21,7 +21,7 @@
Loading
21 21
Get the grid positions at the specified height (within the provided spreads)
22 22
23 23
DevNotes
24 -
- TODO Should this be consolidated with AliasingScalarSampler?
24 +
- TODO Should this be consolidated with AliasingScalarSampler? See IIF #1341
25 25
"""
26 26
function sampleHeatmap( roi::AbstractMatrix{<:Real},
27 27
                        x_grid::AbstractVector{<:Real}, 

@@ -484,7 +484,7 @@
Loading
484 484
  if :ut in fieldnames(T)	
485 485
    Base.depwarn("Field `ut` (microseconds) for variable type ($T) has been deprecated please use DFGVariable.nstime, kwarg: nanosecondtime", :addVariable!)	
486 486
    if isnothing(nanosecondtime)
487 -
      varType.ut == -9999999999 && error("please define a time for type $(T), use FGVariable.nstime, kwarg: nanosecondtime")
487 +
      varType.ut == -(2^(Sys.WORD_SIZE-1)-1) && error("please define a time for type $(T), use FGVariable.nstime, kwarg: nanosecondtime")
488 488
      nanosecondtime = Nanosecond(varType.ut*1000)	
489 489
    else 	
490 490
      @warn "Nanosecond time has been specified as $nanosecondtime, ignoring `ut` field value: $(varType.ut)."	

@@ -88,7 +88,7 @@
Loading
88 88
    Z = s.z
89 89
    @info "getMeasurementParametric falls back to using field `.z` by default. Extend it for more complex factors." maxlog=1
90 90
  else
91 -
    error("$(typeof(s)) not supported, please use non-parametric or open an issue if it should be")
91 +
    error("getMeasurementParametric(::$(typeof(s))) not defined, please add it, or use non-parametric, or open an issue for help.")
92 92
  end
93 93
  
94 94
  return getMeasurementParametric(Z)

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 1 files with coverage changes found.

Changes in src/NumericalCalculations.jl
-1
+1
Loading file...
Files Coverage
src -0.05% 77.20%
Project Totals (67 files) 77.20%
Loading