Open hemanthsarabu opened 4 years ago
I'm stuck at this problem :( , did you fix it? hopefully can get some help Thanks!
when I met the first problem Segmentation fault (core dumped)
, what I do is changing the path related to 'pyconfig.h'. In my case is from "/usr/include/python2.7/" to "/usr/include/python3.6/". And I edit the 'ur_kin_py.cpp' from
#include <boost/numpy.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_array.hpp>
namespace p = boost::python;
namespace np = boost::numpy;
to
#include <boost/python.hpp>
#include <boost/python/numpy.hpp>
namespace p = boost::python;
namespace np = boost::python::numpy;
For the second problem, I think it would be good to try somethings like -lboost_python3 -lboost_numpy3
when linking in cmake file.
Please assign this to me :)
While you're at it, you may want to take a look at https://github.com/ros-industrial/universal_robot/projects/1 as well.
There may be PRs there which affect this issue.
So building using pybind as suggested in #453 seems to solve all python3 problems. I have tested on Python3.6 and 3.8, it seems to work fine.
The only problem is to fix the test_analytical_ik.py for python3 compatibility.
So how we should proceed ? I can try to fix/rebase the PR #453 and python3 compitibility but this might break other IK related PR.
Would you have an idea of how many of those PRs would get into trouble? All of them?
This one #459 and maybe #358 (which combine 3 PR)
What about getting those merged first?
Would that be an option?
Yes for #358.
For #459 it's pretty much useless if we merge #453 (or the rebased / updated version)
I'd be ok with merging #358 into melodic-devel-staging
.
The rest of the IK related PRs should then also go into that branch.
Could you 'review' #358 and post a thumbs up there?
(you did test it, didn't you ? ;) )
I am trying to build and run ur_kin_py for a python 3 catkin workspace but have not been successful so far. I followed instructions from here, and replaced the line in the CMake file from
find_package(PythonLibs 2.7 REQUIRED)
tofind_package(PythonLibs 3.6 REQUIRED)
and rancatkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
.When I then try to run
test_analytical_ik.py
, I get :Segmentation fault (core dumped)
And when I try to runimport ur_kinematics.ur_kin_py.inverse
in a python session, I seeImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1: undefined symbol: PyClass_Type
. I suspect I am building the library against boost for python 2 and not 3 and I'm not sure how to fix that. Has anyone dealt with this before?Any help would be greatly appreciated!
Thanks!