Skip to content

Commit

Permalink
fix BipedRobot
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbanse committed Apr 22, 2024
1 parent 01abba3 commit d68b1a8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
11 changes: 11 additions & 0 deletions BipedRobot/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@ authors = ["vdebauche <vividebauche@hotmail.com>"]
version = "0.1.0"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MechanismGeometries = "931e9471-e8fb-5385-a477-07ad12718aca"
MeshCat = "283c5d60-a78f-5afe-a0af-af636b173e11"
MeshCatMechanisms = "6ad125db-dd91-5488-b820-c1df6aab299d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RigidBodyDynamics = "366cf18f-59d5-5db9-a4de-86a9f6786172"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
2 changes: 1 addition & 1 deletion BipedRobot/src/piracy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ end

# Needed for `show`ing a `Transform3D`.
# See https://github.com/JuliaSymbolics/Symbolics.jl/issues/97#issuecomment-798844158
Symbolics.@register Base.rem2pi(x, y::RoundingMode)
Symbolics.@register_symbolic Base.rem2pi(x, y::RoundingMode)

end
9 changes: 6 additions & 3 deletions BipedRobot/test/mass_matrix_double_pendulum_urdf.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
using BipedRobot
using RigidBodyDynamics

@static if get(ENV, "CI", "false") == "false"
using MeshCatMechanisms
using Plots
using BenchmarkTools
end

urdf = joinpath(dirname(dirname(pathof(BipedRobot))), "deps", "doublependulum.urdf")
doublependulum = parse_urdf(Float64, urdf)

const state = MechanismState(doublependulum)

@static if get(ENV, "CI", "false") == "false"
using MechCatMechanisms
vis = MechanismVisualizer(doublependulum, URDFVisuals(urdf))
#IJuliaCell(vis)
end
Expand All @@ -26,7 +31,6 @@ end
shoulder_angles = collect(q[1] for q in qs)

@static if get(ENV, "CI", "false") == "false"
using Plots
plot(
ts,
shoulder_angles;
Expand Down Expand Up @@ -85,7 +89,6 @@ M = mass_matrix(state)
mass_matrix!(M, state)

@static if get(ENV, "CI", "false") == "false"
using BenchmarkTools
@btime (setdirty!($state); mass_matrix!($M, $state))
else
mass_matrix!(M, state)
Expand Down

0 comments on commit d68b1a8

Please sign in to comment.