Skip to content

Commit

Permalink
set explicit world.g
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jun 24, 2024
1 parent 0ecd083 commit 2b26236
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/src/examples/kinematic_loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ connections = [
]
@named fourbar = ODESystem(connections, t, systems = [world; systems])
m = structural_simplify(IRSystem(fourbar))
prob = ODEProblem(m, [], (0.0, 30.0))
prob = ODEProblem(m, [world.g => 9.81], (0.0, 30.0))
sol = solve(prob, Rodas4(autodiff=false))
plot(sol, idxs = [j1.phi, j2.phi, j3.phi])
Expand All @@ -72,7 +72,6 @@ using Test
@test SciMLBase.successful_retcode(sol)
@test sol(sol.t[end], idxs=j3.phi) % 2pi ≈ π/2 atol=0.3 # Test the the "pendulum" is hanging almost straight down after sufficient time has passed
@test sol(sol.t[end], idxs=j2.phi) % 2pi ≈ -π/2 atol=0.3
```


Expand Down
2 changes: 1 addition & 1 deletion test/test_orientation_getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
model = complete(model)
ssys = structural_simplify(IRSystem(model))

prob = ODEProblem(ssys, [model.shoulder_joint.phi => 0.0, model.elbow_joint.phi => 0.1], (0, 12))
prob = ODEProblem(ssys, [model.shoulder_joint.phi => 0.0, model.elbow_joint.phi => 0.1, model.world.g => 9.81], (0, 12))
sol = solve(prob, Rodas4())


Expand Down

0 comments on commit 2b26236

Please sign in to comment.