-
Notifications
You must be signed in to change notification settings - Fork 21
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
Solver is not producing PPEs, probably related to the setup of the problem #1507
Comments
EDIT: i think the PPE is there but the PPE data is being stored as a point not a coordinate. This might be a legacy bug following the Manifolds upgrade to IIF.
Any chance of a call stack on this error. It looks like some older code trying to use PPE as a coordinate The fix will likely be to do something like this: view( AMP.makeCoordsFromPoint(Mani, ppe), [1,2,3] )
Looks like a missed upgrade bug, the difference between coordinates and newer on-Manifold point representation.
If we can see the call stack line of code (in IIF) where this MethodError occurred, it should be straight forward to just switch the point to coordinates and then pull the dimensions of interest ( Once we figured this out, we should also add this to the IIF tests to make sure it is covered in the future |
To clarify, I believe the solver is not completing. When pulling back the PPE's, here is what I see:
|
Digging a bit, there's definitely solver data but no PPEs:
|
I'm expecting to see an ALL DONE message here. It looks like it's failing on the init of l0 for some reason. |
Alright, I'll work to recreate and fix from info above, thanks! |
From Slack, Sam: [should write a unit test for future] |
Got the error stack with new test file added to RoME: [ Info: do init of l0
ERROR: MethodError: no method matching getindex(::ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}, ::UnitRange{Int64})
Closest candidates are:
getindex(::ProductRepr, ::Manifolds.ProductManifold, ::Union{Colon, Integer, Val, AbstractVector}) at ~/.julia/packages/Manifolds/7YSUf/src/manifolds/ProductManifold.jl:708
getindex(::ProductRepr, ::Manifolds.VectorBundle, ::Symbol) at ~/.julia/packages/Manifolds/7YSUf/src/manifolds/VectorBundle.jl:534
Stacktrace:
[1] WARNING: both ApproxManifoldProducts and TransformUtils export "rotate!"; uses of it in module RoME must be qualified
(::CalcFactor{Point2Point2Range{Normal{Float64}}, FactorMetadata{SubArray{DFGVariable, 1, Vector{DFGVariable}, Tuple{Vector{Int64}}, false}, SubArray{Symbol, 1, Vector{Symbol}, Tuple{Vector{Int64}}, false}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, Vector{Vector{Float64}}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing})(rho::Vector{Float64}, xi::ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}, lm::Vector{Float64})
@ RoME ~/.julia/dev/RoME/src/factors/Range2D.jl:17
[2] #307
@ ~/.julia/dev/IncrementalInference/src/NumericalCalculations.jl:255 [inlined]
[3] (::IncrementalInference.var"#316#317"{SubArray{Float64, 1, Vector{Float64}, Tuple{Vector{Int64}}, false}, IncrementalInference.var"#307#311"{Int64, Vector{Vector{Float64}}, CalcFactor{Point2Point2Range{Normal{Float64}}, FactorMetadata{SubArray{DFGVariable, 1, Vector{DFGVariable}, Tuple{Vector{Int64}}, false}, SubArray{Symbol, 1, Vector{Symbol}, Tuple{Vector{Int64}}, false}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, Vector{Vector{Float64}}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}}})(x::Vector{Float64})
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/NumericalCalculations.jl:309
[4] (::IncrementalInference.var"#293#295"{IncrementalInference.var"#316#317"{SubArray{Float64, 1, Vector{Float64}, Tuple{Vector{Int64}}, false}, IncrementalInference.var"#307#311"{Int64, Vector{Vector{Float64}}, CalcFactor{Point2Point2Range{Normal{Float64}}, FactorMetadata{SubArray{DFGVariable, 1, Vector{DFGVariable}, Tuple{Vector{Int64}}, false}, SubArray{Symbol, 1, Vector{Symbol}, Tuple{Vector{Int64}}, false}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, Vector{Vector{Float64}}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}}}, Vector{Float64}})(x::Vector{Float64})
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/NumericalCalculations.jl:69
[5] value!!(obj::NLSolversBase.NonDifferentiable{Float64, Vector{Float64}}, x::Vector{Float64})
@ NLSolversBase ~/.julia/packages/NLSolversBase/cfJrN/src/interface.jl:9
[6] initial_state(method::Optim.NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters}, options::Optim.Options{Float64, Nothing}, d::NLSolversBase.NonDifferentiable{Float64, Vector{Float64}}, initial_x::Vector{Float64})
@ Optim ~/.julia/packages/Optim/wFOeG/src/multivariate/solvers/zeroth_order/nelder_mead.jl:171
[7] optimize(d::NLSolversBase.NonDifferentiable{Float64, Vector{Float64}}, initial_x::Vector{Float64}, method::Optim.NelderMead{Optim.AffineSimplexer, Optim.AdaptiveParameters}, options::Optim.Options{Float64, Nothing})
@ Optim ~/.julia/packages/Optim/wFOeG/src/multivariate/optimize/optimize.jl:36
[8] optimize(f::Function, initial_x::Vector{Float64}; inplace::Bool, autodiff::Symbol, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Optim ~/.julia/packages/Optim/wFOeG/src/multivariate/optimize/interface.jl:90
[9] optimize
@ ~/.julia/packages/Optim/wFOeG/src/multivariate/optimize/interface.jl:84 [inlined]
[10] _solveLambdaNumeric(fcttype::Point2Point2Range{Normal{Float64}}, objResX::IncrementalInference.var"#316#317"{SubArray{Float64, 1, Vector{Float64}, Tuple{Vector{Int64}}, false}, IncrementalInference.var"#307#311"{Int64, Vector{Vector{Float64}}, CalcFactor{Point2Point2Range{Normal{Float64}}, FactorMetadata{SubArray{DFGVariable, 1, Vector{DFGVariable}, Tuple{Vector{Int64}}, false}, SubArray{Symbol, 1, Vector{Symbol}, Tuple{Vector{Int64}}, false}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, Vector{Vector{Float64}}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}}}, residual::Vector{Float64}, u0::Vector{Float64}, islen1::Bool)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/NumericalCalculations.jl:69
[11] _solveCCWNumeric!(ccwl::CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}; perturb::Float64, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/NumericalCalculations.jl:316
[12] approxConvOnElements!(ccwl::CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, elements::Vector{Int64}, ::Type{SingleThreaded}, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:40
[13] approxConvOnElements!(ccwl::CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, elements::Vector{Int64}, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:51
[14] computeAcrossHypothesis!(ccwl::CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, hyporecipe::NamedTuple{(:certainidx, :allelements, :activehypo, :mhidx), Tuple{UnitRange{Int64}, Vector{Any}, Vector{Any}, Vector{Int64}}}, sfidx::Int64, maxlen::Int64, mani::TranslationGroup{Tuple{2}, ℝ}; spreadNH::Float64, inflateCycles::Int64, skipSolve::Bool, testshuffle::Bool, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:194
[15] evalPotentialSpecific(Xi::Vector{DFGVariable}, ccwl::CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, solvefor::Symbol, T_::Type{Point2Point2Range{Normal{Float64}}}, measurement::Vector{Tuple}; needFreshMeasurements::Bool, solveKey::Symbol, N::Int64, spreadNH::Float64, inflateCycles::Int64, dbg::Bool, skipSolve::Bool, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:341
[16] #evalPotentialSpecific#342
@ ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:504 [inlined]
[17] evalFactor(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, fct::DFGFactor{CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, 2}, solvefor::Symbol, measurement::Vector{Tuple}; needFreshMeasurements::Bool, solveKey::Symbol, N::Int64, inflateCycles::Int64, dbg::Bool, skipSolve::Bool, _slack::Nothing)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/EvalFactor.jl:542
[18] approxConvBelief(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, fc::DFGFactor{CommonConvWrapper{Point2Point2Range{Normal{Float64}}, Nothing, Vector{Int64}, NamedTuple{(:x0, :l0), Tuple{Vector{Any}, Vector{Any}}}, Nothing, Vector{Float64}, Nothing}, 2}, target::Symbol, measurement::Vector{Tuple}; solveKey::Symbol, N::Int64, skipSolve::Bool)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:17
[19] #calcProposalBelief#352
@ ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:161 [inlined]
[20] proposalbeliefs!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, destlbl::Symbol, factors::Vector{DFGFactor}, dens::Vector{ManifoldKernelDensity}, measurement::Vector{Tuple}; solveKey::Symbol, N::Int64, dbg::Bool)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:229
[21] propagateBelief(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, destvar::DFGVariable{Point2}, factors::Vector{DFGFactor}; solveKey::Symbol, dens::Vector{ManifoldKernelDensity}, N::Int64, needFreshMeasurements::Bool, dbg::Bool, logger::Logging.ConsoleLogger)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/GraphProductOperations.jl:30
[22] doautoinit!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, xi::DFGVariable{Point2}; solveKey::Symbol, singles::Bool, N::Int64, logger::Logging.ConsoleLogger)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/GraphInit.jl:126
[23] doautoinit!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, Xi::Vector{DFGVariable}; solveKey::Symbol, singles::Bool, N::Int64, logger::Logging.ConsoleLogger)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/GraphInit.jl:160
[24] addFactor!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, Xi::Vector{DFGVariable}, usrfnc::Point2Point2Range{Normal{Float64}}; multihypo::Vector{Float64}, nullhypo::Float64, solvable::Int64, tags::Vector{Symbol}, timestamp::TimeZones.ZonedDateTime, graphinit::Bool, threadmodel::Type, suppressChecks::Bool, inflation::Float64, namestring::Symbol, _blockRecursion::Bool)
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/FactorGraph.jl:704
[25] addFactor!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, xisyms::Vector{Symbol}, usrfnc::Point2Point2Range{Normal{Float64}}; suppressChecks::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/FactorGraph.jl:730
[26] addFactor!(dfg::GraphsDFG{SolverParams, DFGVariable, DFGFactor}, xisyms::Vector{Symbol}, usrfnc::Point2Point2Range{Normal{Float64}})
@ IncrementalInference ~/.julia/dev/IncrementalInference/src/FactorGraph.jl:724
[27] top-level scope
@ ~/.julia/dev/RoME/test/testPPE_IIF1507.jl:22 |
Oops, think this is a 5 cent problem (but we need a catch warning for this kind of thing): Should be a
This also touches on the need to solve a growing shortcoming of the code base (aka Standardized Partials): I think it will be cool if in a case like this, there is an automatic down projection from EDIT: added this to high level design requirements wiki: https://github.com/JuliaRobotics/Caesar.jl/wiki/High-Level-Requirements |
Great, fixed it for me - thanks! Yes I'd like to know this happened, can you please add stories for an explicit error on this. |
Looking for ways to debug this:
I'm seeing this in the solver:
[ Info: MethodError(view, (ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}(([2.295244785153452, -2.251804188991782], [-0.30974230750707976 -0.950820541921655; 0.950820541921655 -0.30974230750707976])), [1, 2, 3]), 0x0000000000007d63)
And no PPEs after solving.
My setup is fairly straighforward, although it's through the Python layer so it might look a little different for an IIF setup:
Any pointers on how to debug this?
The text was updated successfully, but these errors were encountered: