Skip to content

Commit 8035ff1

Browse files
committed
Merge branch 'main' of https://github.com/thowell/ContactImplicitMPC.jl into main
2 parents 2c75f0f + 4b3667d commit 8035ff1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+875
-37
lines changed

deps/build.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
append!(empty!(LOAD_PATH), Base.DEFAULT_LOAD_PATH)
22
using Pkg
3+
4+
################################################################################
5+
# Generate notebooks
6+
################################################################################
37
exampledir = joinpath(@__DIR__, "..", "examples")
48
Pkg.activate(exampledir)
59
Pkg.add("Literate")
610
include(joinpath(exampledir, "generate_notebooks.jl"))
711

12+
################################################################################
13+
# Code generation
14+
################################################################################
15+
# Add minimal set of packages
16+
Pkg.add(PackageSpec(name = "FileIO", version = "1.9"))
17+
Pkg.add(PackageSpec(name = "ForwardDiff", version = "0.10"))
18+
Pkg.add(PackageSpec(name = "IfElse", version = "0.1"))
19+
Pkg.add(PackageSpec(name = "JLD2", version = "0.4"))
20+
Pkg.add(PackageSpec(name = "Rotations", version = "1.0"))
21+
Pkg.add(PackageSpec(name = "StaticArrays", version = "1.2"))
22+
Pkg.add(PackageSpec(name = "Symbolics", version = "0.1.29"))
23+
Pkg.add(PackageSpec(name = "LinearAlgebra"))
24+
25+
# Load minimal set of packages and scripts
26+
loaderdir = joinpath(@__DIR__, "..", "src", "loader.jl")
27+
include(loaderdir)
28+
29+
# Generate dynamics expressions
30+
dynamicsdir = joinpath(@__DIR__, "..", "src", "dynamics")
31+
include(joinpath(dynamicsdir, "generate_dynamics.jl"))
832

33+
# Generate simulation expressions
34+
simulationdir = joinpath(@__DIR__, "..", "src", "simulation")
35+
include(joinpath(simulationdir, "generate_simulation2.jl"))

src/ContactImplicitMPC.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ include("solver/linear_solver.jl")
3434
include("solver/lu.jl")
3535
include("solver/qr.jl")
3636
include("solver/schur.jl")
37-
include("solver/cones.jl")
38-
include("solver/indices.jl")
37+
include("solver/cones.jl")
38+
include("solver/indices.jl")
3939

4040
# Environment
4141
include("simulator/environment.jl")
@@ -46,9 +46,6 @@ include("dynamics/model.jl")
4646
# Simulator
4747
include("simulation/index.jl")
4848

49-
# Solver
50-
include("solver/interior_point.jl")
51-
5249
# Simulator
5350
include("simulation/contact_methods.jl")
5451
include("simulation/simulation.jl")
@@ -62,6 +59,9 @@ include("dynamics/quaternions.jl")
6259
include("dynamics/mrp.jl")
6360
include("dynamics/euler.jl")
6461

62+
# Solver
63+
include("solver/interior_point.jl")
64+
6565
include("dynamics/particle_2D/model.jl")
6666
include("dynamics/particle/model.jl")
6767
include("dynamics/hopper_2D/model.jl")
@@ -176,7 +176,7 @@ export
176176
module_dir,
177177
open_loop_disturbances,
178178
disturbances,
179-
Disturbances,
179+
Disturbances,
180180
NoDisturbances,
181181
OpenLoopDisturbance,
182182
impulse_disturbances,
@@ -241,12 +241,12 @@ export
241241
visualize_payload!,
242242
process!,
243243
contact_trajectory,
244-
pack_z,
244+
pack_z,
245245
pack_θ,
246246
generate_pusher_traj,
247247
update_friction_coefficient,
248248
quadratic_objective,
249-
particle,
249+
particle,
250250
particle_2D,
251251
hopper_2D,
252252
hopper_3D,
@@ -262,14 +262,14 @@ export
262262
flat_2D_nc,
263263
slope1_2D_lc,
264264
sine2_2D_lc,
265-
piecewise_2D_lc,
266-
stairs3_2D_lc,
267-
flat_3D_lc,
268-
sine2_3D_lc,
269-
sine1_2D_lc,
265+
piecewise_2D_lc,
266+
stairs3_2D_lc,
267+
flat_3D_lc,
268+
sine2_3D_lc,
269+
sine1_2D_lc,
270270
piecewise1_2D_lc,
271271
sine3_2D_lc,
272-
slope_smooth_2D_lc,
272+
slope_smooth_2D_lc,
273273
flat_2D_lc,
274274
flat_3D_lc,
275275
plot_surface!,
0 Bytes
Binary file not shown.
-62.4 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)