Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize the functional APIs and replace the OOP classes #108

Merged
merged 172 commits into from
Mar 29, 2024
Merged

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Mar 12, 2024

This is a container PR merging the new structure of upcoming JaxSim release.

Extends the initial draft of the functional APIs introduced in #88 and #99 with the following PRs:

Note that tests running on CPU work fine, as in CI. For some reason, on my NVIDIA GeForce GTX 1650 Ti, testing the AD of a simulation step on a reduced ErgoCub model fails with the following error:

2024-03-28 15:40:01.469587: W external/xla/xla/service/gpu/runtime/support.cc:58] Intercepted XLA runtime error:
RESOURCE_EXHAUSTED: Failed to get module function:CUDA_ERROR_OUT_OF_MEMORY: out of memory
2024-03-28 15:40:01.469631: E external/xla/xla/pjrt/pjrt_stream_executor_client.cc:2732] Execution of replica 0 failed: INTERNAL: Failed to instantiate GPU graphs: CaptureGpuGraph failed (Failed to get module function:CUDA_ERROR_OUT_OF_MEMORY: out of memory; current tracing scope: fusion.173): INTERNAL: failed to capture gpu graph: run time error: custom call 'xla.gpu.func.launch' failed

The test suite on GPU can be executed as follows:

pytest -k "not test_ad_integration[ergocub_reduced]"

📚 Documentation preview 📚: https://jaxsim--108.org.readthedocs.build//108/

The low-level RBDA need the inputs to be in inertial-fixed representation. We use JaxSimModelReferences to automatically convert them.
@diegoferigo diegoferigo marked this pull request as ready for review March 28, 2024 16:09
@flferretti
Copy link
Collaborator

@diegoferigo which CUDA version is used to build jaxlib in your case?

@diegoferigo
Copy link
Member Author

diegoferigo commented Mar 28, 2024

Today I built a new Docker image with a fresh environment. You can find details below.

env.yml
name: base
channels:
  - robotology
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - _sysroot_linux-64_curr_repodata_hack=3=h69a702a_14
  - absl-py=2.1.0=pyhd8ed1ab_0
  - ace=7.1.3=h59595ed_2
  - alsa-lib=1.2.11=hd590300_1
  - ampl-mp=3.1.0=h2cc385e_1006
  - anyio=4.3.0=pyhd8ed1ab_0
  - aom=3.8.2=h59595ed_0
  - archspec=0.2.3=pyhd8ed1ab_0
  - argon2-cffi=23.1.0=pyhd8ed1ab_0
  - argon2-cffi-bindings=21.2.0=py311h459d7ec_4
  - arrow=1.3.0=pyhd8ed1ab_0
  - assimp=5.3.1=h8343317_3
  - asttokens=2.4.1=pyhd8ed1ab_0
  - async-lru=2.0.4=pyhd8ed1ab_0
  - attr=2.5.1=h166bdaf_1
  - attrs=23.2.0=pyh71513ae_0
  - aws-c-auth=0.7.16=haed3651_8
  - aws-c-cal=0.6.10=ha9bf9b1_2
  - aws-c-common=0.9.14=hd590300_0
  - aws-c-compression=0.2.18=h4466546_2
  - aws-c-event-stream=0.4.2=he635cd5_6
  - aws-c-http=0.8.1=hbfc29b2_7
  - aws-c-io=0.14.6=h96cd748_2
  - aws-c-mqtt=0.10.3=hffff1cc_2
  - aws-c-s3=0.5.4=h4893938_0
  - aws-c-sdkutils=0.1.15=h4466546_2
  - aws-checksums=0.1.18=h4466546_2
  - aws-crt-cpp=0.26.4=hba3594f_2
  - aws-sdk-cpp=1.11.267=hb1af6a8_4
  - azure-core-cpp=1.11.1=h91d86a7_1
  - azure-storage-blobs-cpp=12.10.0=h00ab1b0_1
  - azure-storage-common-cpp=12.5.0=h94269e2_4
  - babel=2.14.0=pyhd8ed1ab_0
  - beautifulsoup4=4.12.3=pyha770c72_0
  - binutils_impl_linux-64=2.40=hf600244_0
  - binutils_linux-64=2.40=hdade7a5_3
  - black=24.3.0=py311h38be061_0
  - bleach=6.1.0=pyhd8ed1ab_0
  - blosc=1.21.5=h0f2a231_0
  - boltons=23.1.1=pyhd8ed1ab_0
  - brotli=1.1.0=hd590300_1
  - brotli-bin=1.1.0=hd590300_1
  - brotli-python=1.1.0=py311hb755f60_1
  - build=0.7.0=pyhd8ed1ab_0
  - bullet-cpp=3.25=h320fe9a_2
  - bzip2=1.0.8=hd590300_5
  - c-ares=1.27.0=hd590300_0
  - ca-certificates=2024.2.2=hbcca054_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - cairo=1.18.0=h3faef2a_0
  - certifi=2024.2.2=pyhd8ed1ab_0
  - cffi=1.16.0=py311hb3a22ac_0
  - cfgv=3.3.1=pyhd8ed1ab_0
  - cfitsio=4.4.0=hbdc6101_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - chex=0.1.86=pyhd8ed1ab_0
  - cli11=2.4.1=h59595ed_0
  - click=8.1.7=unix_pyh707e725_0
  - cloudpickle=3.0.0=pyhd8ed1ab_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - coloredlogs=15.0.1=pyhd8ed1ab_3
  - comm=0.2.2=pyhd8ed1ab_0
  - conda=24.3.0=py311h38be061_0
  - conda-libmamba-solver=24.1.0=pyhd8ed1ab_0
  - conda-package-handling=2.2.0=pyh38be061_0
  - conda-package-streaming=0.9.0=pyhd8ed1ab_0
  - console_bridge=1.0.2=h924138e_1
  - contourpy=1.2.0=py311h9547e67_0
  - cppzmq=4.10.0=h2e2a08d_1
  - cuda-cccl_linux-64=12.4.99=ha770c72_0
  - cuda-crt-dev_linux-64=12.4.99=ha770c72_1
  - cuda-crt-tools=12.4.99=ha770c72_1
  - cuda-cudart=12.4.99=hd3aeb46_0
  - cuda-cudart-dev=12.4.99=hd3aeb46_0
  - cuda-cudart-dev_linux-64=12.4.99=h59595ed_0
  - cuda-cudart-static=12.4.99=hd3aeb46_0
  - cuda-cudart-static_linux-64=12.4.99=h59595ed_0
  - cuda-cudart_linux-64=12.4.99=h59595ed_0
  - cuda-cupti=12.4.99=h59595ed_1
  - cuda-driver-dev_linux-64=12.4.99=h59595ed_0
  - cuda-nvcc=12.4.99=hcdd1206_0
  - cuda-nvcc-dev_linux-64=12.4.99=ha770c72_1
  - cuda-nvcc-impl=12.4.99=hd3aeb46_1
  - cuda-nvcc-tools=12.4.99=hd3aeb46_1
  - cuda-nvcc_linux-64=12.4.99=h8a487aa_0
  - cuda-nvrtc=12.4.99=hd3aeb46_0
  - cuda-nvtx=12.4.99=h59595ed_0
  - cuda-nvvm-dev_linux-64=12.4.99=ha770c72_1
  - cuda-nvvm-impl=12.4.99=h59595ed_1
  - cuda-nvvm-tools=12.4.99=h59595ed_1
  - cuda-version=12.4=h3060b56_3
  - cudnn=8.9.7.29=h092f7fd_3
  - cycler=0.12.1=pyhd8ed1ab_0
  - dartsim=6.13.2=hdbb2bd4_1
  - dav1d=1.2.1=hd590300_0
  - dbus=1.13.6=h5008d03_3
  - debugpy=1.8.1=py311hb755f60_0
  - decorator=5.1.1=pyhd8ed1ab_0
  - defusedxml=0.7.1=pyhd8ed1ab_0
  - diffrax=0.5.0=pyhd8ed1ab_0
  - distlib=0.3.8=pyhd8ed1ab_0
  - distro=1.9.0=pyhd8ed1ab_0
  - docstring_parser=0.16=pyhd8ed1ab_0
  - double-conversion=3.3.0=h59595ed_0
  - eigen=3.4.0=h00ab1b0_0
  - elfutils=0.191=h924a536_0
  - entrypoints=0.4=pyhd8ed1ab_0
  - equinox=0.11.3=pyhd8ed1ab_0
  - ergocub-software=0.7.1=h59595ed_120
  - etils=1.8.0=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - executing=2.0.1=pyhd8ed1ab_0
  - expat=2.6.2=h59595ed_0
  - farama-notifications=0.0.4=pyhd8ed1ab_0
  - fcl=0.7.0=hadc09e8_4
  - ffmpeg=6.1.1=gpl_h38e077a_106
  - filelock=3.13.3=pyhd8ed1ab_0
  - flann=1.9.2=h2b5ea80_0
  - flax=0.8.2=pyhd8ed1ab_0
  - fmt=10.2.1=h00ab1b0_0
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_1
  - fontconfig=2.14.2=h14ed4e7_0
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - fonttools=4.50.0=py311h459d7ec_0
  - fqdn=1.5.1=pyhd8ed1ab_0
  - freeglut=3.2.2=hac7e632_2
  - freeimage=3.18.0=h4b96d29_20
  - freetype=2.12.1=h267a509_2
  - freexl=2.0.0=h743c826_0
  - fribidi=1.0.10=h36c2ea0_0
  - frozendict=2.4.0=py311h459d7ec_0
  - fsspec=2024.3.1=pyhca7485f_0
  - gcc_impl_linux-64=12.3.0=he2b93b0_5
  - gcc_linux-64=12.3.0=h6477408_3
  - gdbm=1.18=h0a1914f_2
  - geos=3.12.1=h59595ed_0
  - geotiff=1.7.1=h6cf1f90_16
  - gettext=0.21.1=h27087fc_0
  - giflib=5.2.1=h0b41bf4_3
  - gitdb=4.0.11=pyhd8ed1ab_0
  - gitpython=3.1.42=pyhd8ed1ab_0
  - glfw=3.4=hd590300_0
  - glib=2.80.0=hf2295e7_1
  - glib-tools=2.80.0=hde27a5a_1
  - gmp=6.3.0=h59595ed_1
  - gnutls=3.7.9=hb077bed_0
  - graphite2=1.3.13=h59595ed_1002
  - grpcio=1.62.1=py311ha6695c7_0
  - gst-plugins-base=1.22.9=hfa15dee_1
  - gstreamer=1.22.9=h98fc4e7_1
  - gts=0.7.6=h977cf35_4
  - gxx_impl_linux-64=12.3.0=he2b93b0_5
  - gxx_linux-64=12.3.0=h4a1b8e8_3
  - gymnasium=0.28.1=py311h781c19f_0
  - gz-math7-python=7.3.0=py311h6ccdd8d_1
  - gz-sim7=7.6.0=ha770c72_7
  - gz-sim7-python=7.6.0=py311h5ce92f4_7
  - h11=0.14.0=pyhd8ed1ab_0
  - h2=4.1.0=pyhd8ed1ab_0
  - harfbuzz=8.3.0=h3d44ed6_0
  - hdf4=4.2.15=h2a13503_7
  - hdf5=1.14.3=nompi_h4f84152_100
  - hpack=4.0.0=pyh9f0ad1d_0
  - httpcore=1.0.5=pyhd8ed1ab_0
  - httpx=0.27.0=pyhd8ed1ab_0
  - humanfriendly=10.0=pyhd8ed1ab_6
  - hyperframe=6.0.1=pyhd8ed1ab_0
  - icdiff=2.0.7=pyhd8ed1ab_0
  - icu=73.2=h59595ed_0
  - identify=2.5.35=pyhd8ed1ab_0
  - idna=3.6=pyhd8ed1ab_0
  - idyntree=12.0.0=py311hda412ca_0
  - imath=3.1.11=hfc55251_0
  - importlib-metadata=7.1.0=pyha770c72_0
  - importlib_metadata=7.1.0=hd8ed1ab_0
  - importlib_resources=6.4.0=pyhd8ed1ab_0
  - iniconfig=2.0.0=pyhd8ed1ab_0
  - ipopt=3.14.14=h04b96a2_1
  - ipykernel=6.29.3=pyhd33586a_0
  - ipython=8.22.2=pyh707e725_0
  - ipywidgets=8.1.2=pyhd8ed1ab_0
  - irrlicht=1.8.5=h2a6caf8_4
  - isoduration=20.11.0=pyhd8ed1ab_0
  - isort=5.13.2=pyhd8ed1ab_0
  - jasper=4.2.2=he6dfbbe_0
  - jax=0.4.25=pyhd8ed1ab_0
  - jax-dataclasses=1.6.0=pyhd8ed1ab_0
  - jax-jumpy=1.0.0=pyhd8ed1ab_0
  - jaxlib=0.4.23=cuda120py311hfb00743_200
  - jaxlie=1.3.4=pyhd8ed1ab_0
  - jaxtyping=0.2.28=pyhd8ed1ab_0
  - jedi=0.19.1=pyhd8ed1ab_0
  - jinja2=3.1.3=pyhd8ed1ab_0
  - json-c=0.17=h7ab15ed_0
  - json5=0.9.24=pyhd8ed1ab_0
  - jsoncpp=1.9.5=h4bd325d_1
  - jsonpatch=1.33=pyhd8ed1ab_0
  - jsonpointer=2.4=py311h38be061_3
  - jsonschema=4.21.1=pyhd8ed1ab_0
  - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
  - jsonschema-with-format-nongpl=4.21.1=pyhd8ed1ab_0
  - jupyter=1.0.0=pyhd8ed1ab_10
  - jupyter-lsp=2.2.4=pyhd8ed1ab_0
  - jupyter_client=8.6.1=pyhd8ed1ab_0
  - jupyter_console=6.6.3=pyhd8ed1ab_0
  - jupyter_core=5.7.2=py311h38be061_0
  - jupyter_events=0.10.0=pyhd8ed1ab_0
  - jupyter_server=2.13.0=pyhd8ed1ab_0
  - jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
  - jupyterlab=4.1.5=pyhd8ed1ab_0
  - jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
  - jupyterlab_server=2.25.4=pyhd8ed1ab_0
  - jupyterlab_widgets=3.0.10=pyhd8ed1ab_0
  - jxrlib=1.1=hd590300_3
  - kealib=1.5.3=h2f55d51_0
  - kernel-headers_linux-64=3.10.0=h4a8ded7_14
  - keyutils=1.6.1=h166bdaf_0
  - kiwisolver=1.4.5=py311h9547e67_1
  - krb5=1.21.2=h659d440_0
  - lame=3.100=h166bdaf_1003
  - lcms2=2.16=hb7c19ff_0
  - ld_impl_linux-64=2.40=h41732ed_0
  - lerc=4.0.0=h27087fc_0
  - libabseil=20240116.1=cxx17_h59595ed_2
  - libaec=1.1.3=h59595ed_0
  - libarchive=3.7.2=h2aa1ff5_1
  - libass=0.17.1=h8fe9dca_1
  - libavif16=1.0.4=h1dcd450_1
  - libblas=3.9.0=21_linux64_openblas
  - libboost=1.84.0=h8013b2b_2
  - libboost-headers=1.84.0=ha770c72_2
  - libbrotlicommon=1.1.0=hd590300_1
  - libbrotlidec=1.1.0=hd590300_1
  - libbrotlienc=1.1.0=hd590300_1
  - libcap=2.69=h0f662aa_0
  - libcblas=3.9.0=21_linux64_openblas
  - libccd-double=2.1=h59595ed_3
  - libclang-cpp15=15.0.7=default_h127d8a8_5
  - libclang-cpp18.1=18.1.2=default_h127d8a8_1
  - libclang13=18.1.2=default_h5d6823c_1
  - libcrc32c=1.1.2=h9c3ff4c_0
  - libcublas=12.4.2.65=hd3aeb46_0
  - libcufft=11.2.0.44=hd3aeb46_0
  - libcups=2.3.3=h4637d8d_4
  - libcurand=10.3.5.119=hd3aeb46_0
  - libcurl=8.7.1=hca28451_0
  - libcusolver=11.6.0.99=hd3aeb46_0
  - libcusparse=12.3.0.142=hd3aeb46_0
  - libdeflate=1.20=hd590300_0
  - libdrm=2.4.120=hd590300_0
  - libdrm-cos7-x86_64=2.4.97=h9b0a68f_1105
  - libedit=3.1.20191231=he28a2e2_2
  - libev=4.33=hd590300_2
  - libevent=2.1.12=hf998b51_1
  - libexpat=2.6.2=h59595ed_0
  - libffi=3.4.2=h7f98852_5
  - libflac=1.4.3=h59595ed_0
  - libgcc-devel_linux-64=12.3.0=h8bca6fd_105
  - libgcc-ng=13.2.0=h807b86a_5
  - libgcrypt=1.10.3=hd590300_0
  - libgdal=3.8.4=h35436ae_6
  - libgfortran-ng=13.2.0=h69a702a_5
  - libgfortran5=13.2.0=ha4646dd_5
  - libglib=2.80.0=hf2295e7_1
  - libglu=9.0.0=hac7e632_1003
  - libglvnd-cos7-x86_64=1.0.1=h9b0a68f_1105
  - libglvnd-glx-cos7-x86_64=1.0.1=h9b0a68f_1105
  - libgomp=13.2.0=h807b86a_5
  - libgoogle-cloud=2.22.0=h9be4e54_1
  - libgoogle-cloud-storage=2.22.0=hc7a4891_1
  - libgpg-error=1.48=h71f35ed_0
  - libgrpc=1.62.1=h15f2491_0
  - libgz-cmake3=3.5.0=h59595ed_0
  - libgz-common5=5.5.1=h23e380d_0
  - libgz-fuel-tools8=8.1.0=h9614a5f_8
  - libgz-gui7=7.2.1=hee5a715_7
  - libgz-math7=7.3.0=h59595ed_1
  - libgz-msgs9=9.5.0=h0b49e6c_8
  - libgz-physics6=6.5.1=h4c94181_2
  - libgz-plugin2=2.0.2=h59595ed_0
  - libgz-rendering7=7.4.2=h59595ed_0
  - libgz-sensors7=7.3.0=hf437a2f_6
  - libgz-sim7=7.6.0=hee5a715_7
  - libgz-tools2=2.0.0=h1caa08d_4
  - libgz-transport12=12.2.1=h2c68f9b_8
  - libgz-utils2=2.1.0=h59595ed_0
  - libhwloc=2.9.3=default_h554bfaf_1009
  - libi2c=4.3=hcb278e6_2
  - libiconv=1.17=hd590300_2
  - libidn2=2.3.7=hd590300_0
  - libjpeg-turbo=3.0.0=hd590300_1
  - libkml=1.3.0=h01aab08_1018
  - liblapack=3.9.0=21_linux64_openblas
  - liblapacke=3.9.0=21_linux64_openblas
  - libllvm15=15.0.7=hb3ce162_4
  - libllvm18=18.1.2=h2448989_0
  - libmamba=1.5.8=had39da4_0
  - libmambapy=1.5.8=py311hf2555c7_0
  - libmicrohttpd=1.0.1=h97afed2_0
  - libmujoco=3.1.3=hfbbffa6_1
  - libnetcdf=4.9.2=nompi_h9612171_113
  - libnghttp2=1.58.0=h47da74e_1
  - libnsl=2.0.1=hd590300_0
  - libnvjitlink=12.4.99=hd3aeb46_0
  - libode=0.16.2=hb755f60_14
  - libogg=1.3.4=h7f98852_1
  - libopenblas=0.3.26=pthreads_h413a1c8_0
  - libopencv=4.9.0=qt6_py39h8add8c0_612
  - libopenvino=2024.0.0=h2e90f83_4
  - libopenvino-auto-batch-plugin=2024.0.0=hd5fc58b_4
  - libopenvino-auto-plugin=2024.0.0=hd5fc58b_4
  - libopenvino-hetero-plugin=2024.0.0=h3ecfda7_4
  - libopenvino-intel-cpu-plugin=2024.0.0=h2e90f83_4
  - libopenvino-intel-gpu-plugin=2024.0.0=h2e90f83_4
  - libopenvino-ir-frontend=2024.0.0=h3ecfda7_4
  - libopenvino-onnx-frontend=2024.0.0=h757c851_4
  - libopenvino-paddle-frontend=2024.0.0=h757c851_4
  - libopenvino-pytorch-frontend=2024.0.0=h59595ed_4
  - libopenvino-tensorflow-frontend=2024.0.0=hca94c1a_4
  - libopenvino-tensorflow-lite-frontend=2024.0.0=h59595ed_4
  - libopus=1.3.1=h7f98852_1
  - libosqp=0.6.3=h59595ed_0
  - libpciaccess=0.18=hd590300_0
  - libpng=1.6.43=h2797004_0
  - libpq=16.2=h33b98f1_1
  - libprotobuf=4.25.3=h08a7969_0
  - libqdldl=0.1.5=h27087fc_1
  - libraw=0.21.1=h2a13503_2
  - libre2-11=2023.09.01=h5a48ba9_2
  - librttopo=1.1.0=h8917695_15
  - libsanitizer=12.3.0=h0f45ef3_5
  - libscotch=7.0.4=h91e35bf_1
  - libsdformat13=13.6.0=hfa4c96a_4
  - libsndfile=1.2.2=hc60ed4a_1
  - libsodium=1.0.18=h36c2ea0_1
  - libsolv=0.7.28=hfc55251_2
  - libspatialite=5.1.0=h6f065fc_5
  - libspral=2023.09.07=h6aa6db2_2
  - libsqlite=3.45.2=h2797004_0
  - libssh2=1.11.0=h0841786_0
  - libstdcxx-devel_linux-64=12.3.0=h8bca6fd_105
  - libstdcxx-ng=13.2.0=h7e041cc_5
  - libsystemd0=255=h3516f8a_1
  - libtasn1=4.19.0=h166bdaf_0
  - libtiff=4.6.0=h1dd3fc0_3
  - libunistring=0.9.10=h7f98852_0
  - libuuid=2.38.1=h0b41bf4_0
  - libva=2.21.0=hd590300_0
  - libvorbis=1.3.7=h9c3ff4c_0
  - libvpx=1.14.0=h59595ed_0
  - libwebp=1.3.2=h658648e_1
  - libwebp-base=1.3.2=hd590300_0
  - libxcb=1.15=h0b41bf4_0
  - libxcrypt=4.4.36=hd590300_1
  - libxkbcommon=1.7.0=h662e7e4_0
  - libxml2=2.12.6=h232c23b_1
  - libxslt=1.1.39=h76b75d6_0
  - libyarp=3.9.0=ha614a09_2
  - libzip=1.10.1=h2629f0a_3
  - libzlib=1.2.13=hd590300_5
  - lineax=0.0.4=pyhd8ed1ab_0
  - lodepng=20220109=h924138e_0
  - loop-rate-limiters=1.0.0=pyhd8ed1ab_0
  - lxml=5.1.0=py311h9691dec_0
  - lz4-c=1.9.4=hcb278e6_0
  - lzo=2.10=h516909a_1000
  - mamba=1.5.8=py311h3072747_0
  - markdown=3.6=pyhd8ed1ab_0
  - markdown-it-py=3.0.0=pyhd8ed1ab_0
  - markupsafe=2.1.5=py311h459d7ec_0
  - mashumaro=3.12=pyhd8ed1ab_0
  - matplotlib=3.8.3=py311h38be061_0
  - matplotlib-base=3.8.3=py311h54ef318_0
  - matplotlib-inline=0.1.6=pyhd8ed1ab_0
  - mdurl=0.1.2=pyhd8ed1ab_0
  - mediapy=1.2.0=pyhd8ed1ab_0
  - menuinst=2.0.2=py311h38be061_0
  - mesa-libgl-cos7-x86_64=18.3.4=h9b0a68f_1105
  - mesa-libglapi-cos7-x86_64=18.3.4=h9b0a68f_1105
  - meshcat-python=0.3.2=pyhd8ed1ab_0
  - metis=5.1.0=h59595ed_1007
  - minizip=4.0.5=h0ab5242_0
  - mistune=3.0.2=pyhd8ed1ab_0
  - ml_dtypes=0.3.2=py311h320fe9a_0
  - mpg123=1.32.4=h59595ed_0
  - msgpack-python=1.0.7=py311h9547e67_0
  - mujoco=3.1.3=ha770c72_1
  - mujoco-python=3.1.3=py311h686516e_1
  - mujoco-samples=3.1.3=h59595ed_1
  - mujoco-simulate=3.1.3=h59595ed_1
  - mumps-include=5.6.2=ha770c72_4
  - mumps-seq=5.6.2=hfef103a_4
  - munkres=1.1.4=pyh9f0ad1d_0
  - mypy_extensions=1.0.0=pyha770c72_0
  - mysql-common=8.3.0=hf1915f5_4
  - mysql-libs=8.3.0=hca2cd23_4
  - nbclient=0.10.0=pyhd8ed1ab_0
  - nbconvert=7.16.3=hd8ed1ab_0
  - nbconvert-core=7.16.3=pyhd8ed1ab_0
  - nbconvert-pandoc=7.16.3=hd8ed1ab_0
  - nbformat=5.10.3=pyhd8ed1ab_0
  - nccl=2.20.5.1=h3a97aeb_0
  - ncurses=6.4.20240210=h59595ed_0
  - nest-asyncio=1.6.0=pyhd8ed1ab_0
  - nettle=3.9.1=h7ab15ed_0
  - nodeenv=1.8.0=pyhd8ed1ab_0
  - notebook=7.1.2=pyhd8ed1ab_0
  - notebook-shim=0.2.4=pyhd8ed1ab_0
  - nspr=4.35=h27087fc_0
  - nss=3.98=h1d7d5a4_0
  - numpy=1.26.4=py311h64a7726_0
  - ocl-icd=2.3.2=hd590300_1
  - octomap=1.9.8=h924138e_0
  - ogre=1.10.12.1=hb5e08f3_0
  - ogre-next=2.3.1=h1b25c05_4
  - openexr=3.2.2=haf962dd_1
  - openh264=2.4.1=h59595ed_0
  - openjpeg=2.5.2=h488ebb8_0
  - openssl=3.2.1=hd590300_1
  - opt-einsum=3.3.0=hd8ed1ab_2
  - opt_einsum=3.3.0=pyhc1e730c_2
  - optax=0.2.2=pyhd8ed1ab_0
  - optimistix=0.0.6=pyhd8ed1ab_0
  - orbax-checkpoint=0.4.4=pyhd8ed1ab_0
  - osqp-eigen=0.8.1=hdd734ac_1
  - overrides=7.7.0=pyhd8ed1ab_0
  - p11-kit=0.24.1=hc5aa10d_0
  - packaging=24.0=pyhd8ed1ab_0
  - pandas=2.2.1=py311h320fe9a_0
  - pandoc=3.1.12.3=ha770c72_0
  - pandocfilters=1.5.0=pyhd8ed1ab_0
  - parso=0.8.3=pyhd8ed1ab_0
  - pathspec=0.12.1=pyhd8ed1ab_0
  - pcre2=10.43=hcad00b1_0
  - pep517=0.13.0=pyhd8ed1ab_0
  - pexpect=4.9.0=pyhd8ed1ab_0
  - pickleshare=0.7.5=py_1003
  - pillow=10.2.0=py311ha6c5da5_0
  - pip=24.0=pyhd8ed1ab_0
  - pixman=0.43.2=h59595ed_0
  - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
  - platformdirs=4.2.0=pyhd8ed1ab_0
  - pluggy=1.4.0=pyhd8ed1ab_0
  - ply=3.11=py_1
  - poppler=24.03.0=h590f24d_0
  - poppler-data=0.4.12=hd8ed1ab_0
  - portaudio=19.6.0=h7c63dc7_9
  - postgresql=16.2=h82ecc9d_1
  - pprintpp=0.4.0=pyhd8ed1ab_5
  - pptree=3.1=pyhd8ed1ab_0
  - pre-commit=3.7.0=pyha770c72_0
  - proj=9.4.0=h1d62c97_0
  - prometheus_client=0.20.0=pyhd8ed1ab_0
  - prompt-toolkit=3.0.42=pyha770c72_0
  - prompt_toolkit=3.0.42=hd8ed1ab_0
  - protobuf=4.25.3=py311h7b78aeb_0
  - psutil=5.9.8=py311h459d7ec_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pugixml=1.14=h59595ed_0
  - pulseaudio-client=17.0=hb77b528_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - pybind11-abi=4=hd8ed1ab_3
  - pycosat=0.6.6=py311h459d7ec_0
  - pycparser=2.21=pyhd8ed1ab_0
  - pyglfw=2.7.0=py311h38be061_0
  - pygments=2.17.2=pyhd8ed1ab_0
  - pyngrok=7.1.6=pyhd8ed1ab_0
  - pyopengl=3.1.6=pyhd8ed1ab_1
  - pyparsing=3.1.2=pyhd8ed1ab_0
  - pyqt=5.15.9=py311hf0fb5b6_5
  - pyqt5-sip=12.12.2=py311hb755f60_5
  - pyqtwebengine=5.15.9=py311hd529140_5
  - pysocks=1.7.1=pyha2e5f31_6
  - pytest=8.1.1=pyhd8ed1ab_0
  - pytest-icdiff=0.9=pyhd8ed1ab_0
  - python=3.11.8=hab00c5b_0_cpython
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
  - python-json-logger=2.0.7=pyhd8ed1ab_0
  - python-tzdata=2024.1=pyhd8ed1ab_0
  - python_abi=3.11=4_cp311
  - pytz=2024.1=pyhd8ed1ab_0
  - pyyaml=6.0.1=py311h459d7ec_1
  - pyzmq=25.1.2=py311h34ded2d_0
  - qhull=2020.2=h4bd325d_2
  - qt-main=5.15.8=h112747c_20
  - qt-webengine=5.15.8=h3e791b3_6
  - qt6-main=6.6.3=hd0aab4e_0
  - qtconsole-base=5.5.1=pyha770c72_0
  - qtpy=2.4.1=pyhd8ed1ab_0
  - rav1e=0.6.6=he8a937b_2
  - re2=2023.09.01=h7f4b329_2
  - readline=8.2=h8228510_1
  - referencing=0.34.0=pyhd8ed1ab_0
  - reproc=14.2.4.post0=hd590300_1
  - reproc-cpp=14.2.4.post0=h59595ed_1
  - requests=2.31.0=pyhd8ed1ab_0
  - resolve-robotics-uri-py=0.2.0=pyhd8ed1ab_0
  - rfc3339-validator=0.1.4=pyhd8ed1ab_0
  - rfc3986-validator=0.1.1=pyh9f0ad1d_0
  - rich=13.7.1=pyhd8ed1ab_0
  - robot-testing-framework=2.0.1=hcb278e6_1
  - robot_descriptions=1.8.1=pyhd8ed1ab_0
  - rod=0.2.0=pyhd8ed1ab_0
  - rpds-py=0.18.0=py311h46250e7_0
  - ruamel.yaml=0.18.6=py311h459d7ec_0
  - ruamel.yaml.clib=0.2.8=py311h459d7ec_0
  - ruby=3.2.2=h983345b_1
  - s2n=1.4.8=h06160fa_0
  - scipy=1.12.0=py311h64a7726_2
  - scotch=7.0.4=h23d43cc_1
  - sdformat13-python=13.6.0=py311h6ccdd8d_4
  - sdl=1.2.68=h293081c_0
  - sdl2=2.28.5=hdbcbe63_1
  - send2trash=1.8.2=pyh41d4057_0
  - setuptools=69.2.0=pyhd8ed1ab_0
  - shtab=1.7.1=pyhd8ed1ab_0
  - sip=6.7.12=py311hb755f60_0
  - six=1.16.0=pyh6c4a22f_0
  - smmap=5.0.0=pyhd8ed1ab_0
  - snappy=1.1.10=h9fff704_0
  - sniffio=1.3.1=pyhd8ed1ab_0
  - soupsieve=2.5=pyhd8ed1ab_1
  - soxr=0.1.3=h0b41bf4_3
  - spdlog=1.12.0=hd2e6256_2
  - sqlite=3.45.2=h2c6b66d_0
  - stack_data=0.6.2=pyhd8ed1ab_0
  - svt-av1=1.8.0=h59595ed_0
  - swig=4.2.1=hc9a1274_0
  - sysroot_linux-64=2.17=h4a8ded7_14
  - tbb=2021.11.0=h00ab1b0_1
  - tensorboard=2.16.2=pyhd8ed1ab_0
  - tensorboard-data-server=0.7.0=py311h63ff55d_1
  - tensorstore=0.1.56=py311h52ded46_0
  - terminado=0.18.1=pyh0d859eb_0
  - tiledb=2.21.1=ha9641ad_1
  - tinycss2=1.2.1=pyhd8ed1ab_0
  - tinyxml=2.6.2=h4bd325d_2
  - tinyxml2=10.0.0=h59595ed_0
  - tk=8.6.13=noxft_h4845f30_101
  - toml=0.10.2=pyhd8ed1ab_0
  - tomli=2.0.1=pyhd8ed1ab_0
  - toolz=0.12.1=pyhd8ed1ab_0
  - tornado=6.4=py311h459d7ec_0
  - tqdm=4.66.2=pyhd8ed1ab_0
  - traitlets=5.14.2=pyhd8ed1ab_0
  - truststore=0.8.0=pyhd8ed1ab_0
  - typeguard=2.13.3=pyhd8ed1ab_0
  - types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
  - typing-extensions=4.10.0=hd8ed1ab_0
  - typing_extensions=4.10.0=pyha770c72_0
  - typing_utils=0.1.0=pyhd8ed1ab_0
  - tyro=0.7.3=pyhd8ed1ab_0
  - tzcode=2024a=h3f72095_0
  - tzdata=2024a=h0c530f3_0
  - u-msgpack-python=2.8.0=pyhd8ed1ab_0
  - ukkonen=1.0.1=py311h9547e67_4
  - unixodbc=2.3.12=h661eb56_0
  - urdfdom=4.0.0=hee28ff1_1
  - urdfdom_headers=1.1.1=h00ab1b0_0
  - uri-template=1.3.0=pyhd8ed1ab_0
  - uriparser=0.9.7=h59595ed_1
  - urllib3=2.2.1=pyhd8ed1ab_0
  - virtualenv=20.25.1=pyhd8ed1ab_0
  - wayland=1.22.0=h8c25dac_1
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - webcolors=1.13=pyhd8ed1ab_0
  - webencodings=0.5.1=pyhd8ed1ab_2
  - websocket-client=1.7.0=pyhd8ed1ab_0
  - werkzeug=3.0.1=pyhd8ed1ab_0
  - wheel=0.43.0=pyhd8ed1ab_1
  - widgetsnbextension=4.0.10=pyhd8ed1ab_0
  - x264=1!164.3095=h166bdaf_2
  - x265=3.5=h924138e_3
  - xcb-util=0.4.0=hd590300_1
  - xcb-util-cursor=0.1.4=hd590300_1
  - xcb-util-image=0.4.0=h8ee46fc_1
  - xcb-util-keysyms=0.4.0=h8ee46fc_1
  - xcb-util-renderutil=0.3.9=hd590300_1
  - xcb-util-wm=0.4.1=h8ee46fc_1
  - xerces-c=3.2.5=hac6953d_0
  - xkeyboard-config=2.41=hd590300_0
  - xmltodict=0.13.0=pyhd8ed1ab_0
  - xorg-compositeproto=0.4.2=h7f98852_1001
  - xorg-damageproto=1.2.1=h7f98852_1002
  - xorg-fixesproto=5.0=h7f98852_1002
  - xorg-inputproto=2.3.2=h7f98852_1002
  - xorg-kbproto=1.0.7=h7f98852_1002
  - xorg-libice=1.1.1=hd590300_0
  - xorg-libsm=1.2.4=h7391055_0
  - xorg-libx11=1.8.7=h8ee46fc_0
  - xorg-libxau=1.0.11=hd590300_0
  - xorg-libxaw=1.0.14=h7f98852_1
  - xorg-libxcomposite=0.4.6=h0b41bf4_1
  - xorg-libxdamage=1.1.5=h7f98852_1
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xorg-libxext=1.3.4=h0b41bf4_2
  - xorg-libxfixes=5.0.3=h7f98852_1004
  - xorg-libxi=1.7.10=h7f98852_0
  - xorg-libxinerama=1.1.5=h27087fc_0
  - xorg-libxmu=1.1.3=h7f98852_0
  - xorg-libxpm=3.5.17=hd590300_0
  - xorg-libxrandr=1.5.2=h7f98852_1
  - xorg-libxrender=0.9.11=hd590300_0
  - xorg-libxt=1.3.0=hd590300_1
  - xorg-libxtst=1.2.3=h7f98852_1002
  - xorg-randrproto=1.5.0=h7f98852_1001
  - xorg-recordproto=1.14.2=h7f98852_1002
  - xorg-renderproto=0.11.1=h7f98852_1002
  - xorg-util-macros=1.19.3=h7f98852_0
  - xorg-xextproto=7.3.0=h0b41bf4_1003
  - xorg-xf86vidmodeproto=2.3.1=h7f98852_1002
  - xorg-xproto=7.0.31=h7f98852_1007
  - xz=5.2.6=h166bdaf_0
  - yaml=0.2.5=h7f98852_2
  - yaml-cpp=0.8.0=h59595ed_0
  - ycm-cmake-modules=0.16.2=h59595ed_0
  - zeromq=4.3.5=h59595ed_1
  - zipp=3.17.0=pyhd8ed1ab_0
  - zlib=1.2.13=hd590300_5
  - zstandard=0.22.0=py311haa97af0_0
  - zstd=1.5.5=hfc55251_0
  - zziplib=0.13.69=h27826a3_1
  - pip:
      - bottle==0.12.25
      - jaxsim==0.2.dev355+dirty
      - meshcat-viz==0.1.2.dev7
      - proxy-tools==0.1.0
      - pypng==0.20220715.0
      - pywebview==5.0.5
      - tokenize-rt==5.2.0
prefix: /jaxsim

@flferretti
Copy link
Collaborator

LGTM, apart from the fact that for some reason, some tests fail with the following environment:

conda env
name: testJAX
channels:
  - nvidia
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - absl-py=2.1.0=pyhd8ed1ab_0
  - ampl-mp=3.1.0=h2cc385e_1006
  - assimp=5.3.1=h8343317_3
  - attr=2.5.1=h166bdaf_1
  - black=24.3.0=py312h7900ff3_0
  - bzip2=1.0.8=hd590300_5
  - c-ares=1.27.0=hd590300_0
  - ca-certificates=2024.2.2=hbcca054_0
  - click=8.1.7=unix_pyh707e725_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - cuda-nvcc=12.4.99=0
  - cuda-version=11.8=h70ddcb2_3
  - cudatoolkit=11.8.0=h4ba93d1_13
  - cudnn=8.9.7.29=hbc23b4c_3
  - dbus=1.13.6=h5008d03_3
  - eigen=3.4.0=h00ab1b0_0
  - etils=1.8.0=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - expat=2.6.2=h59595ed_0
  - fsspec=2024.3.1=pyhca7485f_0
  - gettext=0.21.1=h27087fc_0
  - glfw=3.4=hd590300_0
  - icu=73.2=h59595ed_0
  - idyntree=12.0.0=py312h7eadc23_0
  - importlib-metadata=7.1.0=pyha770c72_0
  - importlib_metadata=7.1.0=hd8ed1ab_0
  - importlib_resources=6.4.0=pyhd8ed1ab_0
  - iniconfig=2.0.0=pyhd8ed1ab_0
  - ipopt=3.14.14=h04b96a2_1
  - irrlicht=1.8.5=h2a6caf8_4
  - isort=5.13.2=pyhd8ed1ab_0
  - jax=0.4.25=pyhd8ed1ab_0
  - jaxlib=0.4.23=cuda118py312h5cced90_200
  - lame=3.100=h166bdaf_1003
  - ld_impl_linux-64=2.40=h41732ed_0
  - libabseil=20240116.1=cxx17_h59595ed_2
  - libblas=3.9.0=21_linux64_openblas
  - libboost=1.84.0=h8013b2b_2
  - libcap=2.69=h0f662aa_0
  - libcblas=3.9.0=21_linux64_openblas
  - libccd-double=2.1=h59595ed_3
  - libedit=3.1.20191231=he28a2e2_2
  - libexpat=2.6.2=h59595ed_0
  - libffi=3.4.2=h7f98852_5
  - libflac=1.4.3=h59595ed_0
  - libgcc-ng=13.2.0=h807b86a_5
  - libgcrypt=1.10.3=hd590300_0
  - libgfortran-ng=13.2.0=h69a702a_5
  - libgfortran5=13.2.0=ha4646dd_5
  - libglib=2.80.0=hf2295e7_1
  - libglu=9.0.0=hac7e632_1003
  - libgomp=13.2.0=h807b86a_5
  - libgpg-error=1.48=h71f35ed_0
  - libgrpc=1.62.1=h15f2491_0
  - libhwloc=2.9.3=default_h554bfaf_1009
  - libiconv=1.17=hd590300_2
  - libjpeg-turbo=3.0.0=hd590300_1
  - liblapack=3.9.0=21_linux64_openblas
  - libmujoco=3.1.3=hfbbffa6_1
  - libnsl=2.0.1=hd590300_0
  - libogg=1.3.4=h7f98852_1
  - libopenblas=0.3.26=pthreads_h413a1c8_0
  - libopus=1.3.1=h7f98852_1
  - libosqp=0.6.3=h59595ed_0
  - libpng=1.6.43=h2797004_0
  - libprotobuf=4.25.3=h08a7969_0
  - libqdldl=0.1.5=h27087fc_1
  - libre2-11=2023.09.01=h5a48ba9_2
  - libscotch=7.0.4=h91e35bf_1
  - libsndfile=1.2.2=hc60ed4a_1
  - libspral=2023.09.07=h6aa6db2_2
  - libsqlite=3.45.2=h2797004_0
  - libstdcxx-ng=13.2.0=h7e041cc_5
  - libsystemd0=255=h3516f8a_1
  - libuuid=2.38.1=h0b41bf4_0
  - libvorbis=1.3.7=h9c3ff4c_0
  - libxcb=1.15=h0b41bf4_0
  - libxcrypt=4.4.36=hd590300_1
  - libxkbcommon=1.7.0=h662e7e4_0
  - libxml2=2.12.6=h232c23b_1
  - libxslt=1.1.39=h76b75d6_0
  - libzlib=1.2.13=hd590300_5
  - lodepng=20220109=h924138e_0
  - lxml=5.1.0=py312h37b5203_0
  - lz4-c=1.9.4=hcb278e6_0
  - metis=5.1.0=h59595ed_1007
  - ml_dtypes=0.3.2=py312hfb8ada1_0
  - mpg123=1.32.4=h59595ed_0
  - mujoco=3.1.3=ha770c72_1
  - mujoco-python=3.1.3=py312h276ad9d_1
  - mujoco-samples=3.1.3=h59595ed_1
  - mujoco-simulate=3.1.3=h59595ed_1
  - mumps-include=5.6.2=ha770c72_4
  - mumps-seq=5.6.2=hfef103a_4
  - mypy_extensions=1.0.0=pyha770c72_0
  - nccl=2.20.5.1=h6103f9b_0
  - ncurses=6.4.20240210=h59595ed_0
  - numpy=1.26.4=py312heda63a1_0
  - openssl=3.2.1=hd590300_1
  - opt-einsum=3.3.0=hd8ed1ab_2
  - opt_einsum=3.3.0=pyhc1e730c_2
  - osqp-eigen=0.8.1=hdd734ac_1
  - packaging=24.0=pyhd8ed1ab_0
  - pathspec=0.12.1=pyhd8ed1ab_0
  - pcre2=10.43=hcad00b1_0
  - pip=24.0=pyhd8ed1ab_0
  - platformdirs=4.2.0=pyhd8ed1ab_0
  - pluggy=1.4.0=pyhd8ed1ab_0
  - pptree=3.1=pyhd8ed1ab_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - pulseaudio-client=17.0=hb77b528_0
  - pybind11-abi=4=hd8ed1ab_3
  - pyglfw=2.7.0=py312h7900ff3_0
  - pyopengl=3.1.6=pyhd8ed1ab_1
  - pytest=8.1.1=pyhd8ed1ab_0
  - python=3.12.2=hab00c5b_0_cpython
  - python_abi=3.12=4_cp312
  - qhull=2020.2=h4bd325d_2
  - re2=2023.09.01=h7f4b329_2
  - readline=8.2=h8228510_1
  - scipy=1.12.0=py312heda63a1_2
  - scotch=7.0.4=h23d43cc_1
  - sdl=1.2.68=h293081c_0
  - sdl2=2.28.5=hdbcbe63_1
  - setuptools=69.2.0=pyhd8ed1ab_0
  - tinyxml2=10.0.0=h59595ed_0
  - tk=8.6.13=noxft_h4845f30_101
  - tomli=2.0.1=pyhd8ed1ab_0
  - typing_extensions=4.10.0=pyha770c72_0
  - tzdata=2024a=h0c530f3_0
  - unixodbc=2.3.12=h661eb56_0
  - wayland=1.22.0=h8c25dac_1
  - wheel=0.43.0=pyhd8ed1ab_1
  - xkeyboard-config=2.41=hd590300_0
  - xorg-kbproto=1.0.7=h7f98852_1002
  - xorg-libx11=1.8.7=h8ee46fc_0
  - xorg-libxau=1.0.11=hd590300_0
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xorg-libxext=1.3.4=h0b41bf4_2
  - xorg-libxinerama=1.1.5=h27087fc_0
  - xorg-xextproto=7.3.0=h0b41bf4_1003
  - xorg-xproto=7.0.31=h7f98852_1007
  - xz=5.2.6=h166bdaf_0
  - zipp=3.17.0=pyhd8ed1ab_0
  - zlib=1.2.13=hd590300_5
  - zstd=1.5.5=hfc55251_0
  - pip:
      - asttokens==2.4.1
      - cfgv==3.4.0
      - coloredlogs==15.0.1
      - contourpy==1.2.0
      - cycler==0.12.1
      - decorator==5.1.1
      - distlib==0.3.8
      - docstring-parser==0.16
      - executing==2.0.1
      - filelock==3.13.3
      - fonttools==4.50.0
      - gitdb==4.0.11
      - gitpython==3.1.42
      - humanfriendly==10.0
      - icdiff==2.0.7
      - identify==2.5.35
      - ipython==8.22.2
      - jax-dataclasses==1.6.0
      - jaxlie==1.3.4
      - jaxsim==0.2.dev363
      - jedi==0.19.1
      - kiwisolver==1.4.5
      - markdown-it-py==3.0.0
      - mashumaro==3.12
      - matplotlib==3.8.3
      - matplotlib-inline==0.1.6
      - mdurl==0.1.2
      - mediapy==1.2.0
      - nodeenv==1.8.0
      - parso==0.8.3
      - pexpect==4.9.0
      - pillow==10.2.0
      - pprintpp==0.4.0
      - pre-commit==3.7.0
      - prompt-toolkit==3.0.43
      - ptyprocess==0.7.0
      - pure-eval==0.2.2
      - pygments==2.17.2
      - pyparsing==3.1.2
      - pytest-icdiff==0.9
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.1
      - resolve-robotics-uri-py==0.2.0
      - rich==13.7.1
      - robot-descriptions==1.9.0
      - rod==0.2.0
      - shtab==1.7.1
      - six==1.16.0
      - smmap==5.0.1
      - stack-data==0.6.3
      - tokenize-rt==5.2.0
      - tqdm==4.66.2
      - traitlets==5.14.2
      - tyro==0.7.3
      - virtualenv==20.25.1
      - wcwidth==0.2.13
      - xmltodict==0.13.0

I can finalize #124 now if you want to include it into this PR

@diegoferigo
Copy link
Member Author

diegoferigo commented Mar 29, 2024

I'm not really sure what's going on there, I see that there's a mixture of cuda11, cuda12, together with stuff from both the nvidia and conda-forge channel. As first thought, I blame that to be the culprit. My environment uses the latest jaxlib rebuild1 with the new official cuda12 all coming from conda-forge. Then, CI install everything from PyPI. I guess this is enough for merging, we can dig deeper on that particular environment later.

I can finalize #124 now if you want to include it into this PR

No problem, we can merge it separately. I'd like to give docstring a last round of review before the release.

Footnotes

  1. https://github.com/conda-forge/jaxlib-feedstock/pull/227

@diegoferigo diegoferigo merged commit 83fcf58 into main Mar 29, 2024
21 checks passed
@diegoferigo diegoferigo deleted the functional branch March 29, 2024 09:20
Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some minor comments, which can be addressed in a following PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good idea for a future release might be to use pixi for the CI, so we don't need to install the whole gazebo package from apt

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we nowadays use widely conda-forge, I still think that most people (especially those that want to give JaxSim a quick try) will use PyPI in a virtualenv. I'd agree to add a pixi or conda test in parallel.

from .simulation.ode_integration import IntegratorType
from .simulation.simulator import JaxSim
from . import terrain # isort:skip
from . import api, integrators, logging, math, rbda
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reimporting logging from line 1

Suggested change
from . import api, integrators, logging, math, rbda
from . import api, integrators, math, rbda

Comment on lines +394 to +404
params_next_accepted = params_next | dict(
dt0=jnp.clip(
jax.lax.select(
pred=break_loop,
on_true=params["dt0"],
on_false=Δt_next,
),
self.dt_min,
self.dt_max,
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calls to dict have been shown to be slower than just using the dict literal. We might prefer to use those

Suggested change
params_next_accepted = params_next | dict(
dt0=jnp.clip(
jax.lax.select(
pred=break_loop,
on_true=params["dt0"],
on_false=Δt_next,
),
self.dt_min,
self.dt_max,
)
)
params_next_accepted = params_next | {
"dt0": jnp.clip(
jax.lax.select(
pred=break_loop,
on_true=params["dt0"],
on_false=Δt_next,
),
self.dt_min,
self.dt_max,
)
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that this is true only in plain Python, not in jit-compiled code.

@@ -0,0 +1,93 @@
import jax
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import?

Suggested change
import jax

Comment on lines +1405 to +1407
**(
dict(joint_forces=joint_forces, link_forces=link_forces) | integrator_kwargs
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion for using dict literal instead of calling dict

Suggested change
**(
dict(joint_forces=joint_forces, link_forces=link_forces) | integrator_kwargs
),
**(
{"joint_forces": joint_forces, "link_forces": link_forces}
| integrator_kwargs
),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In jit-compiled code, this change has no effect.

from jaxsim.simulation.ode_data import ODEState
from jaxsim.integrators import Time
from jaxsim.math import Quaternion
from jaxsim.utils import Mutability
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import?

Suggested change
from jaxsim.utils import Mutability

@@ -2,7 +2,9 @@
import contextlib
import copy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import

Suggested change
import copy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants