bipedal-locomotion-framework: ImportError: arg(): could not convert default argument into a Python object when using BLF

Hi @traversaro @S-Dafarra @GiulioRomualdi ,

at very beginning when importing BLF python module, I had some other issues which are reported here: https://github.com/ami-iit/element_pi-learning-human-estimation/issues/36#issuecomment-1876906558, this morning I thought I finally fixed the problem, but then I found I can’t use TomlParametersHandler() from bipedal_locomotion_framework.bindings.parameters_handler. So I did some uninstall-cleaning-install things, then I found myself stuck in the following bug if I try to import the BLF module:

Traceback (most recent call last):
  File "IKSolver.py", line 4, in <module>
    import bipedal_locomotion_framework.bindings.parameters_handler as blfh
  File "/home/cheng/robotology-superbuild/build/install/lib/python3/dist-packages/bipedal_locomotion_framework/__init__.py", line 1, in <module>
    from .bindings import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.

I’m using a virtual environment with python version 3.8.10. Before importing BLF python module, I did following things:

  • In robotology/src/manif switch to devel branch and update to the newest, then in robotology/build/src/manif I did cmake+make install.
  • In robotology/src/blf switch to v0.17.0, then in robotology/build/src/blf I did cmake+make install things.
  • Then I did pip install git+https://github.com/artivis/manif@devel.

In the end I have bipedal_locomotion_framework: 0.17.0 and manifpy: 0.1.dev756 installed. I can import manifpy without any problem. I tried to find the reason of above mentioned issue with BLF importing, and only got this: https://github.com/patrikhuber/eos/issues/256 and this: https://github.com/neumond/pybrood/issues/4, which are most related to my case.

Do you have any idea what could be the reason and how could I tackle it? Many thanks 😃

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

In the end thanks to @traversaro, the problem is solved by creating a clean conda env instead of mix-using multiple package managers. I think we can close this issue now.

If you are not sure how to start from scratch, I can help you next week, just schedule a meeting on my calendar.

That’s exactly what I was about to ask. I’d love to do that!