Giter Site home page Giter Site logo

ami-iit / adam Goto Github PK

View Code? Open in Web Editor NEW
108.0 14.0 16.0 1.77 MB

adam implements a collection of algorithms for calculating rigid-body dynamics in Jax, CasADi, PyTorch, and Numpy.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
rigid-body-dynamics automatic-differentiation casadi python robotics jax numpy optimization urdf pytorch

adam's People

Contributors

actions-user avatar carlottasartore avatar danielepucci avatar giulero avatar s-dafarra avatar traversaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adam's Issues

Question: Differentiability w.r.t what exactly?

Dear ADAM developers,

I just stumbled across your package and it looks amazing! However, there's a question I couldn't find an answer to in your examples and the README: If I am not mistaken, a JAX/PyTorch-implementation of the algorithms you included in ADAM should allow to compute gradients not only with respect to the joint configuration (as far as I understand, that's what you do in your examples), but leverage autograd to do so w.r.t any model parameter (e.g. joint offsets (aka link length) or inertial parameters).

Is that something that is supported by ADAM and if so, would you be so kind to provide me a pointer on where to start with something like that?

Unify Jax and PyTorch backends

It would be nice to unify the backends as done for CasADi and NumPy.
I had to move some methods in the Jax computation class and reimplement them due to the immutable Jax types (no slice assign operator []). The PyTorch implementation has a similar issue, since I had to cast some vectors in torch,tensor.
Probably subclassing Jax and PyTorch and create a more abstract class in which some methods are redefined (for example __setitem__ for handle the immutable types of jax, or a general vector type that casts array and list in torch.tensor)

Migrate away from urdf_parser_py?

urdf_parser_py is a bit of a problematic dependency:

  • On PyPI, a really old version of it is packaged (0.0.4, while the latest is 1.2.0) : https://pypi.org/project/urdf-parser-py/#files vs https://github.com/ros/urdf_parser_py/releases/tag/1.2.0
  • More in general, it is a package that is tipically packaged as a ROS package under the "urdfdom_py" name https://index.ros.org/r/urdfdom_py/, meaning that its mantainers do not care about its packaging on PyPI . Furtermore, being a ROS package in the conda world means that it is tipically package in the robostack channel, not on the conda-forge one. This complicates its packaging on conda-forge (see #26), as to package it on conda-forge we would need to first package urdf_parser_py, but this could create possible conflicts with the urdf_parser_py packaged in robostack .

At the moment, I was kind of deadlocked w.r.t. to this. Anyhow, yesterday @GiulioRomualdi suggested that we could migrate from urdf_parser_py to another library to load the the URDF. At beginning I was not entusiastic about the idea, but if that would be feasible it would be indeed great. In the following I would list a few alternatives:

Library Pro Cons Notes
Python bindings of iDynTree The ami-iit controls it. It is C++ library with Python bindings, it may be a bit difficult for pure python programmers to understand what's toing on.
yourdfpy Pure python I tought it was mantained, but even this library is not compatible with latest numpy and related PR are not merged: clemense/yourdfpy#46
urdfpy Pure python It has a lot of issue and it is not mantained, this is the library that was used in urdf_modifiers and we are in a similar situation: icub-tech-iit/urdf-modifiers#30 (comment) . TL;DR: Do not use

Initially I opened this issue noting that yourdfpy could be a well-mantained pure python library that it could make sense to use, but apparently it has mantainance problem as well, so I am deadlocked again. However, it is a bit too late as I already wrote the issue, so let's open the issue, perhaps it may be useful in the future.

Handle the case in which a parametric link is not a box, cylinder or sphere

When specifying a link as a parametric, only the box, sphere, and cylinder cases seem to be supported. In fact, looking at the code of compute_volume, if we are not in one of the three cases mentioned, the output volume is 0, while visual_data_new is not defined.

Similarly, the inertia computation is done only in these three cases.

It would be useful to trigger a meaningful error when the input link is not a box, cylinder or sphere, but defined by a mesh for example.

cc @CarlottaSartore

Create examples

It would be nice to have some examples of the use of the framework. They could be implemented in jupyter notebook or, even better, in google colab.
Cc @GiulioRomualdi

Joint order in URDF file

It seems that the parser of the URDF file is dependent on the order of joints definition.

In particular, the joints in the URDF file should appear in order such that the parent link was a child link for a joint before.

In case of bad joint order, the initialization fails since the library is not able to compute the rotation matrix

ADAM Christmas/Holiday Release?

Hello @Giulero @gabrielenava,
given that ADAM is getting quite a few users (great!) do you think it could make sense to do a tag/release (even just something like v0.0.1) to simplify scientific reproducibility? Note that even if you tag a release, as long as you document that the public interface can change, you can always change the public interface, so no need to worry like "let's wait for the software to be ready for doing a release". I mention this as tipically software, especially research software, is never ready.

Noisy warning when loading icub model

I guess this is a problem either of icub-models or urdf_parser_py, but I want to report it as it is quite annoying and may be confusing for newcomers. Once I load the icub model from icub-models in ADAM, I get a lot of warnings:

        import adam
        from adam.jax import KinDynComputations
        import icub_models
        import numpy as np
        import scipy
        
        model_path = icub_models.get_model_file("iCubGazeboV2_5")
        # The joint list
        joints_name_list = ['torso_pitch']
        # Specify the root link
        root_link = 'root_link'
        kinDyn = KinDynComputations(model_path, joints_name_list, root_link)

I get:

Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']
Unknown tag "sensor" in /robot[@name='iCub']

env:

# packages in environment at /home/traversaro/miniforge3/envs/jax2casadi:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
adam-robotics             0.0.8              pyhf3ec037_0    conda-forge
ampl-mp                   3.1.0             h2cc385e_1006    conda-forge
anyio                     4.1.0              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py312h98912ed_4    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
babel                     2.13.1             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py312h30efb56_1    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.23.0               hd590300_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
casadi                    3.6.3           py312h8182270_3    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312hf06ca03_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
cuda-version              11.8                 h70ddcb2_2    conda-forge
cudatoolkit               11.8.0              h4ba93d1_12    conda-forge
cudnn                     8.8.0.121            hcdd5f01_4    conda-forge
debugpy                   1.8.0           py312h30efb56_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
eigen                     3.4.0                h00ab1b0_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
icub-models               2.4.1           py312h30efb56_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.0              pyha770c72_0    conda-forge
importlib_metadata        7.0.0                hd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
ipopt                     3.14.13              he6d3896_0    conda-forge
ipykernel                 6.26.0             pyhf8b6a83_0    conda-forge
ipython                   8.18.1             pyh31011fe_2    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jax                       0.4.19             pyhd8ed1ab_0    conda-forge
jaxlib                    0.4.19          cpu_py312hb17a006_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
json5                     0.9.14             pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py312h7900ff3_3    conda-forge
jsonschema                4.20.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.11.2          pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.20.0             pyhd8ed1ab_0    conda-forge
jupyter-lsp               2.2.1              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.5.0           py312h7900ff3_0    conda-forge
jupyter_events            0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.11.2             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.4              pyhd8ed1ab_1    conda-forge
jupyterlab                4.0.9              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.25.2             pyhd8ed1ab_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libabseil                 20230802.1      cxx17_h59595ed_0    conda-forge
libblas                   3.9.0           20_linux64_openblas    conda-forge
libcblas                  3.9.0           20_linux64_openblas    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libgrpc                   1.58.2               he06187c_0    conda-forge
libhwloc                  2.9.1           nocuda_h7313eea_6    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
liblapack                 3.9.0           20_linux64_openblas    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.25          pthreads_h413a1c8_0    conda-forge
libosqp                   0.6.3                h59595ed_0    conda-forge
libprotobuf               4.24.3               hf27288f_1    conda-forge
libqdldl                  0.1.5                h27087fc_1    conda-forge
libre2-11                 2023.06.02           h7a70373_0    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libspral                  2023.08.02           h2baf039_0    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxml2                   2.11.6               h232c23b_0    conda-forge
libxslt                   1.1.37               h0054252_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lxml                      4.9.3           py312he528aba_1    conda-forge
markupsafe                2.1.3           py312h98912ed_1    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
metis                     5.1.0             h59595ed_1007    conda-forge
mistune                   3.0.2              pyhd8ed1ab_0    conda-forge
ml_dtypes                 0.3.1           py312hfb8ada1_2    conda-forge
mumps-include             5.2.1               ha770c72_13    conda-forge
mumps-seq                 5.2.1               h2104b81_11    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.12.0             pyhd8ed1ab_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
nccl                      2.19.4.1             h6103f9b_0    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
nest-asyncio              1.5.8              pyhd8ed1ab_0    conda-forge
notebook                  7.0.6              pyhd8ed1ab_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
numpy                     1.26.2          py312heda63a1_0    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
opt-einsum                3.3.0                hd8ed1ab_2    conda-forge
opt_einsum                3.3.0              pyhc1e730c_2    conda-forge
overrides                 7.4.0              pyhd8ed1ab_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
prettytable               3.9.0              pyhd8ed1ab_0    conda-forge
prometheus_client         0.19.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.41             pyha770c72_0    conda-forge
proxsuite                 0.5.1           py312h8572e83_1    conda-forge
psutil                    5.9.5           py312h98912ed_1    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.12.0          hab00c5b_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.19.0             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py312h98912ed_1    conda-forge
pyzmq                     25.1.1          py312h886d080_2    conda-forge
re2                       2023.06.02           h2873b5e_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.31.1             pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.13.2          py312h4b3b743_0    conda-forge
scipy                     1.11.4          py312heda63a1_0    conda-forge
scotch                    6.0.9                hb2e6521_2    conda-forge
send2trash                1.8.2              pyh41d4057_0    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
simde                     0.7.6                h00ab1b0_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
terminado                 0.18.0             pyh0d859eb_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tinyxml2                  9.0.0                h9c3ff4c_2    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py312h98912ed_1    conda-forge
traitlets                 5.14.0             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.8.19.14          pyhd8ed1ab_0    conda-forge
typing-extensions         4.8.0                hd8ed1ab_0    conda-forge
typing_extensions         4.8.0              pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
unixodbc                  2.3.12               h661eb56_0    conda-forge
urdfdom-py                1.2.1           py312h7900ff3_3    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.12             pyhd8ed1ab_0    conda-forge
webcolors                 1.13               pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.7.0              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.5                h59595ed_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge

Rename this repo to adam-robotics?

As the package is installed as adam-robotics in PyPI and conda-forge, perhaps for discoverability and clarity it is better to rename this repo to adam-robotics as well?

@Giulero

Test results are non-deterministic

For example, see this output of two tests runs on the same commit:

The reason for this is that we call np.random, but we do not set the seed, so the test results are different at every run (see https://adamj.eu/tech/2018/01/08/pytest-randomly-history/ and https://towardsdatascience.com/random-seeds-and-reproducibility-933da79446e3). The long term plan may be to implement some kind of way of controlling randomness (for example via https://github.com/pytest-dev/pytest-randomly), but in the short term perhaps the easy fix is to increase the test threshold.

Package in conda-forge

For packaging in projects that install all their deps via conda-forge without resorting to PyPI, I would like to package this via conda-forge . This should be trivial to do, generating the recipe via grayskull ( https://github.com/conda-incubator/grayskull ). Unfortunatly the tricky aspect is that there is no urdf-parser-py package on conda-forge, so we should first package that dep in conda-forge.

Failed to load stickBot model in the parametric KinDynComputations.

If I try to load the model https://github.com/icub-tech-iit/ergocub-gazebo-simulations/blob/1179630a88541479df51ebb108a21865ea251302/models/stickBot/model.urdf
in KinDynComputationsParametric I have the following issue:

Traceback (most recent call last):
  File "C:\Software\hippopt\src\hippopt\turnkey_planners\humanoid_kinodynamic\main_periodic_step_parametric.py", line 377, in <module>
    planner = walking_planner.Planner(settings=planner_settings)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Software\hippopt\src\hippopt\turnkey_planners\humanoid_kinodynamic\planner.py", line 27, in __init__
    self.kin_dyn_object = adam.parametric.casadi.KinDynComputationsParametric(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Software\adam\src\adam\parametric\casadi\computations_parametric.py", line 40, in __init__
    factory = URDFParametricModelFactory(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Software\adam\src\adam\parametric\model\parametric_factories\parametric_model.py", line 32, in __init__
    self.urdf_desc = urdf_parser_py.urdf.URDF.from_xml_file(path)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Software\mambaforge\envs\hippopt\Lib\site-packages\urdf_parser_py\xml_reflection\core.py", line 617, in from_xml_file
    return cls.from_xml_string(xml_string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Software\mambaforge\envs\hippopt\Lib\site-packages\urdf_parser_py\xml_reflection\core.py", line 610, in from_xml_string
    node = etree.fromstring(xml_string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/lxml/etree.pyx", line 3264, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1984, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.

The normal KinDynComputations instead works fine.

cc @CarlottaSartore

Numpy error when install ADAM via pip on 20.04 with python3-numpy apt package installed

I am installing ADAM via the installation process, and the following error is printed:

ERROR: jaxlib 0.1.73 has requirement numpy>=1.18, but you'll have numpy 1.17.4 which is incompatible.
ERROR: jax 0.2.25 has requirement numpy>=1.18, but you'll have numpy 1.17.4 which is incompatible.

It seems that pip finds the numpy installed via apt and so does not installs it in the virtualenv, but then it complains that the version is not correct.

Warning when installing the project with pip

I just noticed that installing the project with a modern pip version produces the following warning:

  WARNING: Generating metadata for package adam produced metadata for project name adam-robotics. Fix your #egg=adam fragments.
Discarding git+https://github.com/ami-iit/[email protected]: Requested adam-robotics from git+https://github.com/ami-iit/[email protected] (from -r pip_requirements.txt (line 58)) has
 inconsistent name: expected 'adam', but metadata has 'adam-robotics'

In my case, I was installing the project as part of a longer list specified in a pip_requirements.txt file.

Jax installation for GPU

The Jax pip installation only comes with the CPU version of Jax. Is this intended?
pip install adam-robotics[jax]

Add $\dot{J}$ function

We might need the implementation of the derivative of the Jacobian function $\dot{J}$, or at least the term $\dot{J}\nu$, i.e. the acceleration of a frame when the acceleration of the configuration of the robot $\dot{\nu}$ is zero.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.