kjyv / FloBaRoID

Framework for dynamical system identification of floating-base rigid body tree structures
GNU Lesser General Public License v3.0
61 stars 26 forks source link

Installed ROS | rospkg.common.ResourceNotFound: lwr_description #2

Closed mouhyemen closed 5 years ago

mouhyemen commented 6 years ago

I am not sure what the error could be here. Is FloBaRoID heavily dependent on ROS packages? I am getting an error around lwr_description and I am not sure how to work around this.

This is my output after running /trajectory.py (command highlighted in yellow, error in red): image

kjyv commented 6 years ago

No, there is no strong dependency on ROS. In this case, there is some code that tries to find the lwr meshes from a ROS package for the Kuka LWR but it seems I forgot to handle the case when ROS is installed but the package is not there. Could you try removing the lines 466 to 471 in helpers.py (and un-indent the remaining lines one level)? This will try to find the files from the file paths in the URDF. (I don't have a machine with everything installed atm to properly change the code for you).

mouhyemen commented 6 years ago

Hey, that helped. Now, i am getting a seg fault:

Error:

mouhyemen@khan-msi:~/desktop/research/FloBaRoID$ ./trajectory.py --filename jim.trajectory.npz --config configs/testing.yaml --model model/tes
tingkuka.urdf 
loaded model model/testingkuka.urdf
# DOFs: 7
Joints: ['lwr_0_joint', 'lwr_1_joint', 'lwr_2_joint', 'lwr_3_joint', 'lwr_4_joint', 'lwr_5_joint', 'lwr_6_joint']
# regressor outputs: 7
# links: 8 (+ 0 fake)
{0: 'lwr_base_link', 1: 'lwr_1_link', 2: 'lwr_2_link', 3: 'lwr_3_link', 4: 'lwr_4_link', 5: 'lwr_5_link', 6: 'lwr_6_link', 7: 'lwr_7_link'}
# params: 80 (94 will be identified)
loaded random structural regressor from model/testingkuka.urdf.regressor.npz
broken
loaded model model/testingkuka.urdf
# DOFs: 7
Joints: ['lwr_0_joint', 'lwr_1_joint', 'lwr_2_joint', 'lwr_3_joint', 'lwr_4_joint', 'lwr_5_joint', 'lwr_6_joint']
# regressor outputs: 7
# links: 8 (+ 0 fake)
{0: 'lwr_base_link', 1: 'lwr_1_link', 2: 'lwr_2_link', 3: 'lwr_3_link', 4: 'lwr_4_link', 5: 'lwr_5_link', 6: 'lwr_6_link', 7: 'lwr_7_link'}
# params: 80 (94 will be identified)
loaded random structural regressor from model/testingkuka.urdf.regressor.npz
Running global optimization with ALPSO
call #1/612
wf 0.5
a [[0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3]]
b [[0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3]]
q [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[khan-msi:16375] *** Process received signal ***
[khan-msi:16375] Signal: Segmentation fault (11)
[khan-msi:16375] Signal code: Address not mapped (1)
[khan-msi:16375] Failing at address: (nil)
[khan-msi:16375] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fde2a53f390]
[khan-msi:16375] [ 1] /usr/local/lib/python2.7/dist-packages/fcl/fcl.so(+0xcde6)[0x7fdde80e1de6]
[khan-msi:16375] [ 2] /usr/local/lib/python2.7/dist-packages/fcl/fcl.so(+0x312f6)[0x7fdde81062f6]
[khan-msi:16375] [ 3] python[0x4aa8c5]
[khan-msi:16375] [ 4] python(PyEval_EvalFrameEx+0x578f)[0x4c15bf]
[khan-msi:16375] [ 5] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [ 6] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16375] [ 7] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [ 8] python[0x4d55f3]
[khan-msi:16375] [ 9] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16375] [10] python(PyEval_EvalFrameEx+0x2f0d)[0x4bed3d]
[khan-msi:16375] [11] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [12] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16375] [13] python(PyEval_EvalFrameEx+0x553f)[0x4c136f]
[khan-msi:16375] [14] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [15] python[0x4d55f3]
[khan-msi:16375] [16] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16375] [17] python(PyEval_EvalFrameEx+0x2f0d)[0x4bed3d]
[khan-msi:16375] [18] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [19] python[0x4d55f3]
[khan-msi:16375] [20] python[0x4eebee]
[khan-msi:16375] [21] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16375] [22] python[0x548253]
[khan-msi:16375] [23] python(PyEval_EvalFrameEx+0x578f)[0x4c15bf]
[khan-msi:16375] [24] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [25] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16375] [26] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [27] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16375] [28] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16375] [29] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16375] *** End of error message ***
Segmentation fault (core dumped)
kjyv commented 6 years ago

Ew, that seems to be coming from fcl (collision detection library). I'm afraid I don't know why that happens. Which version did you install, which models are you using?

kjyv commented 6 years ago

The readme says "fcl 0.5.0 and python-fcl (from https://github.com/jf---/python-fcl) (possibly disable octomap if there are errors)" so I guess you should try with that first. I did commit some fixes to this fork specifically. Generally, follow all the specific requirements I put in the readme as some things needed to be fixed here and there so I could use them.

mouhyemen commented 6 years ago

I followed the steps and currently I am facing several issues with python-fcl.

I installed libccd (from github), octomap (from github), Cython 0.28.1 (from PyPI, got latest tar). Then installed fcl.

Finally, when I try to install python-fcl using _sudo python setup.py buildext , this is what I get.

sudo python setup.py build_ext
running build
running build_py
running build_ext
skipping 'fcl/fcl.cpp' Cython extension (up-to-date)
building 'fcl.fcl' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -c fcl/fcl.cpp -o build/temp.linux-x86_64-2.7/fcl/fcl.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1777:0,
                 from /usr/include/python2.7/numpy/ndarrayobject.h:18,
                 from /usr/include/python2.7/numpy/arrayobject.h:4,
                 from fcl/fcl.cpp:606:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^
In file included from /usr/local/include/fcl/geometry/collision_geometry.h:43:0,
                 from /usr/local/include/fcl/narrowphase/collision_object.h:43,
                 from /usr/local/include/fcl/broadphase/broadphase_collision_manager.h:44,
                 from /usr/local/include/fcl/broadphase/broadphase_bruteforce.h:42,
                 from /usr/include/fcl/broadphase/broadphase.h:232,
                 from fcl/fcl.cpp:596:
/usr/local/include/fcl/math/bv/AABB.h:51:1: error: expected primary-expression before ‘public’
 public:
 ^
/usr/local/include/fcl/math/bv/AABB.h:51:1: error: expected ‘}’ before ‘public’
/usr/local/include/fcl/math/bv/AABB.h:51:1: error: expected ‘;’ before ‘public’
/usr/local/include/fcl/math/bv/AABB.h:56:3: error: ‘Vector3’ does not name a type
   Vector3<S> min_;
   ^
/usr/local/include/fcl/math/bv/AABB.h:59:3: error: ‘Vector3’ does not name a type
   Vector3<S> max_;
   ^
/usr/local/include/fcl/math/bv/AABB.h:62:9: error: expected constructor, destructor, or type conversion before ‘;’ token
   AABB();
         ^
/usr/local/include/fcl/math/bv/AABB.h:65:14: error: ‘Vector3’ does not name a type
   AABB(const Vector3<S>& v);
              ^
/usr/local/include/fcl/math/bv/AABB.h:65:21: error: expected ‘,’ or ‘...’ before ‘<’ token
   AABB(const Vector3<S>& v);
                     ^
/usr/local/include/fcl/math/bv/AABB.h:65:28: error: expected constructor, destructor, or type conversion before ‘;’ token
   AABB(const Vector3<S>& v);
                            ^
/usr/local/include/fcl/math/bv/AABB.h:68:14: error: ‘Vector3’ does not name a type
   AABB(const Vector3<S>& a, const Vector3<S>&b);
              ^
/usr/local/include/fcl/math/bv/AABB.h:68:21: error: expected ‘,’ or ‘...’ before ‘<’ token
   AABB(const Vector3<S>& a, const Vector3<S>&b);
                     ^
/usr/local/include/fcl/math/bv/AABB.h:68:48: error: expected constructor, destructor, or type conversion before ‘;’ token
   AABB(const Vector3<S>& a, const Vector3<S>&b);
                                                ^
/usr/local/include/fcl/math/bv/AABB.h:71:19: error: ‘S’ was not declared in this scope
   AABB(const AABB<S>& core, const Vector3<S>& delta);
                   ^
/usr/local/include/fcl/math/bv/AABB.h:71:14: error: ‘AABB<<expression error> >’ does not name a type
   AABB(const AABB<S>& core, const Vector3<S>& delta);
              ^
/usr/local/include/fcl/math/bv/AABB.h:71:35: error: ‘Vector3’ does not name a type
   AABB(const AABB<S>& core, const Vector3<S>& delta);
                                   ^
/usr/local/include/fcl/math/bv/AABB.h:71:42: error: expected ‘,’ or ‘...’ before ‘<’ token
   AABB(const AABB<S>& core, const Vector3<S>& delta);
                                          ^
/usr/local/include/fcl/math/bv/AABB.h:71:53: error: expected constructor, destructor, or type conversion before ‘;’ token
   AABB(const AABB<S>& core, const Vector3<S>& delta);
                                                     ^
/usr/local/include/fcl/math/bv/AABB.h:74:14: error: ‘Vector3’ does not name a type
   AABB(const Vector3<S>& a, const Vector3<S>& b, const Vector3<S>& c);
              ^
/usr/local/include/fcl/math/bv/AABB.h:74:21: error: expected ‘,’ or ‘...’ before ‘<’ token
   AABB(const Vector3<S>& a, const Vector3<S>& b, const Vector3<S>& c);
                     ^
/usr/local/include/fcl/math/bv/AABB.h:74:70: error: expected constructor, destructor, or type conversion before ‘;’ token
   AABB(const Vector3<S>& a, const Vector3<S>& b, const Vector3<S>& c);
                                                                      ^
/usr/local/include/fcl/math/bv/AABB.h:77:27: error: ‘S’ was not declared in this scope
   bool overlap(const AABB<S>& other) const;
                           ^
/usr/local/include/fcl/math/bv/AABB.h:77:22: error: ‘AABB<<expression error> >’ does not name a type
   bool overlap(const AABB<S>& other) const;
                      ^
/usr/local/include/fcl/math/bv/AABB.h:77:38: error: non-member function ‘bool fcl::overlap(const int&)’ cannot have cv-qualifier
   bool overlap(const AABB<S>& other) const;
                                      ^
/usr/local/include/fcl/math/bv/AABB.h:80:27: error: ‘S’ was not declared in this scope
   bool contain(const AABB<S>& other) const;
                           ^
/usr/local/include/fcl/math/bv/AABB.h:80:22: error: ‘AABB<<expression error> >’ does not name a type
   bool contain(const AABB<S>& other) const;
                      ^
/usr/local/include/fcl/math/bv/AABB.h:80:38: error: non-member function ‘bool fcl::contain(const int&)’ cannot have cv-qualifier
   bool contain(const AABB<S>& other) const;
                                      ^
/usr/local/include/fcl/math/bv/AABB.h:83:31: error: ‘S’ was not declared in this scope
   bool axisOverlap(const AABB<S>& other, int axis_id) const;
                               ^
/usr/local/include/fcl/math/bv/AABB.h:83:26: error: ‘AABB<<expression error> >’ does not name a type
   bool axisOverlap(const AABB<S>& other, int axis_id) const;
                          ^
/usr/local/include/fcl/math/bv/AABB.h:83:55: error: non-member function ‘bool fcl::axisOverlap(const int&, int)’ cannot have cv-qualifier
   bool axisOverlap(const AABB<S>& other, int axis_id) const;
                                                       ^
/usr/local/include/fcl/math/bv/AABB.h:86:27: error: ‘S’ was not declared in this scope
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                           ^
/usr/local/include/fcl/math/bv/AABB.h:86:22: error: ‘AABB<<expression error> >’ does not name a type
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                      ^
/usr/local/include/fcl/math/bv/AABB.h:86:43: error: ‘S’ was not declared in this scope
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                                           ^
/usr/local/include/fcl/math/bv/AABB.h:86:38: error: expected identifier
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                                      ^
/usr/local/include/fcl/math/bv/AABB.h:86:45: error: expected unqualified-id before ‘&’ token
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                                             ^
/usr/local/include/fcl/math/bv/AABB.h:86:45: error: expected ‘)’ before ‘&’ token
/usr/local/include/fcl/math/bv/AABB.h:86:47: error: expected initializer before ‘overlap_part’
   bool overlap(const AABB<S>& other, AABB<S>& overlap_part) const;
                                               ^
/usr/local/include/fcl/math/bv/AABB.h:89:22: error: ‘Vector3’ does not name a type
   bool contain(const Vector3<S>& p) const;
                      ^
/usr/local/include/fcl/math/bv/AABB.h:89:29: error: expected ‘,’ or ‘...’ before ‘<’ token
   bool contain(const Vector3<S>& p) const;
                             ^
/usr/local/include/fcl/math/bv/AABB.h:89:37: error: non-member function ‘bool fcl::contain(int)’ cannot have cv-qualifier
   bool contain(const Vector3<S>& p) const;
                                     ^
/usr/local/include/fcl/math/bv/AABB.h:92:8: error: ‘S’ was not declared in this scope
   AABB<S>& operator += (const Vector3<S>& p);
        ^
/usr/local/include/fcl/math/bv/AABB.h:92:3: error: ‘AABB<<expression error> >’ does not name a type
   AABB<S>& operator += (const Vector3<S>& p);
   ^
/usr/local/include/fcl/math/bv/AABB.h:95:8: error: ‘S’ was not declared in this scope
   AABB<S>& operator += (const AABB<S>& other);
        ^
/usr/local/include/fcl/math/bv/AABB.h:95:3: error: ‘AABB<<expression error> >’ does not name a type
   AABB<S>& operator += (const AABB<S>& other);
   ^
/usr/local/include/fcl/math/bv/AABB.h:98:8: error: ‘S’ was not declared in this scope
   AABB<S> operator + (const AABB<S>& other) const;
        ^
/usr/local/include/fcl/math/bv/AABB.h:98:3: error: ‘AABB<<expression error> >’ does not name a type
   AABB<S> operator + (const AABB<S>& other) const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:101:3: error: ‘S’ does not name a type
   S width() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:104:3: error: ‘S’ does not name a type
   S height() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:107:3: error: ‘S’ does not name a type
   S depth() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:110:3: error: ‘S’ does not name a type
   S volume() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:113:3: error: ‘S’ does not name a type
   S size() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:116:3: error: ‘S’ does not name a type
   S radius() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:119:3: error: ‘Vector3’ does not name a type
   Vector3<S> center() const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:123:3: error: ‘S’ does not name a type
   S distance(const AABB<S>& other, Vector3<S>* P, Vector3<S>* Q) const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:126:3: error: ‘S’ does not name a type
   S distance(const AABB<S>& other) const;
   ^
/usr/local/include/fcl/math/bv/AABB.h:129:25: error: ‘S’ was not declared in this scope
   bool equal(const AABB<S>& other) const;
                         ^
/usr/local/include/fcl/math/bv/AABB.h:129:20: error: ‘AABB<<expression error> >’ does not name a type
   bool equal(const AABB<S>& other) const;
                    ^
/usr/local/include/fcl/math/bv/AABB.h:129:36: error: non-member function ‘bool fcl::equal(const int&)’ cannot have cv-qualifier
   bool equal(const AABB<S>& other) const;
                                    ^
/usr/local/include/fcl/math/bv/AABB.h:133:8: error: ‘S’ was not declared in this scope
   AABB<S>& expand(const Vector3<S>& delta);
        ^
/usr/local/include/fcl/math/bv/AABB.h:133:3: error: ‘AABB<<expression error> >’ does not name a type
   AABB<S>& expand(const Vector3<S>& delta);
   ^
/usr/local/include/fcl/math/bv/AABB.h:136:8: error: ‘S’ was not declared in this scope
   AABB<S>& expand(const AABB<S>& core, S ratio);
        ^
/usr/local/include/fcl/math/bv/AABB.h:136:3: error: ‘AABB<<expression error> >’ does not name a type
   AABB<S>& expand(const AABB<S>& core, S ratio);
   ^
/usr/local/include/fcl/math/bv/AABB.h:139:15: error: ‘AABB’ does not name a type
 using AABBf = AABB<float>;
               ^
/usr/local/include/fcl/math/bv/AABB.h:140:15: error: ‘AABB’ does not name a type
 using AABBd = AABB<double>;
               ^
/usr/local/include/fcl/math/bv/AABB.h:144:1: error: ‘AABB’ does not name a type
 AABB<S> translate(
 ^
/usr/local/include/fcl/math/bv/AABB.h:147:1: error: expected declaration before ‘}’ token
 } // namespace fcl

This error occurs AFTER I edited fcl/fcl.cpp script to include import numpy as np before cimport numpy as np Not doing so, gives a different error which is the following:

sudo python setup.py build
running build
running build_py
running build_ext
cythoning fcl/fcl.pyx to fcl/fcl.cpp

Error compiling Cython file:
------------------------------------------------------------
...
        obj = Cylinder(0, 0)
        memcpy(obj.thisptr, geom, sizeof(defs.Cylinder))
        return obj

    elif geom.getNodeType() == defs.GEOM_TRIANGLE:
        obj = TriangleP(np.zeros(3), np.zeros(3), np.zeros(3))
                         ^
------------------------------------------------------------

fcl/fcl.pyx:460:26: cimported module has no attribute 'zeros'

Error compiling Cython file:
------------------------------------------------------------
...
        obj = Cylinder(0, 0)
        memcpy(obj.thisptr, geom, sizeof(defs.Cylinder))
        return obj

    elif geom.getNodeType() == defs.GEOM_TRIANGLE:
        obj = TriangleP(np.zeros(3), np.zeros(3), np.zeros(3))
                                      ^
------------------------------------------------------------

fcl/fcl.pyx:460:39: cimported module has no attribute 'zeros'

Error compiling Cython file:
------------------------------------------------------------
...
        obj = Cylinder(0, 0)
        memcpy(obj.thisptr, geom, sizeof(defs.Cylinder))
        return obj

    elif geom.getNodeType() == defs.GEOM_TRIANGLE:
        obj = TriangleP(np.zeros(3), np.zeros(3), np.zeros(3))
                                                   ^
------------------------------------------------------------

fcl/fcl.pyx:460:52: cimported module has no attribute 'zeros'

Error compiling Cython file:
------------------------------------------------------------
...
        obj = TriangleP(np.zeros(3), np.zeros(3), np.zeros(3))
        memcpy(obj.thisptr, geom, sizeof(defs.TriangleP))
        return obj

    elif geom.getNodeType() == defs.GEOM_HALFSPACE:
        obj = Halfspace(np.zeros(3), 0)
                         ^
------------------------------------------------------------

fcl/fcl.pyx:465:26: cimported module has no attribute 'zeros'

Error compiling Cython file:
------------------------------------------------------------
...
        obj = Halfspace(np.zeros(3), 0)
        memcpy(obj.thisptr, geom, sizeof(defs.Halfspace))
        return obj

    elif geom.getNodeType() == defs.GEOM_PLANE:
        obj = Plane(np.zeros(3), 0)
                     ^
------------------------------------------------------------

fcl/fcl.pyx:470:22: cimported module has no attribute 'zeros'
building 'fcl.fcl' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -c fcl/fcl.cpp -o build/temp.linux-x86_64-2.7/fcl/fcl.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
fcl/fcl.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

        obj = TriangleP(np.zeros(3), np.zeros(3), np.zeros(3))
        memcpy(obj.thisptr, geom, sizeof(defs.TriangleP))
        return obj

    elif geom.getNodeType() == defs.GEOM_HALFSPACE:
        obj = Halfspace(np.zeros(3), 0)
                         ^
------------------------------------------------------------

fcl/fcl.pyx:465:26: cimported module has no attribute 'zeros'

Error compiling Cython file:
------------------------------------------------------------
...
        obj = Halfspace(np.zeros(3), 0)
        memcpy(obj.thisptr, geom, sizeof(defs.Halfspace))
        return obj

    elif geom.getNodeType() == defs.GEOM_PLANE:
        obj = Plane(np.zeros(3), 0)
                     ^
------------------------------------------------------------

fcl/fcl.pyx:470:22: cimported module has no attribute 'zeros'
building 'fcl.fcl' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -c fcl/fcl.cpp -o build/temp.linux-x86_64-2.7/fcl/fcl.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
fcl/fcl.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

How did you go about installing python-fcl? I think this seems to be the last step before getting flobaroid running.

kjyv commented 6 years ago

I don't find the time atm to properly test this again, sorry. But possibly using newest cython breaks things, what about that numpy warning? Anyhow, I guess it would be good to open an issue on the python-fcl issue tracker for this.

mouhyemen commented 6 years ago

Hi,

On python-Fcl, I’m unable to open my issues.

Which version of cython are you using? Really needed your help to get this working.

On 11 Apr 2018, at 3:52 am, Stefan Bethge notifications@github.com wrote:

I don't find the time atm to properly test this again, sorry. But possibly using newest cython breaks things, what about that numpy warning? Anyhow, I guess it would be good to open an issue on the python-fcl issue tracker for this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

kjyv commented 6 years ago

I see, they disabled the issue tracker, possibly to keep issues in one place. Have you seen https://github.com/neka-nat/python-fcl/issues/7 ? As I've written in the readme, try compiling without octomap (but I'm not sure if these errors are the reason I recommended against it). There also is another fork from the jf one with improvements, https://github.com/BerkeleyAutomation/python-fcl/. Not sure if this works better for you but it might be worth a try.

mouhyemen commented 6 years ago

Thanks for responding. I went through the BerkeleyAutomation page and did pip install python-fcl I get a seg fault when running trajectory.py

mouhyemen@khan-msi:~/desktop/research/FloBaRoID$ ./trajectory.py --filename jim.trajectory.npz --config configs/testing.yaml --model model/testingkuka.urdf 
loaded model model/testingkuka.urdf
# DOFs: 7
Joints: ['lwr_0_joint', 'lwr_1_joint', 'lwr_2_joint', 'lwr_3_joint', 'lwr_4_joint', 'lwr_5_joint', 'lwr_6_joint']
# regressor outputs: 7
# links: 8 (+ 0 fake)
{0: 'lwr_base_link', 1: 'lwr_1_link', 2: 'lwr_2_link', 3: 'lwr_3_link', 4: 'lwr_4_link', 5: 'lwr_5_link', 6: 'lwr_6_link', 7: 'lwr_7_link'}
# params: 80 (94 will be identified)
loaded random structural regressor from model/testingkuka.urdf.regressor.npz
broken
loaded model model/testingkuka.urdf
# DOFs: 7
Joints: ['lwr_0_joint', 'lwr_1_joint', 'lwr_2_joint', 'lwr_3_joint', 'lwr_4_joint', 'lwr_5_joint', 'lwr_6_joint']
# regressor outputs: 7
# links: 8 (+ 0 fake)
{0: 'lwr_base_link', 1: 'lwr_1_link', 2: 'lwr_2_link', 3: 'lwr_3_link', 4: 'lwr_4_link', 5: 'lwr_5_link', 6: 'lwr_6_link', 7: 'lwr_7_link'}
# params: 80 (94 will be identified)
loaded random structural regressor from model/testingkuka.urdf.regressor.npz
Running global optimization with ALPSO
call #1/612
wf 0.5
a [[0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3]]
b [[0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3], [0.3, 0.3, 0.3, 0.3]]
q [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[khan-msi:16941] *** Process received signal ***
[khan-msi:16941] Signal: Segmentation fault (11)
[khan-msi:16941] Signal code: Address not mapped (1)
[khan-msi:16941] Failing at address: (nil)
[khan-msi:16941] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f4041e35390]
[khan-msi:16941] [ 1] /usr/local/lib/python2.7/dist-packages/fcl/fcl.so(+0xe3d6)[0x7f3fffa933d6]
[khan-msi:16941] [ 2] /usr/local/lib/python2.7/dist-packages/fcl/fcl.so(+0x31b16)[0x7f3fffab6b16]
[khan-msi:16941] [ 3] python[0x4aa8c5]
[khan-msi:16941] [ 4] python(PyEval_EvalFrameEx+0x578f)[0x4c15bf]
[khan-msi:16941] [ 5] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [ 6] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16941] [ 7] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [ 8] python[0x4d55f3]
[khan-msi:16941] [ 9] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16941] [10] python(PyEval_EvalFrameEx+0x2f0d)[0x4bed3d]
[khan-msi:16941] [11] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [12] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16941] [13] python(PyEval_EvalFrameEx+0x553f)[0x4c136f]
[khan-msi:16941] [14] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [15] python[0x4d55f3]
[khan-msi:16941] [16] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16941] [17] python(PyEval_EvalFrameEx+0x2f0d)[0x4bed3d]
[khan-msi:16941] [18] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [19] python[0x4d55f3]
[khan-msi:16941] [20] python[0x4eebee]
[khan-msi:16941] [21] python(PyObject_Call+0x3e)[0x4a577e]
[khan-msi:16941] [22] python[0x548253]
[khan-msi:16941] [23] python(PyEval_EvalFrameEx+0x578f)[0x4c15bf]
[khan-msi:16941] [24] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [25] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16941] [26] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [27] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16941] [28] python(PyEval_EvalCodeEx+0x306)[0x4b9ab6]
[khan-msi:16941] [29] python(PyEval_EvalFrameEx+0x603f)[0x4c1e6f]
[khan-msi:16941] *** End of error message ***
Segmentation fault (core dumped)
mouhyemen commented 6 years ago

Have you seen neka-nat/python-fcl#7 ?

Yes, I had gone through this previously. I tried changing versions of Cython too. Didn't help.

I disabled octomap, re-installed fcl, and then tried installing python-fcl. I get the same error.

Your version of numpy, cython, python-fcl (whichever you installed from) might give some edge.

Also, I don't think I can go with conda approach as @jf--- suggests, because all python packages/libraries are installed in my /usr/ system. Using conda I think creates its own anaconda python version

kjyv commented 6 years ago

It seems you installed the same initial version of python-fcl (apparently the berkeley fork is at pypi now). To be honest, I don't have a system anymore where all of this is installed so I would have to go through the same steps and see why fcl/python-fcl is crashing. I developed all of this a bit more than a year ago and it worked fine on an ubuntu 16.04 machine (I think, maybe also 15.10). If you wan't to be close to what I did, then stick to the jf version (maybe even a few commits back but I doubt too much has changed). I don't think you need conda. If you have fcl 0.5 in apt, use that one. Use cython from apt too if it's not super old, I never built that from source.

kjyv commented 6 years ago

Since you have solved your problem, could you write here what helped in the end?

mouhyemen commented 6 years ago

Problem solved.

Solution: Installed appropriate fcl 0.5.0 library from github. Not the latest one from github. git clone -b fcl-0.5 https://github.com/flexible-collision-library/fcl.git

You might need to update LIBRARY PATH if you face an error for fcl. I included this in my bash file: export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Also, for installing python-fcl, link to the right directories: sudo python setup.py build_ext --include-dirs /usr/local/include/fcl/ --library-dirs /usr/local/lib/

kjyv commented 6 years ago

Ah well, yeah the current git could of course have some incompatible or unstable changes. As written in the readme, 0.5 is the correct version. Instead of cloning the tag you can also directly download the 0.5 archive from the release page.