RigidBodySim.jl icon indicating copy to clipboard operation
RigidBodySim.jl copied to clipboard

Tests failing due to PeriodicController issue

Open tkoolen opened this issue 6 years ago • 15 comments

First failure: https://travis-ci.org/JuliaRobotics/RigidBodySim.jl/jobs/583088525#L541-L548

Possibly related to https://github.com/JuliaDiffEq/DiffEqCallbacks.jl/commit/46cd2b256a943957d21a857da4b22b37833d8f6d, though there have been builds with version 2.8.0 of DiffEqCallbacks that passed.

tkoolen avatar Sep 19 '19 18:09 tkoolen

Probably related. The big change was:

https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/pull/841

Anything that didn't rely on internal details should be fine, but anything that did grab internal details needs to know now that tstops and saveat now always use a BinaryMinHeap, instead of changing the sort direction depending on tdir (since that's not type-stable). So we multiply by -1 to change the sort direction. The tooling around it all knows about it, and the callback library that was digging into the details of the time stepping handles it now due to that commit you linked. If you're directly grabbing the tstops or saveat somewhere you need to do a similar multiplication by tdir.

ChrisRackauckas avatar Sep 21 '19 22:09 ChrisRackauckas

FWIW, the best thing would be for it not to be separate types for min vs max heaps, but 🤷‍♂ for now this works.

ChrisRackauckas avatar Sep 21 '19 22:09 ChrisRackauckas

I don't immediately see why you'd get an issue since the implementation detail should only be changing what happens when integrating in reverse time.

ChrisRackauckas avatar Sep 21 '19 22:09 ChrisRackauckas

I'm not entirely sure what MeshCat.jl is, but it's giving me install issues:

(v1.1) pkg> dev RigidBodySim
[ Info: Path `C:\Users\accou\.julia\dev\RigidBodySim` exists and looks like the correct package, using existing path
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package WebIO [0f1e0344]:
 WebIO [0f1e0344] log:
 ├─possible versions are: [0.1.0-0.1.10, 0.1.12, 0.2.0-0.2.8, 0.3.0-0.3.4, 0.4.0-0.4.2, 0.6.0-0.6.2, 0.7.0, 0.8.0-0.8.1, 0.8.3-0.8.9, 0.8.11] or uninstalled
 ├─restricted to versions 0.2.6-* by RigidBodySim [e61f16d8], leaving only versions [0.2.6-0.2.8, 0.3.0-0.3.4, 0.4.0-0.4.2, 0.6.0-0.6.2, 0.7.0, 0.8.0-0.8.1, 0.8.3-0.8.9, 0.8.11]
 │ └─RigidBodySim [e61f16d8] log:
 │   ├─possible versions are: 1.3.0 or uninstalled
 │   └─RigidBodySim [e61f16d8] is fixed to version 1.3.0
 ├─restricted by compatibility requirements with Atom [c52e3926] to versions: [0.8.1, 0.8.3-0.8.9, 0.8.11]
 │ └─Atom [c52e3926] log:
 │   ├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0-0.4.6, 0.5.0-0.5.10, 0.6.0-0.6.17, 0.7.0-0.7.15, 
0.8.0-0.8.8, 0.9.0-0.9.1, 0.10.0-0.10.1] or uninstalled
 │   └─restricted to versions 0.10.1 by an explicit requirement, leaving only versions 0.10.1
 └─restricted by compatibility requirements with MeshCat [283c5d60] to versions: [0.1.8-0.1.10, 0.1.12, 0.2.0-0.2.8, 0.3.0-0.3.4, 0.4.0-0.4.2, 0.7.0] — no versions left
   └─MeshCat [283c5d60] log:
     ├─possible versions are: [0.0.1-0.0.3, 0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0] or uninstalled     ├─restricted to versions * by RigidBodySim [e61f16d8], leaving only versions [0.0.1-0.0.3, 0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0]
     │ └─RigidBodySim [e61f16d8] log: see above
     └─restricted by compatibility requirements with MeshCatMechanisms [6ad125db] to versions: [0.2.1-0.2.3, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0]
       └─MeshCatMechanisms [6ad125db] log:
         ├─possible versions are: [0.0.1-0.0.6, 0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0] or uninstalled
         └─restricted to versions 0.1.1-* by RigidBodySim [e61f16d8], leaving only versions [0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0]
           └─RigidBodySim [e61f16d8] log: see above

ChrisRackauckas avatar Sep 21 '19 23:09 ChrisRackauckas

Thanks, Chris, that'll make it easy to fix on this end. FWIW, removing the Manifest.toml in my deved RigidBodySim and instantiateing works fine; probably a compatibility issue with Atom via WebIO. MeshCat is the web-based 3D viewer we use.

tkoolen avatar Sep 22 '19 03:09 tkoolen

I'm having the same issue as Chris, unable to install the package. Does this issue require a new commit or can I still use the current version somehow?

sn3akyLynx avatar Oct 01 '19 09:10 sn3akyLynx

@sn3akyLynx, are you also using Juno?

tkoolen avatar Oct 02 '19 10:10 tkoolen

@sn3akyLynx, are you also using Juno?

Yes, Atom with Juno. It has worked earlier.

sn3akyLynx avatar Oct 02 '19 10:10 sn3akyLynx

I personally think that Juno's design decision of installing its packages next to the user's packages is very unfortunate, as it can lead to these kinds of situations (I've complained about this before, see https://github.com/JunoLab/Juno.jl/issues/265). However, I'll see what I can do on Sunday.

tkoolen avatar Oct 05 '19 02:10 tkoolen

@ChrisRackauckas, it turns out that the PeriodicController issue is due to the fact that callbacks passed into the ODEProblem constructor and those passed into solve are no longer merged into a CallbackSet (https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/pull/919). What was the motivation for this change?

tkoolen avatar Oct 06 '19 23:10 tkoolen

It solved a bunch of requests with the ensemble system to allow for keyword arguments to be propagated if passed into the problem types. Since the callback handling wasn't actually documented, I searched out for any uses and didn't find any, so we made it line up with the other keyword arguments in the DiffEqBase 6.0 change. We should probably have all of the keyword arguments stored in the problems act similarly, but if we need a keyword argument to restore this behavior we can add it (and document it this time)

ChrisRackauckas avatar Oct 07 '19 00:10 ChrisRackauckas

Thanks. Although it conceptually makes sense to me to handle all keyword arguments the same, I think that having the problem's keyword arguments be silently overwritten by the solve keyword arguments (in general) has great potential to create some pretty subtle bugs. Disregarding consistency between keyword arguments for a second, I can't think of a case where overwriting the callback would be the desired behavior.

I'd personally treat all arguments the same, but with the consistent strategy of 'merge where it makes sense, error otherwise, never overwrite'. If that conflicts with the ensemble system requirements, I'd add an additional overwrite keyword argument to solve that defaults to false.

A new kwarg like additional_callback could also work, but it means that existing RigidBodySim users' code would (continue to) be broken, and would also mean that if the user retroactively wants to add a callback to the problem when they already have a solve callback, they have to remember to make changes in two places.

tkoolen avatar Oct 07 '19 12:10 tkoolen

I think I have run into this issue when I updated from SciML/[email protected] to SciML/[email protected]. It may be due to SciML/DiffEqCallbacks.jl#79.

Below is a minimal working example that is throwing the ERROR: Output of PeriodicController with Δt = X was last updated at Y, but current time is Z. and its output.

using RigidBodyDynamics
using RigidBodySim
mechanism = rand_chain_mechanism(Float64, [Revolute{Float64} for i = 1:8]...)
state = MechanismState(mechanism)
control! = (Ď„, t, state) -> Ď„ .= 0.0
controller = PeriodicController(similar(velocity(state)), 0.01, control!)
dynamics = Dynamics(mechanism, controller)
tspan = (0.0, 5.0)
ode_problem = ODEProblem(dynamics, state, tspan)
sol = RigidBodySim.solve(ode_problem, Tsit5(), abstol = 1e-9)
ERROR: Output of PeriodicController with Δt = 0.01 was last updated at 0.06, but current time is 0.07.
Please ensure that an associated `PeriodicCallback` was passed into the `ODEProblem` constructor.
This is done automatically if the `ODEProblem` was created using a `Dynamics` object with the `PeriodicController` as the `control!` field,
but if a `PeriodicController` is called from some other control function, the callback needs to be created manually using
`PeriodicCallback(periodiccontroller)` and passed into the `ODEProblem` constructor as the `callback` keyword argument
(or use `CallbackSet` to combine the `PeriodicCallback` with any other callbacks you may have).

Stacktrace:
 [1] (::PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)})(::SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}}, ::Float64, ::MechanismState{Float64,Float64,Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1}}) at /home/henrique/.julia/packages/RigidBodySim/Beung/src/control.jl:149
 [2] (::Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"})(::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Float64) at /home/henrique/.julia/packages/RigidBodySim/Beung/src/core.jl:83
 [3] ODEFunction at /home/henrique/.julia/packages/DiffEqBase/A6T7i/src/diffeqfunction.jl:248 [inlined]
 [4] perform_step!(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},DiffEqBase.ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}, ::Bool) at /home/henrique/.julia/packages/OrdinaryDiffEq/wVdhu/src/perform_step/low_order_rk_perform_step.jl:641
 [5] perform_step! at /home/henrique/.julia/packages/OrdinaryDiffEq/wVdhu/src/perform_step/low_order_rk_perform_step.jl:628 [inlined]
 [6] solve!(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},DiffEqBase.ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at /home/henrique/.julia/packages/OrdinaryDiffEq/wVdhu/src/solve.jl:424
 [7] #__solve#357 at /home/henrique/.julia/packages/OrdinaryDiffEq/wVdhu/src/solve.jl:5 [inlined]
 [8] solve_call(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,DiffEqBase.ODEFunction{true,Dynamics{Float64,TypeSortedCollections.TypeSortedCollection{Tuple{Array{Joint{Float64,Revolute{Float64}},1}},1},PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)},RigidBodySim.Core.var"#2#4"},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{DiffEqCallbacks.var"#40#43"{Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}},DiffEqCallbacks.var"#42#45"{RigidBodySim.Control.var"#3#5"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Bool,Float64,Base.RefValue{Float64},Base.RefValue{Int64},DiffEqCallbacks.var"#41#44"{RigidBodySim.Control.var"#4#6"{PeriodicController{SegmentedVector{JointID,Float64,Base.OneTo{JointID},Array{Float64,1}},Float64,var"#5#6",typeof(DiffEqBase.INITIALIZE_DEFAULT)}},Float64,Base.RefValue{Float64},Base.RefValue{Int64}}}}}}}}},DiffEqBase.StandardODEProblem}, ::Tsit5; merge_callbacks::Bool, kwargs::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:abstol,),Tuple{Float64}}}) at /home/henrique/.julia/packages/DiffEqBase/A6T7i/src/solve.jl:60
 [9] #solve#449 at /home/henrique/.julia/packages/DiffEqBase/A6T7i/src/solve.jl:78 [inlined]
 [10] top-level scope at REPL[12]:1

For anyone who might run into this, my current dirty workaround is:

] add [email protected]; pin DiffEqCallbacks

ferrolho avatar May 20 '20 11:05 ferrolho

Thanks for the MWE. I can try and fix since it is my fault.

ChrisRackauckas avatar May 20 '20 14:05 ChrisRackauckas

Fixed in https://github.com/JuliaRobotics/RigidBodySim.jl/pull/126

ChrisRackauckas avatar May 20 '20 22:05 ChrisRackauckas