Kunal Menda, Jayesh K. Gupta, Zachary Manchester, Mykel J. Kochenderfer
Model-based paradigms for decision-making and control are becoming ubiquitous in robotics. They rely on the ability to efficiently learn a model of the system from data. Structured Mechanical Models (SMMs) are a data-efficient black-box parameterization of mechanical systems, typically fit to data by minimizing the error between predicted and observed accelerations or next states. In this work, we propose a methodology for fitting SMMs to data by minimizing the discrete Euler-Lagrange residual. To study our methodology, we fit models to joint-angle time-series from undamped and damped double-pendulums, studying the quality of learned models fit to data with and without observation noise. Experiments show that our methodology learns models that are better in accuracy to those of the conventional schemes for fitting SMMs. We identify use cases in which our method is a more appropriate methodology.
Clone delsmm
and pip install the module.
cd delsmm
pip install -e '.[test]'
delsmm
: contains the source code, including theStructuredMechanicalModel
class, training criteria, and regularization criterion.examples
: contains a Jupyter notebook containing a minimal example of how to smooth data and fit an SMM to it by minimizing the discrete Euler-Lagrange residual.experiments
: contains scripts to run the experiments in the paper and plot the results.datagen
: contains scripts to generate example data
Remember to first generate the data:
python datagen/generate_doublepen_data.py
python datagen/generate_damped_doublepen_data.py
Also generate the smoothened data:
python datagen/create_smoothed_data_doublepen.py
Now you can run the experiments with default noise settings:
python experiments/run_experiment.py
- PyTorch
- CEEM
- Numpy
- Scipy
- PyKalman (for smoothing)
- Matplotlib (for visualization)