Skip to content

Commit b17f4ee

Browse files
committed
fix simulation generation
1 parent 335581a commit b17f4ee

File tree

24 files changed

+10
-28
lines changed

24 files changed

+10
-28
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ContactImplicitMPC"
22
uuid = "842347fd-0767-4ff8-b652-76aad5eb0a37"
33
authors = ["simon-lc <simonlc@stanford.edu>", "thowell <thowell@stanford.edu>"]
4-
version = "0.1.4"
4+
version = "0.1.5"
55

66
[deps]
77
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
This repository contains algorithms and examples from our paper: [Fast Contact-Implicit Model-Predictive Control](https://arxiv.org/abs/2107.05616).
66

7+
A collection of examples are pre-generated in notebooks with the package, please try: [flamingo](examples/flamingo/flat.jl), [pushbot](examples/pushbot/push_recovery.jl), [hopper](examples/hopper/flat.jl), and [quadruped](examples/quadruped/flat.jl). Additional notebooks with examples from the paper can be [generated](examples/README.md).
8+
79
## Installation
810
- `ContactImplicitMPC` can be added via the Julia package manager (type `]`): `pkg> add ContactImplicitMPC`
911

10-
A collection of examples are pre-generated in notebooks with the package, please try: [flamingo](examples/flamingo/flat.jl), [pushbot](examples/pushbot/push_recovery.jl), [hopper](examples/hopper/flat.jl), and [quadruped](examples/quadruped/flat.jl). Additional notebooks for examples from the paper can be [generated](examples/README.md).
11-
1212
## Flamingo
1313
<img src="animations/flamingo.gif" alt="drawing" width="400"/>
1414

examples/flamingo/Manifest.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,9 @@ version = "2.0.1"
807807

808808
[[PlotUtils]]
809809
deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"]
810-
git-tree-sha1 = "2537ed3c0ed5e03896927187f5f2ee6a4ab342db"
810+
git-tree-sha1 = "b084324b4af5a438cd63619fd006614b3b20b87b"
811811
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
812-
version = "1.0.14"
812+
version = "1.0.15"
813813

814814
[[Plots]]
815815
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]

examples/generate_examples.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Pkg.activate(dir)
77
include(joinpath(dir, "src/code_gen_loader.jl"))
88

99
# Generate dynamics
10-
dynamicsdir = joinpath(dir, "src", "dynamics")
10+
dynamicsdir = joinpath(dirname(pathof(ContactImplicitMPC)), "..", "src", "dynamics")
1111
include(joinpath(dynamicsdir, "generate_dynamics.jl"))
1212

1313
# Generate simulation
14-
simulationdir = joinpath(dir, "src", "simulation")
14+
simulationdir = joinpath(dirname(pathof(ContactImplicitMPC)), "..", "src", "simulation")
1515
include(joinpath(simulationdir, "generate_simulation.jl"))
0 Bytes
Binary file not shown.

src/dynamics/generate_dynamics.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,11 @@ expr_dyn = generate_dynamics_expressions(model)
131131
save_expressions(expr_dyn, path_dyn, overwrite=true)
132132
instantiate_dynamics!(model, path_dyn)
133133

134-
################################################################################
134+
###############################################################################
135135
# Rigid body
136-
################################################################################
136+
###############################################################################
137137
dir = joinpath(@__DIR__, "rigidbody")
138138
model = deepcopy(rigidbody)
139-
# include(joinpath(module_dir(), "src/dynamics/rigidbody/model.jl"))
140139

141140
path_base = joinpath(dir, "dynamics/base.jld2")
142141
path_dyn = joinpath(dir, "dynamics/dynamics.jld2")
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/dynamics/rigidbody/model.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,3 @@ rigidbody = RigidBody(Dimensions(7, 6, 3, 1, 1),
184184
10.0, [0.01, 0.01, 0.01], 9.81, 1.0, 0.25,
185185
BaseMethods(), DynamicsMethods(),
186186
SVector{6}(zeros(6)))
187-
188-
#
189-
# @variables x
190-
# @variables y
191-
# @variables z
192-
# @variables λ
193-
#
194-
# @variables px
195-
# @variables py
196-
# @variables pz
197-
#
198-
# L = (px - x)^2.0 + (py - y)^2.0 + (pz - z)^2.0 + λ * (z - x^2.0 - y^2.0)
199-
#
200-
# dL = Symbolics.gradient(L, [x; y; z; λ])
201-
# dL = simplify.(dL)
202-
#
203-
# ddL = Symbolics.hessian(L, [x; y; z; λ])
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)