Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run display_gepetto_gui python script #24

Open
GiulioRomualdi opened this issue Nov 9, 2021 · 4 comments
Open

Unable to run display_gepetto_gui python script #24

GiulioRomualdi opened this issue Nov 9, 2021 · 4 comments
Assignees

Comments

@GiulioRomualdi
Copy link

Hi all, I'm trying to visualize the motions stored in the example folder with the following command

python3 display_gepetto_gui.py walk_20cm_quasistatic_WB.cs

Unfortunately, I have some problems,
First of all, the following line

should be substituted with

import ndcurves

However, after this modification, the code crashes with

terminate called after throwing an instance of 'boost::archive::archive_exception'
  what():  unregistered class
Aborted (core dumped)

The following code replicates the same error

import ndcurves
from multicontact_api import ContactSequence
cs = ContactSequence()
cs.loadFromBinary("./walk_20cm_quasistatic_WB.cs")

I installed multicontact-api project from sources with robotpkg as explained here

cc @pFernbach and @nim65s

@GiulioRomualdi
Copy link
Author

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

@nim65s
Copy link
Contributor

nim65s commented Nov 9, 2021

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.

@GiulioRomualdi
Copy link
Author

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?

@nim65s
Copy link
Contributor

nim65s commented Nov 9, 2021

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.

nim65s added a commit to nim65s/multicontact-api that referenced this issue Jan 25, 2022
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

No branches or pull requests

2 participants