Skip to content

Commit 7690db5

Browse files
committed
add windows crash test
1 parent 3865327 commit 7690db5

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include("windows_crash.jl")
2+
13
using ModelingToolkit
24
using Multibody
35
using Test

test/windows_crash.jl

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using ModelingToolkit
2+
using Multibody
3+
using Test
4+
using JuliaSimCompiler
5+
using OrdinaryDiffEq
6+
t = Multibody.t
7+
D = Differential(t)
8+
9+
@named robot = Multibody.Robot6DOF()
10+
robot = complete(robot)
11+
println("complete")
12+
13+
ssys = structural_simplify(IRSystem(robot))
14+
println("structural_simplify")
15+
16+
17+
prob = ODEProblem(ssys, [
18+
robot.mechanics.r1.phi => deg2rad(-60)
19+
robot.mechanics.r2.phi => deg2rad(20)
20+
robot.mechanics.r3.phi => deg2rad(90)
21+
robot.mechanics.r4.phi => deg2rad(0)
22+
robot.mechanics.r5.phi => deg2rad(-110)
23+
robot.mechanics.r6.phi => deg2rad(0)
24+
25+
robot.axis1.motor.Jmotor.phi => deg2rad(-60) * (-105) # Multiply by gear ratio
26+
robot.axis2.motor.Jmotor.phi => deg2rad(20) * (210)
27+
robot.axis3.motor.Jmotor.phi => deg2rad(90) * (60)
28+
], (0.0, 2.0))
29+
println("ODEProblem done, calling solve")
30+
31+
sol = solve(prob, Rodas5P(autodiff=false));

0 commit comments

Comments
 (0)