Skip to content

moveit_commander fails in Kinetic due to pyassimp regression #86

Closed

Description

@rhaschke

In Xenial with pyassimp 3.2, importing moveit_commander fails with:

>>> import moveit_commander
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/vol/sandbox/ros/install/lib/python2.7/dist-packages/moveit_commander/__init__.py", line 3, in <module>
    from planning_scene_interface import *
  File "/vol/sandbox/ros/install/lib/python2.7/dist-packages/moveit_commander/planning_scene_interface.py", line 48, in <module>
    import pyassimp
  File "/usr/lib/python2.7/dist-packages/pyassimp/__init__.py", line 1, in <module>
    from .core import *
  File "/usr/lib/python2.7/dist-packages/pyassimp/core.py", line 23, in <module>
    from . import structs
ImportError: cannot import name structs

@davetcoleman Did you ever tried to run moveit from python in kinect?

Activity

  1. rhaschke commented on Aug 19, 2016

    @rhaschke
    ContributorAuthor

    By the way, this was revealed by the new integration_tests ;-)

  2. rhaschke commented on Aug 19, 2016

    @rhaschke
    ContributorAuthor

    The bug is already filed on launchpad and a patch exists.

  3. davetcoleman commented on Aug 19, 2016

    @davetcoleman
    Member

    No, I don't use commander or any Python interfaces

  4. davetcoleman commented on Aug 19, 2016

    @davetcoleman
    Member

    Nice job with the integration tests!!

  5. v4hn commented on Aug 22, 2016

    @v4hn
    Contributor

    @rhaschke can we close this? It's a bug in the ubuntu package that should be fixed in a while (I presume).

  6. davetcoleman commented on Aug 22, 2016

    @davetcoleman
    Member

    Seems like this issue should be left open until fixed for other user's reference, or we should document it somewhere else like the moveit_command tutorial

  7. v4hn commented on Aug 22, 2016

    @v4hn
    Contributor

    On Mon, Aug 22, 2016 at 11:21:52AM -0700, Dave Coleman wrote:

    Seems like this issue should be left open until fixed for other user's reference

    Ok, let's leave it open then.

  8. davetcoleman commented on Nov 3, 2016

    @davetcoleman
    Member

    I just tried running the python move_group_interface tutorial and ran into this bug again. I just checked the launchpad link and even though they claim it has been released, Ubuntu 16.04 still lacks the fixed version. I asked a question on that forum, not sure how else to proceed.

  9. MarkusEich commented on Nov 25, 2016

    @MarkusEich

    same problem here. Moveit commander is not usable due to ImportError: cannot import name structs. Is there a way to use moveit from python without using the commander? I basically need only a move_to for the endeffector (of Baxter).

  10. davetcoleman commented on Nov 25, 2016

    @davetcoleman
    Member

    You can try https://github.com/mikeferguson/moveit_python - I'd like to eventually integrate that into our main release

  11. MarkusEich commented on Nov 30, 2016

    @MarkusEich

    Was able to fix it. Pull the latest version from assimp. https://github.com/assimp/assimp.git and build it. make install will copy it to /usr/local/lib. Then go to /port/PyAssimp in the source folder and run python setup.py install. This should create the necessary files in /usr/local/lib/python2.7/dist-packages/pyassimp.

    move_group_python_interface.py and using the commander works now flawlessly (tested with 16.04 and kinetic)

  12. 130s commented on Jan 11, 2017

    @130s
    Contributor

    I suppose this can be closed now that Kinetic release #18 is already done. Please report/reopen if the issue persists.

  13. 19 remaining items

  14. srsidd commented on Jul 7, 2017

    @srsidd
    Contributor

    I looked into modifying the rosdep keys so we can install pyassimp from pip2 and use apt to install libassimp-dev. However, rosdep is not configured to accept a particular version of pip.

    @jlack1987 has opened an issue here, (rosdep/issues/519), which is technically a blocker for this to get done.

  15. jlack1987 commented on Jul 8, 2017

    @jlack1987

    I just tested in a pristine docker installing pyassimp via pip install pyassimp and then apt install libassimp-dev and that combo imported just fine. That should be all that's needed for it to work with rosdep right? I didn't have to specify pip2 or pip3

  16. 0ldham commented on Aug 1, 2017

    @0ldham

    I still receive the initial structs error, even after following the advice of @MarkusEich and of @iglstone, and after updating moveit and pyassimp.

  17. added a commit that references this issue on Aug 9, 2017
  18. k-okada commented on Aug 9, 2017

    @k-okada
    Contributor

    as @0ldham reported, we still have this problem, our proposal patch is #581

  19. added a commit that references this issue on Aug 19, 2017
  20. jacknlliu commented on Nov 6, 2017

    @jacknlliu

    We still have this problem.

    Ubuntu: 16.04
    ROS: kinetic
    moviet: 0.9.9-Alpha
    
  21. v4hn commented on Nov 17, 2017

    @v4hn
    Contributor

    We still have this problem.

    The problem is worked around in f00addf and things work if you build moveit/the moveit_commander package yourself.
    However it is still not released in kinetic. We are on our way to release (hopefully) next week (see #686).

  22. naveedhd commented on Dec 4, 2017

    @naveedhd

    Following the moveit_commander and fell into this. [Xenial, Kinetic]. Workaround:

    1. removed installed python-assimp (<=3.2) by sudo dpkg --remove --force-depends python-pyassimp (as apt will remove dependencies also)
    2. installed by pip pyassimp (3.3) using sudo -H flag (to replace the /usr one)
  23. bmagyar commented on May 24, 2018

    @bmagyar
    Member
  24. Aparun8 commented on Mar 24, 2019

    @Aparun8

    Segmentation fault(Core dumped) while adding mesh files to moveit. I updated the pyassimp version to 4.1.3 after some advice, but still I'm getting the same error. Importing moveit_commander works. Adding default shapes to moveit works, but adding meshfiles doesn't works. And the error comes when I add mesh files. I tried with both absolute and relative paths. Any help would be appreciated.

  25. tandukion commented on Apr 8, 2019

    @tandukion

    Had this problem before:
    Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
    And it seems it was segmentation fault like @Aparun8 said that was caused by pyassimp error.
    Found a solution here.
    Only version 4.1.3 or 3.3 works.

  26. dbersan commented on Aug 7, 2020

    @dbersan

    sudo pip uninstall pyassimp
    and then,
    sudo pip install pyassimp ,
    which will install pyassimp 3.3, solved the problems..may help.

    Nope, it only worked for you because the current library version of pyassimp on pip when you installed it HAPPENED to be 3.3. Today the current one is 4.1.4, and I get the same error using your same commands. This is not a solution, it's mere luck.

    The way to do this is:

    pip install 'pyassimp>=3.3.0,<3.4.0' --force-reinstall

    If you also have problems with multiple python versions installed, this is an even more robust solution:

    sudo python -m pip install 'pyassimp>=3.3.0,<3.4.0' --force-reinstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions