diff --git a/test/runtests.jl b/test/runtests.jl index 1644d77c..992f9467 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,5 @@ +include("windows_crash.jl") + using ModelingToolkit using Multibody using Test diff --git a/test/windows_crash.jl b/test/windows_crash.jl new file mode 100644 index 00000000..c533b1d9 --- /dev/null +++ b/test/windows_crash.jl @@ -0,0 +1,31 @@ +using ModelingToolkit +using Multibody +using Test +using JuliaSimCompiler +using OrdinaryDiffEq +t = Multibody.t +D = Differential(t) + +@named robot = Multibody.Robot6DOF() +robot = complete(robot) +println("complete") + +ssys = structural_simplify(IRSystem(robot)) +println("structural_simplify") + + +prob = ODEProblem(ssys, [ + robot.mechanics.r1.phi => deg2rad(-60) + robot.mechanics.r2.phi => deg2rad(20) + robot.mechanics.r3.phi => deg2rad(90) + robot.mechanics.r4.phi => deg2rad(0) + robot.mechanics.r5.phi => deg2rad(-110) + robot.mechanics.r6.phi => deg2rad(0) + + robot.axis1.motor.Jmotor.phi => deg2rad(-60) * (-105) # Multiply by gear ratio + robot.axis2.motor.Jmotor.phi => deg2rad(20) * (210) + robot.axis3.motor.Jmotor.phi => deg2rad(90) * (60) +], (0.0, 2.0)) +println("ODEProblem done, calling solve") + +sol = solve(prob, Rodas5P(autodiff=false)); \ No newline at end of file