From 95b01f9679edcd71ecd8a2bb4521c24dc60d905a Mon Sep 17 00:00:00 2001 From: akhilsathuluri Date: Sun, 27 Jul 2025 00:48:47 +0200 Subject: [PATCH 1/2] fix pixi installation errors ami-iit#34 (#5) * fix pixi installation errors #34 --- README.md | 9 --------- examples/drake_walking.ipynb | 6 +++--- examples/jaxsim_walking.ipynb | 6 +++--- pixi.lock | 4 ++-- pyproject.toml | 7 ++++--- src/comodo/jaxsimSimulator/jaxsimSimulator.py | 4 ++-- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3fceea1..bc4da22 100644 --- a/README.md +++ b/README.md @@ -68,15 +68,6 @@ conda install -c conda-forge -c robotology casadi pytest liecasadi meshcat-pyth pip install --no-deps git+https://github.com/ami-iit/hippopt.git ``` -#### With Drake - -To use [`drake`](https://drake.mit.edu/) as the simulator backend requires the following additional dependencies: - -```bash -conda install meshio tqdm -pip install drake git+https://github.com/ami-iit/amo_urdf -``` - ### 📦 Installation with pixi An alternative and easy way to use comodo is with [`pixi`](https://pixi.sh/latest/) package manager. It automatically handles the creation and activation of virtual environments in which to use the different simulators that comodo supports. diff --git a/examples/drake_walking.ipynb b/examples/drake_walking.ipynb index 8ffa225..60d26db 100644 --- a/examples/drake_walking.ipynb +++ b/examples/drake_walking.ipynb @@ -316,7 +316,7 @@ ], "metadata": { "kernelspec": { - "display_name": "comodo_jaxsim", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -330,9 +330,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.16" + "version": "3.12.11" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/examples/jaxsim_walking.ipynb b/examples/jaxsim_walking.ipynb index 39b1677..53e60f1 100644 --- a/examples/jaxsim_walking.ipynb +++ b/examples/jaxsim_walking.ipynb @@ -577,7 +577,7 @@ ], "metadata": { "kernelspec": { - "display_name": "comodo", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -591,9 +591,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.12.11" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/pixi.lock b/pixi.lock index 45bf6c9..1155bbd 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b22810001a2590d21cd187e34c04fd5cdf6fe2b0d5d86096b93e62434f8594a -size 296122 +oid sha256:a26ac1dbda9e0f8b9dd0593c4fb2399e4fa3f3a1f16a60ca94704183c82eff3b +size 526994 diff --git a/pyproject.toml b/pyproject.toml index c354871..b06a78b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,11 +44,12 @@ package-dir = { "" = "src" } # ================== [tool.pixi.project] -channels = ["conda-forge"] +channels = ["conda-forge", "robotology"] platforms = ["linux-64"] [tool.pixi.system-requirements] libc = "2.35" +cuda = "12" [tool.pixi.dependencies] adam-robotics = "*" @@ -85,13 +86,13 @@ tqdm = "*" [tool.pixi.feature.hippopt.dependencies] liecasadi = "*" -ffmepg-python = "*" +ffmpeg-python = "*" meshcat-python = "*" [tool.pixi.feature.hippopt.pypi-dependencies] hippopt = { git = "git+https://github.com/ami-iit/hippopt.git"} -[environments] +[tool.pixi.environments] jaxsim = { features = ["jaxsim"], solve-group = "default" } mujoco = { features = ["mujoco"], solve-group = "default" } drake = { features = ["drake"], solve-group = "default" } diff --git a/src/comodo/jaxsimSimulator/jaxsimSimulator.py b/src/comodo/jaxsimSimulator/jaxsimSimulator.py index 4122635..4eeeaf0 100644 --- a/src/comodo/jaxsimSimulator/jaxsimSimulator.py +++ b/src/comodo/jaxsimSimulator/jaxsimSimulator.py @@ -12,7 +12,7 @@ import jaxsim.rbda.contacts import numpy as np import numpy.typing as npt -from jaxsim import VelRepr, integrators +from jaxsim import VelRepr from jaxsim.mujoco import MujocoVideoRecorder from jaxsim.mujoco.loaders import UrdfToMjcf from jaxsim.mujoco.model import MujocoModelHelper @@ -66,7 +66,7 @@ def __init__( # Step aux dict. # This is used only for variable-step integrators. - self._step_aux_dict: dict[str, Any]= {} + self._step_aux_dict: dict[str, Any] = {} # Time step for the simulation self._dt: float = dt From 48f8712aaf33b08532995dddddf833cc418d52c0 Mon Sep 17 00:00:00 2001 From: akhilsathuluri Date: Fri, 1 Aug 2025 12:13:26 +0200 Subject: [PATCH 2/2] Update pyproject.toml Remove `cuda` and `robotology` --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b06a78b..5af55f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,12 +44,11 @@ package-dir = { "" = "src" } # ================== [tool.pixi.project] -channels = ["conda-forge", "robotology"] +channels = ["conda-forge"] platforms = ["linux-64"] [tool.pixi.system-requirements] libc = "2.35" -cuda = "12" [tool.pixi.dependencies] adam-robotics = "*"