This is the source code for my blog post on implementing a robot's dynamic equations of motion three ways:
- with manual differentiation,
- with automatic differentiation,
- with symbolic differentiation.
The Jupyter notebook containing the code can be run in the browser here.
Alternatively, you can download the repo and open the notebook yourself. It is tested with Python 3.7. The repo uses pipenv for dependency/virtualenv management. Run:
git clone https://github.com/adamheins/lagrangian-mechanics-3-ways
cd lagrangian-mechanics-3-ways
pipenv install
pipenv run jupyter notebook