Skip to content

Commit

Permalink
updates tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Oct 7, 2024
1 parent 766504e commit fd57830
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/robot/FullRobot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ function Robot6DOF(; name, kwargs...)

controlBus = ControlBus()
end
push!(systems, world)

eqs = [connect(axis2.flange, mechanics.axis2)
connect(axis1.flange, mechanics.axis1)
Expand Down
7 changes: 3 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ using Test
using JuliaSimCompiler
using OrdinaryDiffEq
using LinearAlgebra
t = Multibody.t
D = Differential(t)
isdefined(Main, :t) || (t = Multibody.t)
isdefined(Main, :D) || (D = Differential(t))
doplot() = false
world = Multibody.world

Expand Down Expand Up @@ -1124,6 +1124,7 @@ using LinearAlgebra

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

using LinearAlgebra, ModelingToolkit, Multibody, JuliaSimCompiler, OrdinaryDiffEq
using Multibody.Rotations: RotXYZ
t = Multibody.t
D = Multibody.D
world = Multibody.world

@named joint = Multibody.Spherical(isroot=false, state=false, quat=false)
Expand Down
3 changes: 1 addition & 2 deletions test/test_quaternions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ end

# @testset "Spherical joint with quaternion state" begin
using LinearAlgebra, ModelingToolkit, Multibody, JuliaSimCompiler
t = Multibody.t
world = Multibody.world


Expand All @@ -220,7 +219,7 @@ end
ssys = structural_simplify(irsys)


D = Differential(t)
isdefined(Main, :D) || (D = Differential(t))
# q0 = randn(4); q0 ./= norm(q0)
# q0 = [1,0,0,0]
prob = ODEProblem(ssys, [
Expand Down

0 comments on commit fd57830

Please sign in to comment.