Robotics StackExchange | Archived questions

rgbdslam_v2 build error indigo

Hi, I'm trying to build RGBDSLAMv2 http://felixendres.github.io/rgbdslamv2/ under ros indigo I'm not sure if its possible in general. I get: fatal error: opencv2/nonfree/nonfree.hpp: Datei oder Verzeichnis nicht gefunden Seems that I have opencv2 installed (see dpkg output below). So why do I get this error?

...
[ 63%] [ 64%] [ 65%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/openni_listener.o
[ 66%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/loop_closing.o
Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/misc.o
Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/ColorOctomapServer.o
/home/ros/catkin_ws/src/rgbdslam_v2-hydro/src/misc.cpp:40:39: fatal error: opencv2/nonfree/nonfree.hpp: Datei oder Verzeichnis nicht gefunden
 #include "opencv2/nonfree/nonfree.hpp"
                                       ^
compilation terminated.
/home/ros/catkin_ws/src/rgbdslam_v2-hydro/src/openni_listener.cpp: In member function ‘void OpenNIListener::loadBag(std::string)’:
/home/ros/catkin_ws/src/rgbdslam_v2-hydro/src/openni_listener.cpp:271:91: error: ‘const struct tf::tfMessage_<std::allocator<void> >’ has no member named ‘__connection_header’
           boost::shared_ptr<std::map<std::string, std::string> > msg_header_map = tf_msg->__connection_header;
                                                                                           ^
[ 67%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/scoped_timer.o
[ 68%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/icp.o
[ 69%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/matching_result.o
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/misc.o] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/openni_listener.o] Fehler 1
make[1]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/all] Fehler 2
make: *** [all] Fehler 2
Invoking "make" failed

$ dpkg -l *opencv*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                           Version              Architektur          Beschreibung
+++-==============================-====================-====================-==================================================================
ii  libopencv-calib3d-dev:amd64    2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-calib3d
ii  libopencv-calib3d2.4:amd64     2.4.8+dfsg1-2ubuntu1 amd64                computer vision Camera Calibration library
ii  libopencv-contrib-dev:amd64    2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-contrib
ii  libopencv-contrib2.4:amd64     2.4.8+dfsg1-2ubuntu1 amd64                computer vision contrib library
ii  libopencv-core-dev:amd64       2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-core
ii  libopencv-core2.4:amd64        2.4.8+dfsg1-2ubuntu1 amd64                computer vision core library
ii  libopencv-dev                  2.4.8+dfsg1-2ubuntu1 amd64                development files for opencv
ii  libopencv-features2d-dev:amd64 2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-features2d
ii  libopencv-features2d2.4:amd64  2.4.8+dfsg1-2ubuntu1 amd64                computer vision Feature Detection and Descriptor Extraction librar
ii  libopencv-flann-dev:amd64      2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-flann
ii  libopencv-flann2.4:amd64       2.4.8+dfsg1-2ubuntu1 amd64                computer vision Clustering and Search in Multi-Dimensional spaces 
ii  libopencv-gpu-dev:amd64        2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-gpu2.4
ii  libopencv-gpu2.4:amd64         2.4.8+dfsg1-2ubuntu1 amd64                computer vision GPU library
ii  libopencv-highgui-dev:amd64    2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-highgui
ii  libopencv-highgui2.4:amd64     2.4.8+dfsg1-2ubuntu1 amd64                computer vision High-level GUI and Media I/O library
ii  libopencv-imgproc-dev:amd64    2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-imgproc
ii  libopencv-imgproc2.4:amd64     2.4.8+dfsg1-2ubuntu1 amd64                computer vision Image Processing library
ii  libopencv-legacy-dev:amd64     2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-legacy
ii  libopencv-legacy2.4:amd64      2.4.8+dfsg1-2ubuntu1 amd64                computer vision legacy library
ii  libopencv-ml-dev:amd64         2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-ml
ii  libopencv-ml2.4:amd64          2.4.8+dfsg1-2ubuntu1 amd64                computer vision Machine Learning library
ii  libopencv-objdetect-dev:amd64  2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-objdetect
ii  libopencv-objdetect2.4:amd64   2.4.8+dfsg1-2ubuntu1 amd64                computer vision Object Detection library
ii  libopencv-ocl-dev:amd64        2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-ocl2.4
ii  libopencv-ocl2.4:amd64         2.4.8+dfsg1-2ubuntu1 amd64                computer vision OpenCL support library
ii  libopencv-photo-dev:amd64      2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-photo2.4
ii  libopencv-photo2.4:amd64       2.4.8+dfsg1-2ubuntu1 amd64                computer vision computational photography library
ii  libopencv-stitching-dev:amd64  2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-stitching2.4
ii  libopencv-stitching2.4:amd64   2.4.8+dfsg1-2ubuntu1 amd64                computer vision image stitching library
ii  libopencv-superres-dev:amd64   2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-superres2.4
ii  libopencv-superres2.4:amd64    2.4.8+dfsg1-2ubuntu1 amd64                computer vision Super Resolution library
ii  libopencv-ts-dev:amd64         2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-ts2.4
ii  libopencv-ts2.4:amd64          2.4.8+dfsg1-2ubuntu1 amd64                computer vision ts library
ii  libopencv-video-dev:amd64      2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-video
ii  libopencv-video2.4:amd64       2.4.8+dfsg1-2ubuntu1 amd64                computer vision Video analysis library
ii  libopencv-videostab-dev:amd64  2.4.8+dfsg1-2ubuntu1 amd64                development files for libopencv-videostab2.4
ii  libopencv-videostab2.4:amd64   2.4.8+dfsg1-2ubuntu1 amd64                computer vision video stabilization library
ii  libopencv2.4-java              2.4.8+dfsg1-2ubuntu1 all                  Java bindings for the computer vision library
ii  libopencv2.4-jni               2.4.8+dfsg1-2ubuntu1 amd64                Java jni library for the computer vision library
ii  opencv-data                    2.4.8+dfsg1-2ubuntu1 all                  development data for opencv
ii  python-opencv                  2.4.8+dfsg1-2ubuntu1 amd64                Python bindings for the computer vision library
un  python2.3-opencv               <keine>              <keine>              (keine Beschreibung vorhanden)
un  python2.7-opencv               <keine>              <keine>              (keine Beschreibung vorhanden)
ii  ros-indigo-vision-opencv       1.11.4-0trusty-20140 amd64                Packages for interfacing ROS with OpenCV, a library of programming

Asked by Pat on 2014-08-20 01:45:42 UTC

Comments

Answers

I'd check the paths relative to your build environment and opencv2. The compiler can't find "#include "opencv2/nonfree/nonfree.hpp""

Asked by MarkyMark2012 on 2014-08-20 02:20:24 UTC

Comments

Checked already. I have nowhere nonfree.hpp in my system. Seems to be that its part from another opencv version. Now I don't know what to do.

ros@host1:~/catkin_ws$ sudo find / -name nonfree.hpp
[sudo] password for ros: 
ros@host1:~/catkin_ws$ sudo find / -type d -name opencv2
/usr/include/opencv2
ros@host1:~/catkin_ws$ ll /usr/include/opencv2
insgesamt 104
drwxr-xr-x  20 root root  4096 Aug 16 12:21 ./
drwxr-xr-x 128 root root 20480 Aug 17 13:49 ../
drwxr-xr-x   2 root root  4096 Aug 16 12:20 calib3d/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 contrib/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 core/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 features2d/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 flann/
drwxr-xr-x   3 root root  4096 Aug 16 12:21 gpu/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 highgui/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 imgproc/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 legacy/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 ml/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 objdetect/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 ocl/
-rw-r--r--   1 root root  2751 Jan 28  2014 opencv.hpp
-rw-r--r--   1 root root   644 Feb 25 13:42 opencv_modules.hpp
drwxr-xr-x   2 root root  4096 Aug 16 12:21 photo/
drwxr-xr-x   3 root root  4096 Aug 16 12:21 stitching/
drwxr-xr-x   2 root root  4096 Aug 16 12:21 superres/
drwxr-xr-x   2 root root  4096 Aug 16 12:21 ts/
drwxr-xr-x   2 root root  4096 Aug 16 12:20 video/
drwxr-xr-x   2 root root  4096 Aug 16 12:21 videostab/

Asked by Pat on 2014-08-20 03:22:51 UTC

I think you need to download these files specifically (Suspect someone can confirm)

https://code.google.com/p/qtphotomanager/source/browse/thirdparty/opencv/include/?r=74c8bb7f8fb62ef3819333ec46ac26a290b61ab7#https://code.google.com/p/qtphotomanager/source/browse/thirdparty/opencv/include?r=74c8bb7f8fb62ef3819333ec46ac26a290b61ab7#

and some info about it here (not ROS related but probably :

http://answers.opencv.org/question/19882/opencv2nonfreefeatures2dhpp-file-not-getting-in/

Might be worth commenting the file out and see how you get on

Asked by MarkyMark2012 on 2014-08-20 03:58:50 UTC

Thanks Mark, that helped to pass the step regarding nonfree.hpp. Now there is stil below error present. Seems to be another version problem. Yet not clear how to fix that.

...
[ 63%] [ 64%] [ 65%] [ 66%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/openni_listener.o
Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/transformation_estimation_euclidean.o
Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/misc.o
Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/transformation_estimation.o
/home/ros/catkin_ws/src/rgbdslam_v2-hydro/src/openni_listener.cpp: In member function ‘void OpenNIListener::loadBag(std::string)’:
/home/ros/catkin_ws/src/rgbdslam_v2-hydro/src/openni_listener.cpp:271:91: error: ‘const struct tf::tfMessage_<std::allocator<void> >’ has no member named ‘__connection_header’
           boost::shared_ptr<std::map<std::string, std::string> > msg_header_map = tf_msg->__connection_header;
                                                                                           ^
[ 67%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/graph_manager2.o
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/openni_listener.o] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
make[1]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/all] Fehler 2
make: *** [all] Fehler 2
Invoking "make" failed

Asked by Pat on 2014-08-20 05:47:41 UTC

So, problem regarding __connection_header I solved once by comment out the two lines dealing with msg_header_map (not sure if this code is really necessary). Afterwards it seems to compile fine. Now I'm running (could be expected) into another problem during linking getting error unresolved cv::SIFT::SIFT I'm using openCV 2.4 and since this version nonfree stuff was excluded from openCV. Not sure how to get now opencv_nonfree library to link. Any hint?

...
Linking CXX executable /home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam
CMakeFiles/rgbdslam.dir/src/misc.o: In Funktion `createDescriptorExtractor(std::string const&)':
misc.cpp:(.text+0x1433): Nicht definierter Verweis auf `cv::SIFT::SIFT(int, int, double, double, double)'
misc.cpp:(.text+0x1594): Nicht definierter Verweis auf `cv::SURF::SURF()'
misc.cpp:(.text+0x1604): Nicht definierter Verweis auf `cv::SURF::SURF()'
misc.cpp:(.text+0x173a): Nicht definierter Verweis auf `cv::SURF::SURF()'
CMakeFiles/rgbdslam.dir/src/misc.o: In Funktion `createDetector(std::string const&)':
misc.cpp:(.text+0x4ee0): Nicht definierter Verweis auf `cv::SIFT::SIFT(int, int, double, double, double)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam] Fehler 1
make[1]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/all] Fehler 2
make: *** [all] Fehler 2
Invoking "make" failed

Asked by Pat on 2014-08-22 04:30:36 UTC

Comments

You need libopencv_nonfree.so google it and you'll find places to download it from - OpenCV installation instructions here: http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/

Asked by MarkyMark2012 on 2014-08-22 06:32:55 UTC

Thanks again Mark. Meanwhile I got it from here https://code.google.com/p/myrobotlab/source/browse/trunk/myrobotlab/thirdParty/repo/net.sourceforge.opencv/opencv/2.4.3/?r=1064#2.4.3%2Fx86.64.linux and I was able to link. Unfortunatly I'm running in a new issue. If run my fresh compiled rgdbslam V2 I get a segmentation fault. Trying to gdb gives following output:

  (gdb) run
    Starting program: /home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7fffd7cdc700 (LWP 28410)]
    [New Thread 0x7fffd74db700 (LWP 28411)]
    [New Thread 0x7fffd6cda700 (LWP 28412)]

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff7582a8c in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_io.so.1.7
    (gdb) bt
#0  0x00007ffff7582a8c in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_io.so.1.7
#1  0x00007ffff750d186 in ?? () from /usr/lib/libpcl_io.so.1.7
#2  0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb58, env=env@entry=0x7fffffffdb68) at dl-init.c:78
#3  0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#4  _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdb58, env=0x7fffffffdb68) at dl-init.c:126
#5  0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#6  0x0000000000000001 in ?? ()
#7  0x00007fffffffdf23 in ?? ()
#8  0x0000000000000000 in ?? ()

I'm not the gdb specialist so I tried to search for lanczos_initializer. I have currently no idea how to continue checking whats wrong. Its similar to here http://answers.ros.org/question/178781/segfault-on-roslaunch-rgbdslam-pcl-17-related/ Couldn't yet find any information in the inet.

ros@host1:~/catkin_ws$ find . -type f -name '*' -exec grep -H lanczos_initializer {} \;
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/src/TrackingOctomapServer.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/src/OctomapServer.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/src/OctomapServerMultilayer.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server_node.dir/src/octomap_server_node.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server_nodelet.dir/src/octomap_server_nodelet.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_tracking_server_node.dir/src/octomap_tracking_server_node.cpp.o.
Übereinstimmungen in Binärdatei ./build/octomap_mapping/octomap_server/CMakeFiles/octomap_server_multilayer.dir/src/octomap_server_multilayer.cpp.o.
Übereinstimmungen in Binärdatei ./build/rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/node.o.
Übereinstimmungen in Binärdatei ./build/rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/misc.o.
Übereinstimmungen in Binärdatei ./devel/lib/liboctomap_server_nodelet.so.
Übereinstimmungen in Binärdatei ./devel/lib/octomap_server/octomap_server_multilayer.
Übereinstimmungen in Binärdatei ./devel/lib/octomap_server/octomap_tracking_server_node.
Übereinstimmungen in Binärdatei ./devel/lib/octomap_server/octomap_server_node.
Übereinstimmungen in Binärdatei ./devel/lib/rgbdslam/rgbdslam.
Übereinstimmungen in Binärdatei ./devel/lib/liboctomap_server.so.

Asked by Pat on 2014-08-22 07:51:57 UTC

Difficult to say - similar problem here?? (resolved by recompiling PCL from scratch) http://www.pcl-users.org/Segfault-when-declaring-boost-shared-ptr-td4031530.html

Asked by MarkyMark2012 on 2014-08-22 08:12:02 UTC

I built pcl from source but it didn't solved the problem. Get still segfault at the same location. (to be sure I checked with ldd that new built pcl libs are used). It is bewitched! Any other other idea?

Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff7582a8c in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_io.so.1.7

Asked by Pat on 2014-08-23 04:50:29 UTC

Here the complete gdp out using new built PCL

ros@host1:~/catkin_ws$ gdb /home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam core 
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam...(no debugging symbols found)...done.
[New LWP 12741]
[New LWP 12742]
[New LWP 12743]
[New LWP 12744]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/ros/catkin_ws/devel/lib/rgbdslam/rgbdslam'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f868a7e7b1c in lanczos_sum<long double> (z=@0x7fff54b43420: 1) at /usr/include/boost/math/special_functions/lanczos.hpp:897
897       };
(gdb) bt
#0  0x00007f868a7e7b1c in lanczos_sum<long double> (z=@0x7fff54b43420: 1) at /usr/include/boost/math/special_functions/lanczos.hpp:897
#1  boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init (this=<optimized out>) at /usr/include/boost/math/special_functions/lanczos.hpp:49
#2  0x00007f868a769bb6 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /usr/include/boost/math/special_functions/lanczos.hpp:64
#3  _GLOBAL__sub_I_hdl_grabber.cpp(void) () at /home/ros/catkin_ws/src/pcl/io/src/hdl_grabber.cpp:646
#4  0x00007f868afeb13a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fff54b43548, env=env@entry=0x7fff54b43558) at dl-init.c:78
#5  0x00007f868afeb223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#6  _dl_init (main_map=0x7f868b1ff1c8, argc=1, argv=0x7fff54b43548, env=0x7fff54b43558) at dl-init.c:126
#7  0x00007f868afdc30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#8  0x0000000000000001 in ?? ()
#9  0x00007fff54b43ee0 in ?? ()
#10 0x0000000000000000 in ?? ()
(gdb)

Asked by Pat on 2014-08-23 05:27:27 UTC

Regarding boost::shared_ptr > msg_header_map = tf_msg->__connection_header; This header seems to be deprecated since Hydro and removed in Indigo, but I would agree that it may be not needed/important at all. thread

Asked by kp on 2014-11-19 06:24:48 UTC

Hello Pat,

I have the same seg fault for pcl. Did you solve it?

Thanks

Asked by costashatz on 2015-01-28 11:55:51 UTC

Any luck with the pcl seg fault so far?

Asked by kokirits on 2015-06-08 03:11:01 UTC

I got it working by compiling boost_1_48_0, then compiling pcl-1.7.0 against boost. Then compiled perception_pcl, pcl_conversions and rgbdslam against pcl. I haven't tested it thoroughly, but the launch file does not crash and rgbldslam gui loads

Asked by tdan on 2015-06-17 22:06:05 UTC

Regarding

boost::shared_ptr<std::map<std::string, std::string=""> > msg_header_map = tf_msg->__connection_header;
(*msg_header_map)["callerid"] = "rgbdslam";

__connection_header seems to be deprecated since Hydro and removed in Indigo, but I would agree that it may be not needed/important at all (only may be needed if you will have issues with bag file reading). Thread in roscpp github issues page: Remove _connection_header from message #3

For me also this change to CMakeLists.txt was needed:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,8 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
 set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
 #SET(CMAKE_CXX_FLAGS "-O3 -fPIC -std=c++0x")
 #For annotated profiling with perf: 
-SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++0x")
+#SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++0x")
+SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC")

 IF (${USE_GL2PS})
   add_definitions(-DGL2PS)
    @@ -41,7 +42,7 @@ ENDIF (${USE_GICP_BIN} OR ${USE_GICP_CODE})
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/")
 #message(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
 find_package(catkin REQUIRED COMPONENTS pcl_conversions pcl_ros roscpp image_transport cv_bridge sensor_msgs 
-   geometry_msgs visualization_msgs std_msgs tf message_generation message_filters rosbag rosconsole)
+   geometry_msgs visualization_msgs std_msgs tf message_generation message_filters rosbag rosconsole    cmake_modules)

@@ -225,7 +225,7 @@ add_dependencies(rgbdslam rgbdslam_gencpp)
 #SET(G2O_LIBS ${G2O_LIBRARIES} cholmod cxsparse)
 #SET(LIBS_LINK GL GLU -lgl2ps ${G2O_LIBS} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${GLUT_LIBRARY} ${OPE
 #Use specific version of cxsparse, to avoid linker warning about possible conflicts between versions 2
-SET(LIBS_LINK GL GLU cholmod /usr/lib/libcxsparse.so.2.2.3 ${G2O_LIBRARIES} ${QT_LIBRARIES} ${QT_QTOPE
+SET(LIBS_LINK GL GLU cholmod cxsparse ${G2O_LIBRARIES} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${GLUT_L
 #-lboost_signals -lrt -loctomap -loctomap_server -loctomath)

--- a/package.xml
+++ b/package.xml
@@ -41,6 +41,7 @@
   <!-- Use test_depend for packages you need only for testing: -->
   <!--   <test_depend>gtest</test_depend> -->
   <buildtool_depend>catkin</buildtool_depend>
+  <build_depend>cmake_modules</build_depend>
   <build_depend>pcl_conversions</build_depend>
   <build_depend>pcl_ros</build_depend>
   <build_depend>roscpp</build_depend>
@@ -56,6 +57,7 @@
   <run_depend>sensor_msgs</run_depend>
   <run_depend>octomap</run_depend>
   <run_depend>visualization_msgs</run_depend>
+  <run_depend>cmake_modules</run_depend>
   <!-- own stuff -->
   <build_depend>libpcl-all-dev</build_depend>
   <build_depend>tf</build_depend>

You can use ppa:xqms/opencv-nonfree PPA if you don't want to build from scratch and solve issues of:

  • satisfying other packages which are depending on stock OpenCV package
  • force to link again specific version of OpenCV.

PPA sources list is /etc/apt/sources.list.d/xqms-opencv-nonfree-trusty.list:

deb http://ppa.launchpad.net/xqms/opencv-nonfree/ubuntu trusty main
# deb-src http://ppa.launchpad.net/xqms/opencv-nonfree/ubuntu trusty main

Asked by kp on 2014-11-19 06:44:51 UTC

Comments

I was able to compile it in that way by additionally set cmake flags to SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++11") to use C++11 standard. but rgbdslam always crashes on startup. any ideas?

Asked by RodBelaFarin on 2015-03-13 11:54:08 UTC