Cannot add mesh files to moveit!
I'm trying to add the mesh files to moveit! in ROS kinetic for baxter robot. I'm using python code to implement it. I used this below function to add the mesh file
scene.addmesh("pin",pinpose,resourcepath '/objects/Pin.stl')
And I have also used scene.addbox("box", boxpose, (0.001, 0.001, 0.05))
for adding the small box. My problem is,the box is added,but the mesh file is not. I'm getting segmentation fault(core dumped) error, when it tries to execute the addmesh line. I have tried with different .stl files and also with .dae files. At the same time, I can import this same .stl file directly in moveit!. I don't know what is the reason for the segfault. Can someone help to resolve this error?
ROSROOT=/opt/ros/kinetic/share/ros ROSPACKAGEPATH=/opt/ros/kinetic/share ROSMASTERURI=http://localhost:11311 ROSVERSION=1 ROSLISPPACKAGEDIRECTORIES= ROSDISTRO=kinetic ROSETC_DIR=/opt/ros/kinetic/etc/ros
Asked by ArunPrasanth on 2019-02-23 05:55:55 UTC
Answers
I'm working on this those days, and I do find one way to fix this problem. This is maybe a pyassimp
bug, check out if you're using pyassimp 4.1.4
or not. If so, use sudo -H pip uninstall pyassimp
and sudo -H pip install pyassimp==4.1.3
or 3.3 is ok. I tried this, and my mesh import works well. Hope this answer may be helpful
Asked by YX.Z on 2019-03-22 04:30:29 UTC
Comments
Hi, Thank you so much for your reply. I was aware of this issue https://github.com/ros-planning/moveit/issues/86 before working with moveit! and I installed necessary pyassimp and I already have version 4.1.3. I checked it by opening editor, used import moveit_commander, it works. The error is when I use the command scene.add_mesh(). I tried giving both absolute path and relative path. Now I'm stuck with moving forward.
Asked by ArunPrasanth on 2019-03-22 10:26:32 UTC
Yes,I am aware of this issues too, whereas the link we know both, gives us a way to install a new pyassimp
to replace the version pyassimp 3.2
which are attached to ros-kinetic-full
. However, if you do as sudo pip intall pyassimp
you'll get pyassimp 4.1.4
rather than pyassimp 4.1.3
. So make sure you are not using 4.1.4. When I use 4.1.4,I have segmentation fault(core dumped) error, but none with pyassimp 4.1.3
or pyassimp 3.3
. This is all I get for this issue, if you do use a 4.1.3
version, then I do recommend you to open a issue in its github issues page.
Asked by YX.Z on 2019-03-24 01:40:51 UTC
Hi Again, I'm using different PC and checked that I'm using pyassimp 4.1.4. I tried to install the version you said and I get *Collecting pyassimp==4.1.3 Installing collected packages: pyassimp Found existing installation: pyassimp 4.1.4 Cannot uninstall 'pyassimp'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. *
It seems the pyassimp is broken or I do not know the exact solution. Now I neither can't uninstall or reinstall the version you said. Any help would be appreciated.
Thank you in advance.
Asked by ArunPrasanth on 2019-04-02 10:00:36 UTC
I met this phenomena once, then I tried this sudo dpkg --remove --force-depends python-pyassimp
,then sudo -H pip install pyassimp==4.1.3
. It works for me.
Asked by YX.Z on 2019-04-03 01:44:28 UTC
Hi, Thanks again, I tried sudo dpkg --remove --force-depends python-pyassimp and then sudo -H pip install pyassimp==4.1.3 as you said. I'm getting the same error, */usr/local/lib/python2.7/dist-packages/pip/vendor/requests/init_.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown. warnings.warn(warning, RequestsDependencyWarning) DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting pyassimp==4.1.3 Installing collected packages: pyassimp Found existing installation: pyassimp 4.1.4 Cannot uninstall 'pyassimp'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. * I assume that, I installed many number of python version and the pyassimp is broken. Any advice please!
Asked by ArunPrasanth on 2019-04-03 05:04:28 UTC
Comments