Skip to content

Add lxml dependency#89

Merged
flferretti merged 2 commits intogbionics:mainfrom
giotherobot:patch-1
Feb 21, 2024
Merged

Add lxml dependency#89
flferretti merged 2 commits intogbionics:mainfrom
giotherobot:patch-1

Conversation

@giotherobot
Copy link
Copy Markdown
Contributor

@giotherobot giotherobot commented Feb 20, 2024


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

@diegoferigo diegoferigo self-requested a review February 20, 2024 15:32
Copy link
Copy Markdown
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.

LGTM

Copy link
Copy Markdown
Contributor

@diegoferigo diegoferigo left a comment

Choose a reason for hiding this comment

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

Good catch @giotherobot, thanks for the contribution. Can you please add lxml also to environment.yml?

@giotherobot
Copy link
Copy Markdown
Contributor Author

There are still some dependencies missing to run python -m jaxsim.mujoco: gz or ign in the path, solved by installing libgz-sim7 as suggested by @flferretti and resolve_robotics_uri_py.

@diegoferigo
Copy link
Copy Markdown
Contributor

There are still some dependencies missing to run python -m jaxsim.mujoco: gz or ign in the path, solved by installing libgz-sim7 as suggested by @flferretti and resolve_robotics_uri_py.

Yep, that's right. Those are system dependencies that are expected to be found in the system in the case jaxsim is installed from PyPI. However, in a conda environment, we can specify them as [viz] dependencies.

@flferretti on the long term, we should consider to add them as rod dependencies. Especially in recent Gazebo Sim versions having python bindings of sdformat. Last time I checked, it was not yet part of conda-forge. Maybe now it is.

@flferretti
Copy link
Copy Markdown
Collaborator

flferretti commented Feb 20, 2024

Yep, that's right. Those are system dependencies that are expected to be found in the system in the case jaxsim is installed from PyPI. However, in a conda environment, we can specify them as [viz] dependencies.

@flferretti on the long term, we should consider to add them as rod dependencies. Especially in recent Gazebo Sim versions having python bindings of sdformat. Last time I checked, it was not yet part of conda-forge. Maybe now it is.

libsdformat on conda-forge provides sdformat14-python

@traversaro
Copy link
Copy Markdown
Contributor

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there. Probably we can fallback to the gz command if the sdformat python module can't be found?

@flferretti
Copy link
Copy Markdown
Collaborator

flferretti commented Feb 20, 2024

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there.

@traversaro isn't it python-sdformat?

Probably we can fallback to the gz command if the sdformat python module can't be found?

This looks good, so we are not forced to use gazebo

@diegoferigo
Copy link
Copy Markdown
Contributor

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there.

@traversaro isn't it python-sdformat?

Nope, that's a third-party project, not what @traversaro meant.

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there. Probably we can fallback to the gz command if the sdformat python module can't be found?

Yep this can be done. When I tried many months ago, what I didn't like of the plain python bindings of sdformat is that I could not manage to get a proper error in stdout if the input URDF or SDF is malformed. Calling gz instead provides clear error messages. Not sure if something has changed since.

@traversaro
Copy link
Copy Markdown
Contributor

When I tried many months ago, what I didn't like of the plain python bindings of sdformat is that I could not manage to get a proper error in stdout if the input URDF or SDF is malformed. Calling gz instead provides clear error messages. Not sure if something has changed since.

If you have time, it would be useful to report this upstream in https://github.com/gazebosim/sdformat, Python bindings of sdformat and gz libraries in general to not have a lot of users at the moment, so feedback from actual users of the bindings is quite precious for sdformat upstream developers.

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.

4 participants