Skip to main content

A pytorch library that implements differentiable and learnable robot models, which allows users to learn parameters of analytical robot models, and/or propagate gradients through analytical robot computations such as forward kinematics.

Project description

differentiable robot model

CircleCI Code style: black

Differentiable and learnable robot model. Our differentiable robot model implements computations such as forward kinematics and inverse dynamics, in a fully differentiable way. We also allow to specify
parameters (kinematics or dynamics parameters), which can then be identified from data (see examples folder).

Currently, our code should work with any kinematic trees. This package comes with wrappers specifically for:

  • TriFinger Edu
  • Kuka iiwa
  • Franka Panda
  • Allegro Hand
  • Fetch Arm
  • a 2-link toy robot

You can find the documentation here: Differentiable-Robot-Model Documentation

Installation

Requirements: python>= 3.7

clone this repo and install from source:

git clone git@github.com:facebookresearch/differentiable-robot-model.git
cd differentiable-robot-model
python setup.py develop

Examples

2 examples scripts show the learning of kinematics parameters

python examples/learn_kinematics_of_iiwa.py

and the learning of dynamics parameters

python examples/learn_dynamics_of_iiwa.py

L4DC paper and experiments

the notebook experiments/l4dc-sim-experiments shows a set of experiments that are similar to what we presented in our L4DC paper

@InProceedings{pmlr-v120-sutanto20a, 
    title = {Encoding Physical Constraints in Differentiable Newton-Euler Algorithm}, 
    author = {Sutanto, Giovanni and Wang, Austin and Lin, Yixin and Mukadam, Mustafa and Sukhatme, Gaurav and Rai, Akshara and Meier, Franziska}, 
    pages = {804--813}, 
    year = {2020},
    editor = {Alexandre M. Bayen and Ali Jadbabaie and George Pappas and Pablo A. Parrilo and Benjamin Recht and Claire Tomlin and Melanie Zeilinger}, 
    volume = {120}, 
    series = {Proceedings of Machine Learning Research}, 
    address = {The Cloud}, month = {10--11 Jun}, 
    publisher = {PMLR}, pdf = {http://proceedings.mlr.press/v120/sutanto20a/sutanto20a.pdf},
    url = {http://proceedings.mlr.press/v120/sutanto20a.html}, 
}

Testing

running pytest in the top-level folder will run our differentiable robot model tests, which compare computations against pybullet.

Code Contribution

We enforce linters for our code. The formatting test will not pass if your code does not conform.

To make this easy for yourself, you can either

  • Add the formattings to your IDE
  • Install the git pre-commit hooks by running
    pip install pre-commit
    pre-commit install
    

For Python code, use black.

To enforce this in VSCode, install black, set your Python formatter to black and set Format On Save to true.

To format manually, run: black .

License

differentiable-robot-model is released under the MIT license. See LICENSE for additional details about it. See also our Terms of Use and Privacy Policy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

differentiable-robot-model-0.2.2.tar.gz (24.3 MB view details)

Uploaded Source

Built Distribution

differentiable_robot_model-0.2.2-py3-none-any.whl (24.4 MB view details)

Uploaded Python 3

File details

Details for the file differentiable-robot-model-0.2.2.tar.gz.

File metadata

  • Download URL: differentiable-robot-model-0.2.2.tar.gz
  • Upload date:
  • Size: 24.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for differentiable-robot-model-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d4ecec74fd320277f1acedd2d37718a963b801c1f94892e93c878f83dd265f4a
MD5 9774da3f460c7b52e4e3bb264322d45e
BLAKE2b-256 dae70b237a2c57c2d31c64296afab7edd371ceb194a002361b305b5f33fc5bdd

See more details on using hashes here.

File details

Details for the file differentiable_robot_model-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: differentiable_robot_model-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 24.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for differentiable_robot_model-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42d16a2a0269083ec09cb21d181199ed8ccc7180ad2965083b8f29248b5b7a0d
MD5 f67885ac6854182cabc7330a74329402
BLAKE2b-256 6f639cc1b2575621cd89575096bbcda460aa6beb34dafe0dd1ddb95f499074d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page