You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/get-started/installation.md
+44-29Lines changed: 44 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,64 +3,79 @@ title: Installation
3
3
description: Install TinyMPC
4
4
---
5
5
6
-
# How to install TinyMPC
6
+
# Installing TinyMPC
7
7
8
-
We offer user-friendly interfaces in high-level languages to enable low-level C++ codegeneration 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.
9
9
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).
11
11
12
12
Visit our [GitHub Discussions](https://github.com/TinyMPC/discussions) page for any questions related to the solver!
13
13
14
14
---
15
15
16
-
To get started simply choose your language interface and follow the easy installation instructions below (tested on Ubuntu):
16
+
## Install from PyPI
17
17
18
-
=== "C++"
18
+
!!!note "Currently only available on Linux operating systems"
Copy file name to clipboardExpand all lines: docs/get-started/model.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,29 @@
1
1
---
2
2
title: Model
3
-
description: Obtain the model
3
+
description: How to obtain the dynamics model
4
4
---
5
5
6
6
## Linearization
7
7
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.
9
9
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} -->
12
16
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.-->
14
18
15
19
---
16
20
17
21
## Cart-pole example
18
22
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)
20
24
{.annotate}
21
25
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).
23
27
24
28
Let's write those down in a dynamics function
25
29
@@ -131,4 +135,4 @@ Our integrator takes in the state and control at the current time step and integ
131
135
```
132
136
133
137
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).
[Get Started :material-arrow-right-box:](get-started/installation.md){.md-button}
15
+
</p>
16
+
13
17
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.
14
18
15
19
!!! success ""
16
20
17
21
🏆 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!
18
22
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
+
<palign="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}
0 commit comments