Skip to content

Commit 7d8b639

Browse files
committed
add award
2 parents e49b13e + ac61f3f commit 7d8b639

File tree

8 files changed

+280
-341
lines changed

8 files changed

+280
-341
lines changed

CNAME renamed to docs/CNAME

File renamed without changes.

docs/get-started/examples.md

Lines changed: 196 additions & 280 deletions
Large diffs are not rendered by default.

docs/get-started/installation.md

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,79 @@ title: Installation
33
description: Install TinyMPC
44
---
55

6-
# How to install TinyMPC
6+
# Installing TinyMPC
77

8-
We offer user-friendly interfaces in high-level languages to enable low-level C++ code generation and verification, making them ready for deployment on embedded hardware. We also provide various [robotic control examples](examples.md), including the Crazyflie nano-quadrotor.
8+
A python interface is available that allows for [direct usage](./examples.md/#setup-problem) of TinyMPC. The interface can also be used to [generate C++ code](./examples.md/#code-generation) and an associated python module which allows for quick testing before integrating the generated code with your project. We provide examples for a few robots and have [firmware](https://github.com/RoboticExplorationLab/tinympc-crazyflie-firmware) for running TinyMPC on the Crazyflie 2.1 quadrotor.
99

10-
Check out our GitHub repositories for implementation details: [C++](https://github.com/TinyMPC/TinyMPC), [Python](https://github.com/TinyMPC/tinympc-python), [MATLAB](https://github.com/TinyMPC/tinympc-matlab), [Julia](https://github.com/TinyMPC/tinympc-julia)
10+
Source code is [here](https://github.com/TinyMPC/TinyMPC). Check out our other GitHub repositories for interface implementation details: [Python](https://github.com/TinyMPC/tinympc-python), [Julia](https://github.com/TinyMPC/tinympc-julia), [MATLAB](https://github.com/TinyMPC/tinympc-matlab).
1111

1212
Visit our [GitHub Discussions](https://github.com/TinyMPC/discussions) page for any questions related to the solver!
1313

1414
---
1515

16-
To get started simply choose your language interface and follow the easy installation instructions below (tested on Ubuntu):
16+
## Install from PyPI
1717

18-
=== "C++"
18+
!!!note "Currently only available on Linux operating systems"
1919

20-
Clone the GitHub repository
20+
``` bash
21+
pip install --upgrade tinympc
22+
```
2123

22-
`git clone https://github.com/TinyMPC/TinyMPC.git`
24+
Go to the [examples](./examples.md) page to see how to use TinyMPC.
2325

24-
Navigate to root directory and run
26+
<!-- To get started simply choose your language interface and follow the installation instructions (tested on Ubuntu 22.04): -->
2527

26-
`cd TinyMPC && mkdir build && cd build`
2728

28-
Run CMake configure step
29+
<!--
30+
=== "Python"
2931
30-
`cmake ..`
32+
Make sure you have an up-to-date version of pip, then
3133
32-
Build TinyMPC
34+
```bash
35+
pip install tinympc
36+
```
3337
34-
`cmake --build .`
38+
Go to the [examples](./examples.md) page to see how to use TinyMPC.
3539
36-
Run an example
40+
=== "Julia"
3741
38-
`./examples/quadrotor_hovering`
42+
!!! warning "The Julia interface is still under development. Do not expect correct behavior."
3943
40-
=== "Python"
44+
Clone the GitHub repository with submodules
4145
42-
Clone the GitHub repository with submodule
46+
`git clone --recurse-submodules https://github.com/TinyMPC/tinympc-julia.git`
4347
44-
`git clone --recurse-submodules https://github.com/TinyMPC/tinympc-python.git`
48+
Run the `interactive_cartpole_ext.ipynb` example
49+
50+
=== "MATLAB"
4551
46-
Install the package
52+
!!! warning "The MATLAB interface is still under development. Do not expect correct behavior."
4753
48-
`cd tinympc-python & pip install -e .`
54+
Clone the GitHub repository with submodules
4955
50-
Run the `interactive_cartpole.ipynb` example
56+
`git clone --recurse-submodules https://github.com/TinyMPC/tinympc-matlab.git`
5157
52-
=== "Julia"
58+
Run the `interactive_cartpole.mlx` example -->
5359

54-
Clone the GitHub repository with submodule
60+
---
5561

56-
`git clone --recurse-submodules https://github.com/TinyMPC/tinympc-julia.git`
62+
## Build from source
5763

58-
Run the `interactive_cartpole_ext.ipynb` example
64+
If you'd like to build from source, you can do so by following these steps:
5965

60-
=== "MATLAB"
66+
Clone the repository and build the project
6167

62-
Clone the GitHub repository with submodule
68+
```bash
69+
git clone https://github.com/TinyMPC/TinyMPC.git
70+
cd TinyMPC
71+
mkdir build
72+
cd build
73+
cmake ..
74+
cmake --build .
75+
```
6376

64-
`git clone --recurse-submodules https://github.com/TinyMPC/tinympc-matlab.git`
77+
Run an example from the build directory
6578

66-
Run the `interactive_cartpole.mlx` example
79+
```bash
80+
./examples/quadrotor_hovering
81+
```

docs/get-started/model.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
---
22
title: Model
3-
description: Obtain the model
3+
description: How to obtain the dynamics model
44
---
55

66
## Linearization
77

8-
TinyMPC in its vanilla implementation can only handle linear dynamics, which means systems must be linearized about an equilibrium before being used by the solver. Extensions to TinyMPC allow the user to approximate a system's nonlinear dynamics by storing multiple linearizations, but we will start with only one.
8+
TinyMPC in its vanilla implementation can only handle linear dynamics, which means systems must be linearized about an equilibrium before being used by the solver. Extensions to TinyMPC allow the user to better approximate a system's nonlinear dynamics by storing multiple linearizations, but we will start here with only one.
99

10-
A discrete, linearized system is of the form $x_{k+1} = Ax_k + Bu_k$, where $x_k$ and $u_k$ are the state and control at the current time step, $A$ is the state-transition matrix, $B$ is the control or input matrix, and $x_{k+1}$ is the state at the next time step. For each of the examples given in [the previous page](./examples.md), the state-transition matrix $A$ and input matrix $B$ were computed from the system's continuous, nonlinear dynamics. (1)
11-
{.annotate}
10+
A discrete, linearized system takes the form $x_{k+1} = Ax_k + Bu_k$, where $x_k$ and $u_k$ are the state and control at the current time step, $A$ is the state-transition matrix, $B$ is the control or input matrix, and $x_{k+1}$ is the state at the next time step. Usually, this is derived from the continuous, nonlinear dynamics of the system, which takes the form $\dot{x} = f(x, u)$, where $f$ describes the instantaneous change in state at the current state and control input.
11+
12+
This page describes how to derive the discrete, linearized system dynamics from the continuous, nonlinear system dynamics.
13+
14+
<!-- For each of the examples given in [the previous page](./examples.md), the state-transition matrix $A$ and input matrix $B$ were computed from the system's continuous, nonlinear dynamics. (1)
15+
{.annotate} -->
1216

13-
1. The system still needs to be discretized even if it is already linear. This can be done with the matrix exponential or by the same methods shown for the nonlinear system below.
17+
<!-- 1. The system still needs to be discretized even if it is already linear. This can be done with the matrix exponential or by the same methods shown for the nonlinear system below. -->
1418

1519
---
1620

1721
## Cart-pole example
1822

19-
The continuous time dynamics for the cart-pole [have](https://courses.ece.ucsb.edu/ECE594/594D_W10Byl/hw/cartpole_eom.pdf){:target="_blank"} [been](https://www.matthewpeterkelly.com/tutorials/cartPole/index.html){:target="_blank"} [derived](https://underactuated.mit.edu/acrobot.html){:target="_blank"} [many](https://sharpneat.sourceforge.io/research/cart-pole/cart-pole-equations.html){:target="_blank"} [times](https://danielpiedrahita.wordpress.com/portfolio/cart-pole-control/){:target="_blank"}. For this example we'll use the convention from [this derivation](https://coneural.org/florian/papers/05_cart_pole.pdf){:target="_blank"}, where the pole is upright at $\theta=0$. If we ignore friction for this model, the only equations we care about in that derivation are (23) and (24). (1)
23+
The continuous time dynamics for the cart-pole [have](https://courses.ece.ucsb.edu/ECE594/594D_W10Byl/hw/cartpole_eom.pdf){:target="_blank"} [been](https://www.matthewpeterkelly.com/tutorials/cartPole/index.html){:target="_blank"} [derived](https://underactuated.mit.edu/acrobot.html){:target="_blank"} [many](https://sharpneat.sourceforge.io/research/cart-pole/cart-pole-equations.html){:target="_blank"} [times](https://danielpiedrahita.wordpress.com/portfolio/cart-pole-control/){:target="_blank"}. For this example we'll use the convention from [this derivation](https://coneural.org/florian/papers/05_cart_pole.pdf){:target="_blank"}, where the pole is upright at $\theta=0$. If we ignore friction, the only equations we care about in that derivation are (23) and (24). (1)
2024
{.annotate}
2125

22-
1. If you're following along and want to use a cart-pole model that has friction, use equations (21) and (22).
26+
1. If you want to use a cart-pole model that has friction, use equations (21) and (22).
2327

2428
Let's write those down in a dynamics function
2529

@@ -131,4 +135,4 @@ Our integrator takes in the state and control at the current time step and integ
131135
```
132136

133137

134-
Now all you have to do is save $A$ and $B$ and pass them to TinyMPC as shown in the problem setup section of [the examples page](examples.md).
138+
Now all you have to do is save $A$ and $B$ and pass them to TinyMPC as shown in the problem setup section of the [examples page](examples.md).

docs/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ description: TinyMPC description and overview
1010
<img width="50%" src="media/darkmode-banner.png#only-dark" />
1111
</p>
1212

13+
<p align="center" markdown>
14+
[Get Started :material-arrow-right-box:](get-started/installation.md){.md-button}
15+
</p>
16+
1317
TinyMPC is an open-source solver tailored for convex model-predictive control that delivers high speed computation with a small memory footprint. Implemented in C++ with minimal dependencies, TinyMPC is particularly suited for embedded control and robotics applications on resource-constrained platforms. TinyMPC can handle state and input bounds and second-order cone constraints. Python, Julia, and MATLAB interfaces are available to aid in generating code for embedded systems.
1418

1519
!!! success ""
1620

1721
🏆 TinyMPC won the Best Paper Award in Automation and was a finalist for Best Conference Paper Award and Best Student Paper Award at [IEEE ICRA 2024](https://2024.ieee-icra.org/awards-and-finalists/)! Thank you to everyone who has used TinyMPC and provided feedback!
1822

19-
[Get Started :material-arrow-right-box:](get-started/examples.md){.md-button}
20-
[ICRA Paper :simple-arxiv:](https://arxiv.org/abs/2310.16985){:target="_blank" .md-button}
21-
[CDC Paper :simple-arxiv:](https://arxiv.org/abs/2403.18149){:target="_blank" .md-button}
22-
[Watch the Video :fontawesome-brands-youtube:](https://www.youtube.com/watch?v=NKOrRyhcr6w){:target="_blank" .md-button}
23+
24+
<p align="center" markdown>
25+
[ICRA Paper :simple-arxiv:](https://arxiv.org/abs/2310.16985){:target="_blank" .md-button}
26+
[Conic Code Gen :simple-arxiv:](https://arxiv.org/abs/2403.18149){:target="_blank" .md-button}
27+
[Watch the Video :fontawesome-brands-youtube:](https://www.youtube.com/watch?v=NKOrRyhcr6w){:target="_blank" .md-button}
28+
</p>
2329

2430
---
2531

docs/solver/solver.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@ title: Inside TinyMPC
44

55
# Inside TinyMPC
66

7-
!!! note ""
8-
9-
:fontawesome-solid-microchip: At its core, TinyMPC accelerates and compresses the ADMM algorithm by exploiting the structure of the MPC problem.
10-
117
Our 2024 ICRA submission video provides a concise overview of the solver:
128

139
[Watch the Video :fontawesome-brands-youtube:](https://www.youtube.com/watch?v=NKOrRyhcr6w){:target="_blank" .md-button}
1410

15-
Visit our [GitHub Discussions](https://github.com/TinyMPC/discussions) page for any questions related to the solver!
16-
17-
---
1811

1912
## Problem formulation
2013

docs/stylesheets/extra.css

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
--md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7); */
1313

1414
[data-md-color-scheme="tinympc-default"] {
15-
--md-primary-fg-color: #7b87eb;
16-
--md-primary-fg-color--light: #f8f4fe;
17-
--md-primary-fg-color--dark: #1b1c23;
15+
--md-primary-fg-color: rgb(75, 105, 124);
16+
/* --md-primary-fg-color--light: #f8f4fe;
17+
--md-primary-fg-color--dark: #1b1c23; */
1818
}
1919

20-
[data-md-color-scheme="tinympc-slate"] {
20+
/* [data-md-color-scheme="tinympc-slate"] {
2121
--md-primary-fg-color: #e97beb;
22-
--md-primary-fg-color--light: #f4f6fe;
23-
--md-primary-fg-color--dark: #7a5632;
24-
--md-primary-bg-color: rgb(121, 22, 22);
25-
}
22+
} */
2623

24+
:root {
25+
--md-primary-fg-color: #1a2c4d;
26+
/* --md-primary-fg-color--light: #f8f4fe;
27+
--md-primary-fg-color--dark: #1b1c23; */
28+
}

mkdocs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ nav:
88
- Get Started:
99
- Installation: get-started/installation.md
1010
- Examples: get-started/examples.md
11-
- Obtain the model: get-started/model.md
12-
- The Solver:
11+
- Obtaining the model: get-started/model.md
12+
- The Solver:
1313
- Inside TinyMPC: solver/solver.md
1414
- Background: solver/background.md
1515

@@ -29,22 +29,25 @@ theme:
2929
toggle:
3030
icon: material/brightness-auto
3131
name: Switch to light mode
32-
32+
3333
# Palette toggle for light mode
3434
- media: "(prefers-color-scheme: light)"
3535
scheme: default
3636
toggle:
3737
icon: material/brightness-7
3838
name: Switch to dark mode
39-
primary: tinympc-default
39+
# primary: custom
40+
# primary: tinympc-default
4041

4142
# Palette toggle for dark mode
4243
- media: "(prefers-color-scheme: dark)"
44+
# scheme: tinympc-slate
4345
scheme: slate
4446
toggle:
4547
icon: material/weather-night
4648
name: Switch to system preference
47-
primary: tinympc-slate
49+
# primary: custom
50+
# primary: tinympc-slate
4851

4952
features:
5053
# - navigation.instant # Using navigation.instant disables table of contents auto-highlighting

0 commit comments

Comments
 (0)