Open GiulioRomualdi opened 2 years ago
I found a workaround 😃 . If you import multicontact_api
before ndcurves
the code works as expected
from multicontact_api import ContactSequence
import ndcurves
cs = ContactSequence()
cs.loadFromBinary("./walk_20cm_quasistatic_WB.cs")
This is really strange
Hi @GiulioRomualdi,
Your issue is a duplicate of #23. I still have to fix this, sorry for the inconvenience.
As your report is way better than my quick notes, I'll let this one open and close the other.
Hi @nim65s!
Actually, the issue is a bit different. In #23 it is only reported that import ndcurves
has to be added in order to have the multicontact_api
working.
What I noticed here is that import ndcurves
should be added after from multicontact_api import ContactSequence
, indeed if the order is the other way around the loadFromBinary
segfault.
Assuming that ndcurves
must be imported manually the following two snippets should give the same result
from multicontact_api import ContactSequence
import ndcurves
cs = ContactSequence()
cs.loadFromBinary("./walk_20cm_quasistatic_WB.cs")
import ndcurves
from multicontact_api import ContactSequence
cs = ContactSequence()
cs.loadFromBinary("./walk_20cm_quasistatic_WB.cs")
Am I missing something?
To me, the issue is that imports are broken. The different things you are talking about are multiple symptoms of the same issue. I mean… Things should just work. The end user shouldn't have to import a library he doesn't intend to use directly, or shouldn't have to fiddle with import order to make his code work as expected.
Hi all, I'm trying to visualize the motions stored in the
example
folder with the following commandUnfortunately, I have some problems, First of all, the following line https://github.com/loco-3d/multicontact-api/blob/3ff225a2a114044dda07ee9d933dc060a96cc359/examples/display_gepetto_gui.py#L1
should be substituted with
However, after this modification, the code crashes with
The following code replicates the same error
I installed
multicontact-api
project from sources withrobotpkg
as explained herecc @pFernbach and @nim65s