Skip to content

Commit

Permalink
add windows crash test
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Oct 1, 2024
1 parent 3865327 commit 7690db5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("windows_crash.jl")

using ModelingToolkit
using Multibody
using Test
Expand Down
31 changes: 31 additions & 0 deletions test/windows_crash.jl
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit 7690db5

Please sign in to comment.