Skip to content

Commit e6d5e52

Browse files
committed
Update README.md
1 parent 0ddc0b2 commit e6d5e52

File tree

1 file changed

+99
-2
lines changed

1 file changed

+99
-2
lines changed

README.md

+99-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,105 @@
11
# Dynamics Harmonics Analysis of robotic systems: Application in Data-Driven Koopman Modelling
22

3+
## Harmonics Analysis on library of robotics systems.
4+
5+
This work relies in [MorphoSymm](https://github.com/Danfoa/MorphoSymm) to enable the use of harmonic analysis on the state/phase space of [a library of robotic systems](https://github.com/Danfoa/MorphoSymm?tab=readme-ov-file#library-of-symmetric-dynamical-systems) with [Morphological Symmetries](https://arxiv.org/abs/2402.15552).
6+
7+
In this work we focus on the Mini-Cheetah quadruped robot, for which we apply harmonics analysis in order to decompose the dynamics of locomotion of the system
8+
9+
### Harmonics Analysis of the joint-space dynamics of the Mini Cheetah robot
10+
11+
Here we show the application of the isotypic decomposition to the robot's joint-space generalized position
12+
coordinates $\mathcal{Q}_{js} \subseteq \mathbb{R}^{12}$.
13+
14+
When we consider the symmetry group of the robot as the Klein-4 group $\mathbb{G} = \mathbb{K}_4 = \\{e, g_s, g_t, g_r\\}$, the joint-space decomposes into four isotypic subspaces of the same dimension:
15+
```math
16+
\mathcal{Q}_{js} = \mathcal{Q}_{js,1} \oplus \mathcal{Q}_{js,2} \oplus \mathcal{Q}_{js,3} \oplus \mathcal{Q}_{js,4} \quad | \; \mathcal{Q}_{js,4} \subseteq \mathbb{R}^3
17+
```
18+
Each isotypic subspace $\mathcal{Q}_{js, i}$ represents a space of synergistic motions that are restricted to feature only a subset of the symmetries of the system. Following our paper's notation, the symmetry transformations for each isotypic component are the following:
19+
20+
```math
21+
\begin{align*}
22+
g \diamond \symbf{q}(\symbf{\omega})^{(1)} \quad &| \quad \symbf{q}(\symbf{\omega})^{(1)} \in \mathcal{Q}_{js,1},\;\; g \in \mathbb{G}^{(1)} = \{e\} \\
23+
g \diamond \symbf{q}(\symbf{\omega})^{(2)} \quad &| \quad \symbf{q}(\symbf{\omega})^{(2)} \in \mathcal{Q}_{js,2},\;\; g \in \mathbb{G}^{(2)} = \{e, g_t\} \\
24+
g \diamond \symbf{q}(\symbf{\omega})^{(3)} \quad &| \quad \symbf{q}(\symbf{\omega})^{(3)} \in \mathcal{Q}_{js,3},\;\; g \in \mathbb{G}^{(3)} = \{e, g_r\} \\
25+
g \diamond \symbf{q}(\symbf{\omega})^{(4)} \quad &| \quad \symbf{q}(\symbf{\omega})^{(4)} \in \mathcal{Q}_{js,4},\;\; g \in \mathbb{G}^{(4)} = \{e, g_s\}
26+
\end{align*}
27+
```
28+
We can interprete the dimensions of each subspace, as being determined by the symmetry constraints imposed on each subspace.
29+
30+
By projecting an entire trajectory of motion to these spaces, we are able to characterize the motion as the superposition of lower-dimensional and synergistic motions, as presented in the following animations of different gait types and terrains.
31+
The robots in the background are representing the configurations of each isotypic subspace (left-most is the first subspace). While the robot in the front shows the recorded motion.
32+
33+
Next to each animation we plot the kinetic energy of each of the configurations on an isotypic subspace (the background robots). This allows us to quantify how relevant is each isotypic subspace for the generation of the motion of interest. For further details, please refer to the papaer, or create a question in the discussions section of this repository.
34+
35+
## Trotting gait
36+
### In forest
37+
[//]: # (recording_name=forest)
38+
<p float="left">
39+
<img src="docs/media/animations/mini-cheetah_Klein4-forest_harmonic_analysis.gif" width="68%" />
40+
<img src="docs/media/images/umich_dataset/forest_kin_energy_decomposition_Klein4.svg" width="29%" />
41+
</p>
42+
43+
### In grass
44+
[//]: # (recording_name=grass)
45+
<p float="left">
46+
<img src="docs/media/animations/mini-cheetah_Klein4-grass_harmonic_analysis.gif" width="68%" />
47+
<img src="docs/media/images/umich_dataset/grass_kin_energy_decomposition_Klein4.svg" width="29%" />
48+
</p>
49+
50+
### In concrete
51+
[//]: # (recording_name=concrete_difficult_slippery)
52+
<p float="left">
53+
<img src="docs/media/animations/mini-cheetah_Klein4-concrete_difficult_slippery_harmonic_analysis.gif" width="68%" />
54+
<img src="docs/media/images/umich_dataset/concrete_difficult_slippery_kin_energy_decomposition_Klein4.svg" width="29%" />
55+
</p>
56+
57+
### In concrete while walking in circles
58+
[//]: # (recording_name=concrete_right_circle)
59+
<p float="left">
60+
<img src="docs/media/animations/mini-cheetah_Klein4-concrete_right_circle_harmonic_analysis.gif" width="68%" />
61+
<img src="docs/media/images/umich_dataset/concrete_right_circle_kin_energy_decomposition_Klein4.svg" width="29%" />
62+
</p>
63+
64+
### In terrain of middle sized pebbles
65+
[//]: # (recording_name=middle_pebble)
66+
<p float="left">
67+
<img src="docs/media/animations/mini-cheetah_Klein4-middle_pebble_harmonic_analysis.gif" width="68%" />
68+
<img src="docs/media/images/umich_dataset/middle_pebble_kin_energy_decomposition_Klein4.svg" width="29%" />
69+
</p>
70+
71+
For other gait types and terrains, refer to the project [website](https://danfoa.github.io/DynamicsHarmonicsAnalysis/)
72+
73+
## Dynamics Harmonics Analysis and Koopman Operator Modeling
74+
75+
Our work extends and adapts this decomposition of the robot's configuration space to the space of all observable functions of the system's state. This function space is used to model the system's dynamics in an infinite dimensional space, in which the dynamics are governed by linear integral operators, commonly denoted as Koopman operators. As dynamics in this function space are linear, the use of harmonics analysis leads to a decomposition of the system's dynamics into independent linear subsystems on each of the isotypic subspaces of the function space. Our work exploits this decomposition to improve data-driven approximations of the system's Koopman operator.
76+
77+
### Experiments Reproduction
78+
79+
We present two experiments comparing the performance between equivariant and non-equivariant Koopman models approximated using the [DAE](nn/DynamicsAutoEncoder.py) and [eDAE](nn/EquivDynamicsAutoencoder.py) architectures:
80+
81+
1. Synthetic symmetric dynamical systems with finite state symmetry groups
82+
83+
This experiment takes symmetry-constrained synthetic linear systems and tries to approximate the Koopman operator that linearly models the dynamics of these systems. A 3D dimensional example of such systems can be interactively visualized
84+
[here](data/linear_system/group=C3-dim=3/n_constraints=1/f_time_constant=2.9[s]-frames=200-horizon=17.7[s]/noise_level=1/test_trajectories.html). Specifically, these are stable linear systems with hyperplane constraints that enforce a particular symmetry group, in the case of the example the rotation group of order 3.
85+
86+
To train the DAE and eDAE architectures on a C3-equivariant linear system in `30` dimensions with a latent modeling space of dimension `90` you can use the following command:
87+
```shell
88+
python train_observables.py --multirun model=edae,dae system=linear_system system.group=C3 system.n_constraints=1 system.obs_state_ratio=3 system.state_dim=30
89+
```
90+
Note that, to generate the dataset for any specific symmetry group and state dimensionality, you can use the script [stable_linear_system.py](data/linear_system/stable_linear_system.py)
91+
92+
2. Modeling quadruped closed-loop dynamics
93+
94+
To train the DAE, DAEaug, and eDAE architectures to model the closed-loop dynamics of the Mini-cheetah quadruped robot, exploiting its K4xC2 symmetry group or its K4 and C2 subsgroups, you can use the following command:
95+
```shell
96+
python train_observables.py --multirun model=dae,dae-aug,edae system=mini_cheetah,mini_cheetah-k4,mini_cheetah-c2 system.terrain=uneven_easy
97+
```
98+
99+
_The [train_observables.py](./train_observables.py) script will run the entire training pipeline and generate a weights & biases summary report online. Note that, in the [launch](launch/) folder, you can find the shell files used to reproduce each of the experiments of the paper_
100+
3101
### Paper
4-
This repository holds the code for the paper [Dynamics Harmonic Analysis of Robotic Systems: Application in Data-Driven Koopman Modelling
5-
](https://arxiv.org/abs/2312.07457). If you find the paper or the repository useful, please cite us as:
102+
This repository holds the code for the paper [Dynamics Harmonic Analysis of Robotic Systems: Application in Data-Driven Koopman Modelling](https://arxiv.org/abs/2312.07457). If you find the paper or the repository useful, please cite us as:
6103
```
7104
@article{ordonez2023dynamics,
8105
title={Dynamics Harmonic Analysis of Robotic Systems: Application in Data-Driven Koopman Modelling},

0 commit comments

Comments
 (0)