Skip to content

Commit d71bec7

Browse files
committed
build fix run_ci
1 parent b486460 commit d71bec7

File tree

29 files changed

+144
-878
lines changed

29 files changed

+144
-878
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
[![CI](https://github.com/thowell/ContactImplicitMPC.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/thowell/ContactImplicitMPC.jl/actions/workflows/CI.yml)
33
[![codecov](https://codecov.io/gh/thowell/ContactImplicitMPC.jl/branch/main/graph/badge.svg?token=3J4VOJ0VCH)](https://codecov.io/gh/thowell/ContactImplicitMPC.jl)
44

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

7-
We are currently cleaning up the examples for public consumption. At this stage, please try: [flamingo](examples/flamingo/flat.jl), [pushbot](examples/pushbot/push_recovery.jl), [hopper](examples/hopper/flat.jl), and [quadruped](examples/quadruped/flat.jl). Notebooks can be [generated](examples/README.md) for the examples.
7+
Notebooks can be generated for the [examples](examples/README.md), please try: [flamingo](examples/flamingo/flat.jl), [pushbot](examples/pushbot/push_recovery.jl), [hopper](examples/hopper/flat.jl), and [quadruped](examples/quadruped/flat.jl).
88

99
## Installation
1010
```

deps/build.jl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ Pkg.activate(exampledir)
99
Pkg.add("Literate")
1010
include(joinpath(exampledir, "generate_notebooks.jl"))
1111

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"))
12+
################################################################################
13+
# Dynamics and simulation 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"))
2424

25-
# # Load minimal set of packages and scripts
26-
# loaderdir = joinpath(@__DIR__, "..", "src", "loader.jl")
27-
# include(loaderdir)
25+
# Load minimal set of packages and scripts
26+
loaderdir = joinpath(@__DIR__, "..", "src", "code_gen_loader.jl")
27+
include(loaderdir)
2828

29-
# # Generate dynamics expressions
30-
# dynamicsdir = joinpath(@__DIR__, "..", "src", "dynamics")
31-
# include(joinpath(dynamicsdir, "generate_dynamics.jl"))
29+
# Generate dynamics expressions
30+
dynamicsdir = joinpath(@__DIR__, "..", "src", "dynamics")
31+
include(joinpath(dynamicsdir, "generate_dynamics.jl"))
3232

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

examples/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# ContactImplicitMPC.jl examples
22

3-
This directory contains various ContactImplicitMPC.jl examples.
3+
This directory contains examples of contact-implicit model-predictive control.
44
The `.jl` files in each subdirectory are meant to be processed using [Literate.jl](https://github.com/fredrikekre/Literate.jl).
5-
During the documentation build process, the `.jl` files are converted to markdown
6-
files that end up in the package documentation.
5+
During the build process, the `.jl` files are converted to notebooks and we generate models and simulation environments for each of the examples. Please note that the build time may take 30-60 minutes, but only needs to be performed once during the initial installation.
76

8-
You can also generate Jupyter notebooks and run them locally by performing the following steps:
7+
You can generate Jupyter notebooks and run them locally by performing the following steps:
98

109
1. [install ContactImplicitMPC.jl](https://github.com/thowell/ContactImplicitMPC.jl)
1110
2. [install IJulia](https://github.com/JuliaLang/IJulia.jl) (`add` it to the default project)
@@ -15,15 +14,7 @@ You can also generate Jupyter notebooks and run them locally by performing the f
1514
Pkg.build("ContactImplicitMPC")
1615
using IJulia, ContactImplicitMPC
1716
```
18-
4. generate dynamics (do once after installation)
19-
```
20-
include(joinpath(dirname(pathof(ContactImplicitMPC)), "..", "src/dynamics/generate_dynamics.jl"))
21-
```
22-
5. generate simulations (do once after installation)
23-
```
24-
include(joinpath(dirname(pathof(ContactImplicitMPC)), "..", "src/simulation/generate_simulation.jl"))
25-
```
26-
6. interact with notebooks
17+
4. interact with notebooks
2718
```
2819
notebook(dir=joinpath(dirname(pathof(ContactImplicitMPC)), "..", "examples"))
2920
```

src/code_gen_loader.jl

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
include(joinpath(@__DIR__, ".."))
2+
3+
using FileIO
4+
using ForwardDiff
5+
using IfElse
6+
using JLD2
7+
using LinearAlgebra
8+
using Rotations
9+
using StaticArrays
10+
using Symbolics
11+
12+
# Utilities
13+
include("utils.jl")
14+
15+
# Solver
16+
include("solver/cones.jl")
17+
18+
# Environment
19+
include("simulator/environment.jl")
20+
21+
# Dynamics
22+
include("dynamics/model.jl")
23+
24+
# Simulator
25+
include("simulation/index.jl")
26+
27+
# Simulator
28+
include("simulation/contact_methods.jl")
29+
include("simulation/simulation.jl")
30+
include("simulator/trajectory.jl")
31+
32+
include("dynamics/code_gen_dynamics.jl")
33+
include("dynamics/fast_methods_dynamics.jl")
34+
35+
# # Models
36+
include("dynamics/quaternions.jl")
37+
38+
include("dynamics/particle_2D/model.jl")
39+
include("dynamics/particle/model.jl")
40+
include("dynamics/hopper_2D/model.jl")
41+
include("dynamics/hopper_3D/model.jl")
42+
include("dynamics/quadruped/model.jl")
43+
include("dynamics/flamingo/model.jl")
44+
include("dynamics/pushbot/model.jl")
45+
include("dynamics/rigidbody/model.jl")
46+
47+
# Simulation
48+
include("simulation/environments/flat.jl")
49+
include("simulation/environments/piecewise.jl")
50+
include("simulation/environments/quadratic.jl")
51+
include("simulation/environments/slope.jl")
52+
include("simulation/environments/sinusoidal.jl")
53+
include("simulation/environments/stairs.jl")
54+
55+
include("simulation/residual_approx.jl")
56+
include("simulation/code_gen_simulation.jl")
91.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)