Skip to content

Commit

Permalink
test new action setup
Browse files Browse the repository at this point in the history
Many changes

removed public folder

test

Revert "test"

This reverts commit cabc924.

test

test

test

test

test

test

test

test

all

test

test

test
  • Loading branch information
luis-marques committed Sep 8, 2024
1 parent 00f36ae commit c32b1fb
Show file tree
Hide file tree
Showing 32 changed files with 1,472 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
/public
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Binary file added content/Corridor_LUCCa.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/Corridor_LUCCa.mp4
Binary file not shown.
Binary file added content/Corridor_Uncalibrated Baseline.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/Corridor_Uncalibrated Baseline.mp4
Binary file not shown.
Binary file added content/L-Turn_LUCCa.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/L-Turn_LUCCa.mp4
Binary file not shown.
Binary file added content/L-Turn_Uncalibrated Baseline.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/L-Turn_Uncalibrated Baseline.mp4
Binary file not shown.
Binary file added content/Passage_LUCCa.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/Passage_LUCCa.mp4
Binary file not shown.
Binary file added content/Passage_Uncalibrated Baseline.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/Passage_Uncalibrated Baseline.mp4
Binary file not shown.
Binary file added content/U-Turn_LUCCa.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/U-Turn_LUCCa.mp4
Binary file not shown.
Binary file added content/U-Turn_Uncalibrated Baseline.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/U-Turn_Uncalibrated Baseline.mp4
Binary file not shown.
87 changes: 58 additions & 29 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,78 @@ authors = [
]
venue = {name = "16th International Workshop on the Algorithmic Foundations of Robotics (WAFR) 2024", url = "https://www.algorithmic-robotics.org/"}
buttons = [
{name = "Paper", url = "https://aterenin.github.io/academic-paper"},
{name = "PDF", url = "https://aterenin.github.io/academic-paper"},
{name = "Poster", url = "https://aterenin.github.io/academic-paper"},
{name = "Paper", url = ""},
{name = "PDF", url = ""},
{name = "Poster", url = ""},
]
katex = true
large_card = false
large_card = true
favicon = false
+++

Welcome to the [Academic Paper](https://github.com/aterenin/academic-paper) Zola theme!
This theme is designed for hosting a blog-post-style website to facilitate scientific communication of your academic paper.
Whether learned, simulated, or analytical, approximations of a robot's dynamics can be inaccurate when encountering novel environments. Many approaches have been proposed to quantify the aleatoric uncertainty of such methods, i.e. uncertainty resulting from stochasticity, however these estimates alone are not enough to properly estimate the uncertainty of a model in a novel environment, where the actual dynamics can change. Such changes can induce epistemic uncertainty, i.e. uncertainty due to a lack of information/data. Accounting for *both* epistemic and aleatoric dynamics uncertainty in a theoretically-grounded way remains an open problem. We introduce **L**ocal **U**ncertainty **C**onformal **Ca**libration (LUCCa), a conformal prediction-based approach that calibrates the aleatoric uncertainty estimates provided by dynamics models to generate probabilistically-valid prediction regions of the system's state. We account for both epistemic and aleatoric uncertainty non-asymptotically, without strong assumptions about the form of the true dynamics or how it changes. The calibration is performed locally in the state-action space, leading to uncertainty estimates that are useful for planning. We validate our method by constructing probabilistically-safe plans for a double-integrator under significant changes in dynamics.

# Features
{% figure(alt=["LUCCA Diagram"] src=["model_final.png"] dark_invert=[true]) %}
**Figure.** Schematic of Local Uncertainty Conformal Calibration (LUCCa). Starting from a calibrated prediction region `$\hat{\mathcal N}_{\tau, cal}$`, we propagate the state uncertainty by composing an approximate dynamics model `$\tilde f$` outputting predictive MVNs of the future state with local conformal calibration. We consider approximate dynamics where the input and output distributions are MVNs of the state, but otherwise do not restrict the structure of `$\tilde f$`.
{% end %}

[Academic Paper](https://github.com/aterenin/academic-paper) is designed to be reasonably feature-complete. In particular, it supports:

* A header with title, author, publication venue, year, and optional buttons for the paper, PDF download link, code, poster, and video.
* Syntax highlighting via Zola, with a minimal CSS-based color theme.
* Math rendering via KaTeX, compatible with both client-side and server-side rendering when configured appropriately.
* Figures via a `figure(alt='Image alt text',src='path/to/image.png')` Zola shortcode, with support for optional captions, subfigures with optional subcaptions, implemented in responsive manner via flexbox.
* Markdown footnotes via Zola.
* Twitter Summary Card, OpenGraph, and JSON-LD metadata, to ensure the web pages produced are search-engine-friendly, and provide social media websites with a banner image link they can display when the website is shared on social media, with an implementation very similar to [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag).
# Problem Statement

Let's demonstrate some of these: writing
```tex
$$
\int_{\mathbb{R}} \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(\frac{(x-\mu)^2}{-2\sigma^2}\right) \mathrm{d} x = 1.
$$
```
in the Markdown file produces the output
**Problem.** Given an approximation `$\tilde f$` of the system's *unknown* stochastic dynamics `$f$`, a goal region `$\mathcal G \subseteq \mathcal S$`, a safe set `$\mathscr C \subseteq \mathcal S$`, a calibration dataset of state transitions `$D_{cal}$` and an acceptable failure-rate `$\alpha \in (0,1)$`, we aim to recursively solve the following stochastic optimization problem with planning horizon `$H \in \mathbb N$`:
```
$$
\int_{\mathbb{R}} \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(\frac{(x-\mu)^2}{-2\sigma^2}\right) \mathrm{d} x = 1.
\begin{alignat}{3}
&\!\min_{(u_{t},\ldots,u_{t+H-1})} &\qquad& J(s, u, \mathcal G)\\
&\text{subject to} & & Y_{\tau} \sim f(\bar{X}_\tau),\quad & \forall\tau\in\{t, \ldots, t+H-1\}\\
& & & \mathbb P(Y_{\tau} \in \mathscr C) \ge (1-\alpha),\quad & \forall\tau \in \{t,\ldots, t+H-1\} \\
& & & u_{\tau} \in \mathcal U, s_{\tau+1} \in \mathcal S, \quad &\forall\tau\in\{t, \ldots, t+H-1\}
\end{alignat}
$$
```
This theme also supports footnotes, and will style the heading that immediately precedes them.[^author]
&emsp; *Dynamics, (2)*: The real system evolves following the unknown stochastic dynamics `$f$`. We only have access to an approximation `$\tilde f$` and the inference transitions in `$D_{cal}$`.<br>
&emsp; *Safety, (3)*: Our trajectory should remain probabilistically safe, which we define as requiring it to lie within a safe set `$\mathscr C$` with at least a user-specified probability. This is difficult to guarantee in general for any `$f$` and `$\tilde f$`, since our approximation can be arbitrarily wrong in deployment conditions. <br>
&emsp;*State and Control Admissibility, (4)*: Both the control inputs and the states must belong to pre-defined sets. <br>
&emsp;*Objective Function, (1)*: Additionally, we aim to achieve optimality relative to an objective that incorporates `$\mathcal G$` along with the state and control sequences, `$s := (s_{t+1},\ldots, s_{t+H})$` and `$u := (u_{t},\ldots,u_{t+H-1})$`. For example, `$J$` might minimize the expectation of a distance metric to `$\mathcal G$`, control effort, or epistemic-uncertainty along the state-control sequences.

# LUCCa

Given a dynamics predictor and a small calibration dataset, LUCCa provides probabilistically valid prediction regions for the robot's future states accounting for both aleatoric and epistemic uncertainty. We prove its validity for any finite set of calibration data, predictors outputting a multivariate normal uncertainty, any unknown true dynamics function, and uncharacterized aleatoric perturbations. LUCCa calibrates the uncertainty locally relative to the system's state-action space, leading to prediction regions that are representative of predictive uncertainty and therefore useful for planning. For the first planning step, LUCCa satisfies the safety condition (3) above for any predictor form. For subsequent planning steps, this becomes more complex, but we use Loewner orders to prove that, if the dynamics approximation is linear (actual dynamics are still unconstrained), then LUCCa satisfies the safety condition (3) for all planning steps no matter the horizon length (see Appendix `$A$` for a discussion and the proof).

{{ figure(alt=["LUCCA Algorithm", "Calibrated Rollout"] src=["lucca_algo.png", "calibrated_rollout.png"] dark_invert=[true, true]) }}

# Experiments

We conducted experiments with an MPC controller that uses LUCCa to plan short-horizon trajectories to reach a goal. We compared LUCCa with a baseline on a double-integrator system over four environments shown below. In the white regions the dynamics predictor corresponds to the ground truth dynamics, but in the yellow regions there is a significant mismatch (actual dynamics become lower-friction). In both areas there is aleatoric uncertainty.

# Design and maintainability
{{ figure(src = ["./Corridor_Uncalibrated Baseline.mp4","./Corridor_LUCCa.mp4"], subcaption = ["**Uncalibrated Baseline** (Corridor Map)","**LUCCa** (Corridor Map)"], dark_invert=[false,false]) }}

[Academic Paper](https://github.com/aterenin/academic-paper) is [designed to last](https://jeffhuang.com/designed_to_last/), meaning that it follows a number of best practices to ensure the websites it produces continue to work correctly in the indefinite future with minimal to no maintenance.
In particular, this theme uses no JavaScript or CSS dependencies, except optionally KaTeX for math.
Zola, with its Rust-based code, focus on simplicity, and one-binary design, is the clear static site generator of choice for such a theme.

# BibTeX (Cite This)
{{ figure(src = ["./Passage_Uncalibrated Baseline.mp4","./Passage_LUCCa.mp4"], subcaption = ["**Uncalibrated Baseline** (Passage Map)","**LUCCa** (Passage Map)"], dark_invert=[false,false]) }}

[^author]: This theme is designed and built by Alexander Terenin.
{{ figure(src = ["./U-Turn_Uncalibrated Baseline.mp4","./U-Turn_LUCCa.mp4"], subcaption = ["**Uncalibrated Baseline** (U-Turn Map)","**LUCCa** (U-Turn Map)"], dark_invert=[false,false]) }}

{{ figure(src = ["./L-Turn_Uncalibrated Baseline.mp4","./L-Turn_LUCCa.mp4"], subcaption = ["**Uncalibrated Baseline** (L-Turn Map)","**LUCCa** (L-Turn Map)"], dark_invert=[false,false]) }}

The results suggest that using LUCCa's uncertainty estimate improves the success rate in these scenarios by avoiding collision. However, LUCCa only guarantees that `$(1-\alpha)$` percent of true states will be collision-free, so it does not provide a hard guarantee that the planned actions will result in collision-free states. We also note that the baseline did reach the goal faster when it didn't collide.

{% figure(alt=["vGPMP comparison table"] src=["perf_table.svg"] dark_invert=[true] style="width:100%") %}
**Table.** Comparison of LUCCa vs baseline in four environment over 30 runs (each).
{% end %}


Details about LUCCa's computational overhead (negligible) and its empirical coverage (in agreement with the theoretical bounds) can be found in the full paper (Section `$6$`). We also include visualizations of the local conformal scaling factor in Appendix `$B$`.

# BibTeX <small><small>(cite this!)</small></small>

```
@misc{marques2024----,
title={Quantifying Aleatoric and Epistemic Dynamics Uncertainty via Local Conformal Calibration},
author={Luís Marques and Dmitry Berenson},
year={2024},
eprint={-----},
archivePrefix={arXiv},
primaryClass={cs.Ro},
url={-----},
}
```
Binary file added content/calibrated_rollout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/loewner_order_diagram.pdf
Binary file not shown.
Binary file added content/loewner_order_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/lucca_algo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/model_final.pdf
Binary file not shown.
Binary file added content/model_final.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/perf_table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c32b1fb

Please sign in to comment.