Skip to content

Commit fd57830

Browse files
committed
updates tests
1 parent 766504e commit fd57830

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/robot/FullRobot.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ function Robot6DOF(; name, kwargs...)
247247

248248
controlBus = ControlBus()
249249
end
250+
push!(systems, world)
250251

251252
eqs = [connect(axis2.flange, mechanics.axis2)
252253
connect(axis1.flange, mechanics.axis1)

test/runtests.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ using Test
44
using JuliaSimCompiler
55
using OrdinaryDiffEq
66
using LinearAlgebra
7-
t = Multibody.t
8-
D = Differential(t)
7+
isdefined(Main, :t) || (t = Multibody.t)
8+
isdefined(Main, :D) || (D = Differential(t))
99
doplot() = false
1010
world = Multibody.world
1111

@@ -1124,6 +1124,7 @@ using LinearAlgebra
11241124

11251125
prob = ODEProblem(ssys, [model.joint.phi => 0], (0, 1))
11261126
sol = solve(prob, Rodas5P(), abstol=1e-8, reltol=1e-8)
1127+
@test SciMLBase.successful_retcode(sol)
11271128
# first(render(model, sol, 0, x=2.5, y=1.5, z=2.5, show_axis=true))
11281129
# @test sol(10, idxs=model.body.body.m) ≈ 226.27 rtol=1e-3 # Values from open modelica
11291130
# @test sol(10, idxs=model.body.body.I_11) ≈ 245.28 rtol=1e-3
@@ -1148,8 +1149,6 @@ end
11481149

11491150
using LinearAlgebra, ModelingToolkit, Multibody, JuliaSimCompiler, OrdinaryDiffEq
11501151
using Multibody.Rotations: RotXYZ
1151-
t = Multibody.t
1152-
D = Multibody.D
11531152
world = Multibody.world
11541153

11551154
@named joint = Multibody.Spherical(isroot=false, state=false, quat=false)

test/test_quaternions.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ end
198198

199199
# @testset "Spherical joint with quaternion state" begin
200200
using LinearAlgebra, ModelingToolkit, Multibody, JuliaSimCompiler
201-
t = Multibody.t
202201
world = Multibody.world
203202

204203

@@ -220,7 +219,7 @@ end
220219
ssys = structural_simplify(irsys)
221220

222221

223-
D = Differential(t)
222+
isdefined(Main, :D) || (D = Differential(t))
224223
# q0 = randn(4); q0 ./= norm(q0)
225224
# q0 = [1,0,0,0]
226225
prob = ODEProblem(ssys, [

0 commit comments

Comments
 (0)