robotology / idyntree

Multibody Dynamics Library designed for Free Floating Robots
BSD 3-Clause "New" or "Revised" License
156 stars 65 forks source link

Enable the IDYNTREE_USES_IRRLICHT option in pip/PyPI builds #1045

Closed traversaro closed 1 year ago

traversaro commented 1 year ago

This should solve errors like:

Traceback (most recent call last):
  File "src/eCub_lenghtAndDensityWithHumanOptimization.py", line 174, in <module>
    VisualizationHelper.prepare_visualization()
  File "/src/OutputVisualization.py", line 27, in prepare_visualization
    self.viz.camera().animator().enableMouseControl(True)
AttributeError: 'NoneType' object has no attribute 'enableMouseControl'
The command '/bin/bash -c python3 src/eCub_lenghtAndDensityWithHumanOptimization.py' returned a non-zero code: 1

when the PyPI build of iDynTree is used.

traversaro commented 1 year ago

@diegoferigo do you see anything problematic in this?

traversaro commented 1 year ago

@diegoferigo do you see anything problematic in this?

At first look no, it seems you've already done all the right steps to install irrlicht in the image used to build the wheels and configured correctly the CMake called by setuptools.

Great! I am quite afraid on possible runtime problems introduced by the additional transitive dependencies of irrlicht (zlib, libpng, etc etc), but anyhow this is the price you have to pay when you package with pip/PyPI C++ libraries with many dependency, and we will only discover if this is it is a problem by trying.

diegoferigo commented 1 year ago

@diegoferigo do you see anything problematic in this?

At first look no, it seems you've already done all the right steps to install irrlicht in the image used to build the wheels and configured correctly the CMake called by setuptools.

Great! I am quite afraid on possible runtime problems introduced by the additional transitive dependencies of irrlicht (zlib, libpng, etc etc), but anyhow this is the price you have to pay when you package with pip/PyPI C++ libraries with many dependency, and we will only discover if this is it is a problem by trying.

Yep let's wait and see. In CI, auditwheel should perform automatically the vendoring of dependent shared libraries, no further edit is necessary. Then, for the interaction with other packages, only time will tell :)