PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi,
I have pcl1.9 installed from source and at the same time, there is pcl1.7 come with ros. rtabmap can't support pcl1.9, so how can I choose to make rtabmap with pcl1.7 that come with ros.
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
What kind of errors you have with PCL 1.9?

To choose which version to compile to, you can add "-DPCL_DIR=PATH/TO/DIR/CONTAINING/PCLConfig.cmake" in the cmake command of rtabmap. Make sure to delete the CMackeCache.txt in rtabmap build directory to start new. You may have to do the same for catkin_make.

The best would be to remove PCL1.7 from the computer, then rebuild all dependencies removed against PCL 1.9. I didn't try to build rtabmap against PCL1.9 yet, let me know the errors so we can fix them.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper

1.PCL1.9 and PCL1.7 come with ros


In a system has pcl1.9 and pcl1.7 that come with ros, rtabmap make weill. The making of rtabmap_ros will occur some warning:
/usr/bin/ld: warning: libpcl_common.so.1.7, needed by /home/wang/rtabmap_ws/devel/lib/librtabmap_ros.so, may conflict with libpcl_common.so.1.9
and every libpcl_*.so will occur this kind of warning. ,but it make pass.
Then I run the launch file.
1.open the realsensed435 camera :roslaunch realsense2_camera rs_camera.launch align_depth:=true 
2.run the rtabmap :roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info 
error occur:
[FATAL] (2019-03-01 14:17:59.215) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2019-03-01 14:17:59.215) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
[rtabmap/rgbd_odometry-1] process has died [pid 29943, exit code -6, cmd /home/wang/rtabmap_ws/devel/lib/rtabmap_ros/rgbd_odometry --delete_db_on_start rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay odom:=odom __name:=rgbd_odometry __log:=/home/wang/.ros/log/a24d90b0-3be9-11e9-9556-2016b9896a4d/rtabmap-rgbd_odometry-1.log].
log file: /home/wang/.ros/log/a24d90b0-3be9-11e9-9556-2016b9896a4d/rtabmap-rgbd_odometry-1*.log
[rtabmap/rtabmapviz-3] process has died [pid 29945, exit code -11, cmd /home/wang/rtabmap_ws/devel/lib/rtabmap_ros/rtabmapviz -d ~/.ros/rtabmap_gui.ini rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info scan:=/scan scan_cloud:=/scan_cloud odom:=odom __name:=rtabmapviz __log:=/home/wang/.ros/log/a24d90b0-3be9-11e9-9556-2016b9896a4d/rtabmap-rtabmapviz-3.log].
log file: /home/wang/.ros/log/a24d90b0-3be9-11e9-9556-2016b9896a4d/rtabmap-rtabmapviz-3*.log
and warning occur:
[ INFO] [1551421079.654590805]: rtabmap 0.18.3 started...
[ WARN] [1551421084.646326839]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmap subscribed to (approx sync):
   /rtabmap/odom,
   /camera/color/image_raw,
   /camera/aligned_depth_to_color/image_raw,
   /camera/color/camera_info,

2.Uninstall PCL1.7


I run the code below to uninstall the pcl1.7 come with ros:
sudo apt-get remove ros-kinetic-pcl*
rtabmap make weill, but rtabmap_ros can't make, error occur:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "pcl_conversions"
  with any of the following names:

    pcl_conversionsConfig.cmake
    pcl_conversions-config.cmake

  Add the installation prefix of "pcl_conversions" to CMAKE_PREFIX_PATH or
  set "pcl_conversions_DIR" to a directory containing one of the above files.
  If "pcl_conversions" provides a separate development package or SDK, be
  sure it has been installed.

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "pcl_ros" with any
  of the following names:

    pcl_rosConfig.cmake
    pcl_ros-config.cmake

  Add the installation prefix of "pcl_ros" to CMAKE_PREFIX_PATH or set
  "pcl_ros_DIR" to a directory containing one of the above files.  If
  "pcl_ros" provides a separate development package or SDK, be sure it has
  been installed.
It is the package I uninstall just now. So it seems like that the pcl1.7 come with ros can't be uninstalled.

Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
Hi,

Yes, by uninstalling libpcl-dev, many packages are uninstalled. When using PCL from source, we should also rebuild all ros packages depending on pcl from source, like pcl_conversions and pcl_ros.

However, the bug you get doesn't seem coming from the PCL versions, but from g2o. I tried on melodic your lines and I cannot reproduce the error. Is g2o installed from source or it is the one installed by melodic?

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi,
I am also very confused. I could make and run rtabmap fine with uninstalling pcl1.9 previously. Let's check the g2o.
I clone the g2o of c++03 branch.
mkdir build 
cd build 
cmake ../ 
make
I didn't install the g2o, should I? and I didn't cmake with -DBUILD_WITH_MARCH_NATIVE=OFF, should I? what I get from the instruction tell me I should add -DBUILD_WITH_MARCH_NATIVE=OFF only when I use the latest official g2o.
From the rtabmap cmake information:
-- Old g2o version detected with c++03 interface (config file: /opt/ros/kinetic/include/g2o/config.h).
-- Found g2o: /opt/ros/kinetic/include;/usr/include/suitesparse;/usr/include/suitesparse
It seenm like the rtabmap just use the g2o come with  kinetic.And you said it is ok befor.

Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
Hi,

I reproduced the error:
[FATAL] (2019-03-01 14:17:59.215) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
by building g2o from source with -DBUILD_WITH_MARCH_NATIVE=ON (my PCL installed is not built with -march=native flag). Setting -DBUILD_WITH_MARCH_NATIVE=OFF when building g2o doesn't generate the error.

I think the g2o c++03 branch and the one installed in kinetic don't use -march=native, PCL installed by kinetic doesn't too, so it should be ok. If PCL 1.9 is built with -march=native, this could be the problem. Can you show full output of cmake of rtabmap?
$ cd rtabmap/build
$ cmake ..
<<copy/paste all this output>>
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi, matlabbe. Thanks for your reply.
I make the rtabmap:
cmake .. -DCMAKE_INSTALL_PREFIX=~/rtabmap_ws/devel -Dfreenect2_DIR=~/freenect2/lib/cmake/freenect2
The information is below:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:64 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:67 (cmake_policy):
  The OLD behavior for policy CMP0043 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Checking for module 'eigen3'
--   Found eigen3, version 3.2.92
-- Found Eigen: /usr/include/eigen3  
-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.20
-- Found USB_10: /usr/lib/x86_64-linux-gnu/libusb-1.0.so  
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Found libusb-1.0: /usr/include  
-- Checking for module 'flann'
--   Found flann, version 1.8.4
-- FLANN found (include: , lib: flann_cpp)
-- FLANN found (include: , lib: flann_cpp)
-- Found Qhull: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so  
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- Found PCL_COMMON: /usr/local/lib/libpcl_common.so  
-- Found PCL_OCTREE: /usr/local/lib/libpcl_octree.so  
-- Found PCL_IO: /usr/local/lib/libpcl_io.so  
-- Found PCL_KDTREE: /usr/local/lib/libpcl_kdtree.so  
-- Found PCL_SEARCH: /usr/local/lib/libpcl_search.so  
-- Found PCL_SURFACE: /usr/local/lib/libpcl_surface.so  
-- Found PCL_FILTERS: /usr/local/lib/libpcl_filters.so  
-- Found PCL_2D: /usr/local/include/pcl-1.9  
-- Found PCL_FEATURES: /usr/local/lib/libpcl_features.so  
-- Found PCL_REGISTRATION: /usr/local/lib/libpcl_registration.so  
-- Found PCL_SAMPLE_CONSENSUS: /usr/local/lib/libpcl_sample_consensus.so  
-- Found PCL_GEOMETRY: /usr/local/include/pcl-1.9  
-- Found PCL_ML: /usr/local/lib/libpcl_ml.so  
-- Found PCL_SEGMENTATION: /usr/local/lib/libpcl_segmentation.so  
-- Found PCL_VISUALIZATION: /usr/local/lib/libpcl_visualization.so  
CMake Warning at CMakeLists.txt:202 (MESSAGE):
  PCL compile options contain "-march=native", make sure all libraries using
  Eigen are also compiled with that flag to avoid some segmentation faults
  (with gdb referring to some Eigen functions).


-- Found Sqlite3: /usr/include /usr/lib/x86_64-linux-gnu/libsqlite3.so
-- Found OpenMP_C: -fopenmp (found version "4.0") 
-- Found OpenMP_CXX: -fopenmp (found version "4.0") 
-- Found OpenMP: TRUE (found version "4.0")  
-- Found OpenMP
-- Found OpenCV: /opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv
-- Found PCL: /usr/local/include/pcl-1.9;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/jsoncpp;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi;/usr/include/python2.7;/usr/include/x86_64-linux-gnu;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/tcl
-- Found ZLIB: /usr/include
-- VTK_RENDERING_BACKEND=OpenGL
-- Found Freenect: /usr/include
-- Found freenect2: /home/wang/freenect2/include
-- Found DC1394: /usr/include/dc1394
-- Found CSPARSE: /usr/include/suitesparse  
-- Old g2o version detected with c++03 interface (config file: /opt/ros/kinetic/include/g2o/config.h).
-- Found g2o: /opt/ros/kinetic/include;/usr/include/suitesparse;/usr/include/suitesparse
-- GTSAM include directory:  /usr/local/lib/cmake/GTSAM/../../../include
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   timer
--   chrono
-- Found BOOST: /usr/include /usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;-lpthread;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so
-- FlyCapture2_INCLUDE_DIR=FlyCapture2_INCLUDE_DIR-NOTFOUND
-- FlyCapture2_LIBRARY=FlyCapture2_LIBRARY-NOTFOUND
-- Triclops_INCLUDE_DIR=Triclops_INCLUDE_DIR-NOTFOUND
-- Triclops_LIBRARY=Triclops_LIBRARY-NOTFOUND
-- FlyCaptureBridge_LIBRARY=FlyCaptureBridge_LIBRARY-NOTFOUND
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda-10.0 (found suitable exact version "10.0") 
-- Found ZED sdk: /usr/local/zed/include
-- Found CUDA: /usr/local/cuda-10.0 (found version "10.0") 
-- Found CUDA: /usr/local/cuda-10.0/include
-- Found RealSense2: 
-- Found octomap 1.8.1: /opt/ros/kinetic/include
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Pthreads
CMake Deprecation Warning at tools/KittiDataset/CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.
……
-- --------------------------------------------
-- Info :
--   Version : 0.18.3
--   CMAKE_INSTALL_PREFIX = /home/wang/rtabmap_ws/devel
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -fopenmp -std=c++11
--   FLANN_KDTREE_MEM_OPT = OFF
--   PCL_DEFINITIONS = -DDISABLE_PCAP;-DDISABLE_PNG;-DDISABLE_LIBUSB_1_0
--   PCL_COMPILE_OPTIONS = -march=native;-msse4.2;-mfpmath=sse
-- Optional dependencies ('*' affects some default parameters) :
--  *With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
--   With external SQLite3     = YES (License: Public Domain)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = NO (OpenNI2 not found)
--   With Freenect2            = YES (License: Apache v2 and/or GPLv2)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--  *With g2o                  = YES (License: BSD)
--  *With GTSAM                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = NO (cvsba not found)
--  *With libpointmatcher      = NO (libpointmatcher not found)
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With ZED                  = YES (With CUDA)
--   With RealSense            = NO (librealsense not found)
--   With RealSense2           = YES (License: Apache-2)
--   With OCTOMAP              = YES (License: BSD)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel not found)
--   With libfovis             = NO (libfovis not found)
--   With libviso2             = NO (libviso2 not found)
--   With dvo_core             = NO (dvo_core not found)
--   With okvis                = NO (okvis not found)
--   With msckf_vio            = NO (WITH_MSCKF_VIO=OFF)
--   With ORB_SLAM2            = NO (WITH_G2O should be OFF as ORB_SLAM2 uses its own g2o version)
--   With Qt5                  = YES (License: Open Source or Commercial)
-- --------------------------------------------
Then I make the rtabmap_ros,the information is below:
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at rtabmap_ros/CMakeLists.txt:28 (find_package):
  By not providing "Findapriltags2_ros.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "apriltags2_ros", but CMake did not find one.

  Could not find a package configuration file provided by "apriltags2_ros"
  with any of the following names:

    apriltags2_rosConfig.cmake
    apriltags2_ros-config.cmake

  Add the installation prefix of "apriltags2_ros" to CMAKE_PREFIX_PATH or set
  "apriltags2_ros_DIR" to a directory containing one of the above files.  If
  "apriltags2_ros" provides a separate development package or SDK, be sure it
  has been installed.


-- Found RTABMap: /home/wang/rtabmap_ws/devel/lib/librtabmap_core.so;/home/wang/rtabmap_ws/devel/lib/librtabmap_utilite.so;/home/wang/rtabmap_ws/devel/lib/librtabmap_gui.so;/usr/lib/x86_64-linux-gnu/libz.so;/opt/ros/kinetic/lib/libg2o_core.so;/opt/ros/kinetic/lib/libg2o_types_slam2d.so;/opt/ros/kinetic/lib/libg2o_types_slam3d.so;/opt/ros/kinetic/lib/libg2o_types_sba.so;/opt/ros/kinetic/lib/libg2o_stuff.so;/opt/ros/kinetic/lib/libg2o_solver_csparse.so;/opt/ros/kinetic/lib/libg2o_csparse_extension.so;/usr/lib/x86_64-linux-gnu/libcxsparse.so;/opt/ros/kinetic/lib/libg2o_solver_cholmod.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libfreenect.so;/usr/lib/x86_64-linux-gnu/libfreenect_sync.so;/home/wang/freenect2/lib/libfreenect2.so;pthread;/usr/lib/x86_64-linux-gnu/libdc1394.so;/usr/local/zed/lib/libsl_input.so;/usr/local/zed/lib/libsl_core.so;/usr/local/zed/lib/libsl_zed.so;/usr/local/cuda-10.0/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so;/opt/ros/kinetic/lib/liboctomap.so;/opt/ros/kinetic/lib/liboctomath.so (Required is at least version "0.18.3") 
-- Found OpenCV: /opt/ros/kinetic (found version "3.3.1") 
-- Checking for module 'eigen3'
--   Found eigen3, version 3.2.92
-- Found Eigen: /usr/include/eigen3  
-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
--   chrono
--   atomic
--   regex
-- Checking for module 'flann'
--   Found flann, version 1.8.4
-- FLANN found (include: , lib: flann_cpp)
-- FLANN found (include: , lib: flann_cpp)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.20
-- Found USB_10: /usr/lib/x86_64-linux-gnu/libusb-1.0.so  
-- Found OpenNI: /usr/lib/libOpenNI.so  
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- Found libusb-1.0: /usr/include  
** WARNING ** io features related to libusb-1.0 will be disabled
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- Found Qhull: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so  
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
-- looking for PCL_COMMON
-- Found PCL_COMMON: /usr/local/lib/libpcl_common.so  
-- looking for PCL_KDTREE
-- Found PCL_KDTREE: /usr/local/lib/libpcl_kdtree.so  
-- looking for PCL_OCTREE
-- Found PCL_OCTREE: /usr/local/lib/libpcl_octree.so  
-- looking for PCL_SEARCH
-- Found PCL_SEARCH: /usr/local/lib/libpcl_search.so  
-- looking for PCL_SAMPLE_CONSENSUS
-- Found PCL_SAMPLE_CONSENSUS: /usr/local/lib/libpcl_sample_consensus.so  
-- looking for PCL_FILTERS
-- Found PCL_FILTERS: /usr/local/lib/libpcl_filters.so  
-- looking for PCL_2D
-- Found PCL_2D: /usr/local/include/pcl-1.9  
-- looking for PCL_FEATURES
-- Found PCL_FEATURES: /usr/local/lib/libpcl_features.so  
-- looking for PCL_KEYPOINTS
-- Found PCL_KEYPOINTS: /usr/local/lib/libpcl_keypoints.so  
-- looking for PCL_GEOMETRY
-- Found PCL_GEOMETRY: /usr/local/include/pcl-1.9  
-- looking for PCL_IO
-- Found PCL_IO: /usr/local/lib/libpcl_io.so  
-- looking for PCL_ML
-- Found PCL_ML: /usr/local/lib/libpcl_ml.so  
-- looking for PCL_SEGMENTATION
-- Found PCL_SEGMENTATION: /usr/local/lib/libpcl_segmentation.so  
-- looking for PCL_VISUALIZATION
-- Found PCL_VISUALIZATION: /usr/local/lib/libpcl_visualization.so  
-- looking for PCL_SURFACE
-- Found PCL_SURFACE: /usr/local/lib/libpcl_surface.so  
-- looking for PCL_REGISTRATION
-- Found PCL_REGISTRATION: /usr/local/lib/libpcl_registration.so  
-- looking for PCL_TRACKING
-- Found PCL_TRACKING: /usr/local/lib/libpcl_tracking.so  
-- looking for PCL_RECOGNITION
-- Found PCL_RECOGNITION: /usr/local/lib/libpcl_recognition.so  
-- looking for PCL_STEREO
-- Found PCL_STEREO: /usr/local/lib/libpcl_stereo.so  
-- looking for PCL_CUDA_COMMON
-- Found PCL_CUDA_COMMON: /usr/local/include/pcl-1.9  
-- looking for PCL_CUDA_FEATURES
-- Found PCL_CUDA_FEATURES: /usr/local/lib/libpcl_cuda_features.so  
-- looking for PCL_CUDA_SEGMENTATION
-- Found PCL_CUDA_SEGMENTATION: /usr/local/lib/libpcl_cuda_segmentation.so  
-- looking for PCL_CUDA_SAMPLE_CONSENSUS
-- Found PCL_CUDA_SAMPLE_CONSENSUS: /usr/local/lib/libpcl_cuda_sample_consensus.so  
-- looking for PCL_OUTOFCORE
-- Found PCL_OUTOFCORE: /usr/local/lib/libpcl_outofcore.so  
-- looking for PCL_PEOPLE
-- Found PCL_PEOPLE: /usr/local/lib/libpcl_people.so  
-- Found PCL: pcl_common;pcl_kdtree;pcl_octree;pcl_search;pcl_sample_consensus;pcl_filters;pcl_features;pcl_keypoints;pcl_io;pcl_ml;pcl_segmentation;pcl_visualization;pcl_surface;pcl_registration;pcl_tracking;pcl_recognition;pcl_stereo;pcl_cuda_features;pcl_cuda_segmentation;pcl_cuda_sample_consensus;pcl_outofcore;pcl_people;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;-lpthread;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so;/usr/lib/libOpenNI.so;flann_cpp;vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libz.so;vtkftgl;vtkDICOMParser;vtkDomainsChemistry;vtkIOXML;vtkIOGeometry;vtkIOCore;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkFiltersAMR;vtkParallelCore;vtkIOLegacy;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkFiltersHybrid;vtkImagingSources;vtkFiltersHyperTree;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelFlowPaths;vtkParallelMPI;vtkFiltersParallelGeometry;vtkFiltersParallelImaging;vtkFiltersParallelMPI;vtkFiltersParallelStatistics;vtkFiltersProgrammable;vtkFiltersPython;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkWrappingPythonCore;vtkWrappingTools;vtkFiltersReebGraph;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersVerdict;verdict;vtkGUISupportQt;vtkInteractionStyle;vtkRenderingOpenGL;vtkImagingHybrid;vtkIOImage;vtkmetaio;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libtiff.so;vtkGUISupportQtOpenGL;vtkGUISupportQtSQL;vtkIOSQL;sqlite3;vtkGUISupportQtWebkit;vtkViewsQt;vtkViewsInfovis;vtkInfovisLayout;vtkRenderingLabel;vtkViewsCore;vtkInteractionWidgets;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkGeovisCore;vtkproj4;vtkIOAMR;/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5_hl.so;/usr/lib/openmpi/lib/libmpi.so;vtkIOEnSight;vtkIOExodus;vtkexoIIc;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;vtkIOExport;vtkRenderingGL2PS;vtkRenderingContextOpenGL;/usr/lib/libgl2ps.so;vtkIOFFMPEG;vtkIOMovie;/usr/lib/x86_64-linux-gnu/libtheoraenc.so;/usr/lib/x86_64-linux-gnu/libtheoradec.so;/usr/lib/x86_64-linux-gnu/libogg.so;vtkIOGDAL;vtkIOGeoJSON;vtkIOImport;vtkIOInfovis;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkIOLSDyna;vtkIOMINC;vtkIOMPIImage;vtkIOMPIParallel;vtkIOMySQL;vtkIONetCDF;vtkIOODBC;vtkIOPLY;vtkIOParallel;vtkIOParallelExodus;vtkIOParallelLSDyna;vtkIOParallelNetCDF;vtkIOParallelXML;vtkIOPostgreSQL;vtkIOVPIC;VPIC;vtkIOVideo;vtkIOXdmf2;vtkxdmf2;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInfovisBoostGraphAlgorithms;vtkInteractionImage;vtkLocalExample;vtkParallelMPI4Py;vtkPythonInterpreter;vtkRenderingExternal;vtkRenderingFreeTypeFontConfig;vtkRenderingFreeTypeOpenGL;vtkRenderingImage;vtkRenderingLIC;vtkRenderingLOD;vtkRenderingMatplotlib;vtkRenderingParallel;vtkRenderingParallelLIC;vtkRenderingQt;vtkRenderingVolumeOpenGL;vtkTestingGenericBridge;vtkTestingIOSQL;vtkTestingRendering;vtkViewsContext2D;vtkViewsGeovis;vtkWrappingJava (Required is at least version "1.7") 
-- checking for module 'OGRE'
--   found OGRE, version 1.9.0
-- rtabmap_ros: 13 messages, 6 services
-- WITH costmap_2d
-- WITH octomap_msgs
-- WITH rviz
-- WITH find_object_2d
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wang/rtabmap_ws/build
Run the example:
1.roslaunch realsense2_camera rs_camera.launch align_depth:=true
2.roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info
The error is below:
[FATAL] (2019-03-04 09:07:57.074) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2019-03-04 09:07:57.074) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
[rtabmap/rgbd_odometry-1] process has died [pid 22619, exit code -6, cmd /home/wang/rtabmap_ws/devel/lib/rtabmap_ros/rgbd_odometry --delete_db_on_start rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay odom:=odom __name:=rgbd_odometry __log:=/home/wang/.ros/log/b3c74d68-3e19-11e9-87c0-2016b9896a4d/rtabmap-rgbd_odometry-1.log].
log file: /home/wang/.ros/log/b3c74d68-3e19-11e9-87c0-2016b9896a4d/rtabmap-rgbd_odometry-1*.log
[ INFO] [1551661677.349361755]: RTAB-Map detection rate = 1.000000 Hz
[ INFO] [1551661677.349486840]: rtabmap: Deleted database "/home/wang/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[ INFO] [1551661677.349511154]: rtabmap: Using database from "/home/wang/.ros/rtabmap.db" (0 MB).
[rtabmap/rtabmapviz-3] process has died [pid 22621, exit code -11, cmd /home/wang/rtabmap_ws/devel/lib/rtabmap_ros/rtabmapviz -d ~/.ros/rtabmap_gui.ini rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info scan:=/scan scan_cloud:=/scan_cloud odom:=odom __name:=rtabmapviz __log:=/home/wang/.ros/log/b3c74d68-3e19-11e9-87c0-2016b9896a4d/rtabmap-rtabmapviz-3.log].
log file: /home/wang/.ros/log/b3c74d68-3e19-11e9-87c0-2016b9896a4d/rtabmap-rtabmapviz-3*.log
And I'm sure the example runs fine when I uninstall the pcl1.9 and rebuild the rtabmap and rtabmap_ws.
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
The problem is coming from PCL 1.9:
--   PCL_COMPILE_OPTIONS = -march=native;-msse4.2;-mfpmath=sse
It is built with "-march=native", and g2o from kinetic is used, which is not built with "-march=native". Either disable PCL to use "-march=native" when building PCL or build g2o from source with -DBUILD_WITH_MARCH_NATIVE=ON (uninstall ros-kinetic-libg2o if you do so). You also build GTSAM from soruce, just make sure that it is building with "-march=native" if g2o and PCL are built with it, or is not built with "-march=native" if PCL and g2o are not built with it.

I checked in PCL repo, and "-march=native" seems always set: https://github.com/PointCloudLibrary/pcl/blob/73f6af1642752267818d2280d35d57a7316275a0/cmake/pcl_find_sse.cmake#L13, probably for performance issue. It is thus maybe better to rebuild g2o with -DBUILD_WITH_MARCH_NATIVE=ON. When building GTSAM, you may have to edit the cmake config (cmake-gui for convenience) and add "-march=native" to GTSAM_CMAKE_CXX_FLAGS option before building GTSAM.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi, matlabbe
I tried your advice but it didn't work for me. The same error occurs:
[FATAL] (2019-03-04 14:38:48.629) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2019-03-04 14:38:48.629) OptimizerG2O.cpp:1568::optimizeBA() Condition (optimizer.verifyInformationMatrices()) not met!
and what confused me is that when i build the g2o and gtsam with the -MARCH_NATIVE=ON, there is nothing like
-march=native
  with g2o or gtsam appear in the output information.

Then, I tried the latest official g2o, and build the g2o with
-DBUILD_WITH_MARCH_NATIVE=ON
When I build the rtabmap, error occurs:
error: ‘EdgeSE3XYZPrior’ was not declared in this scope
        EdgeSE3XYZPrior * priorEdge = new EdgeSE3XYZPrior();
just as the installation instruction said there will be segmation fault.

Finally, I tried to set the rtabmap to use pcl1.7 come with kinetic by adding the
DPCL_DIR=/opt/ros/kinetic/share/pcl_ros/cmake/PCL_rosConfig.cmake
But the rtabmap still use the pcl1.9.
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
PCL_DIR should be the directory, not the file. It should be the directory of the library not the pcl_ros package. In Ubuntu 16.04, PCL is installed in /usr prefix. Make also sure to delete CMakeCache.txt in the build directory to refresh cmake config:
$ cd rtabmap/build
$ rm CMakeCache.txt
$ cmake -DPCL_DIR=/usr/lib/x86_64-linux-gnu/cmake/pcl ..

The EdgeSE3XYZPrior has been fixed yesterday, just do a "git pull" on rtabmap directory.

You may try without gtsam first, just to debug PCL1.9 + g2o from source with -march=native:
$ cd g2o/build
$ cmake -DBUILD_WITH_MARCH_NATIVE=ON ..
$ make 
$ sudo make install

$ cd rtabmap/build
$ cmake -DWITH_GTSAM=OFF ..
$ make

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi,matlabbe
Thanks for your reply. I pull the latest rtabmap, the error of EdgeSE3XYZPrior is fixed really.
But when I turn off GTSAM even G2O, there is some error just said process died, nothing more help to guess what cause it. The error is below
[ INFO] [1551750370.703692610]: Odom: quality=477, std dev=0.002850m|0.043116rad, update time=0.033841s
[rtabmap/rtabmapviz-3] process has died [pid 8210, exit code -11, cmd /home/wang/rtabmap_ws/devel/lib/rtabmap_ros/rtabmapviz -d ~/.ros/rtabmap_gui.ini rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info scan:=/scan scan_cloud:=/scan_cloud odom:=odom __name:=rtabmapviz __log:=/home/wang/.ros/log/623a2964-3ee8-11e9-9614-2016b9896a4d/rtabmap-rtabmapviz-3.log].
log file: /home/wang/.ros/log/623a2964-3ee8-11e9-9614-2016b9896a4d/rtabmap-rtabmapviz-3*.log
[ INFO] [1551750370.745118327]: Odom: quality=480, std dev=0.002765m|0.038960rad, update time=0.029930s
It seems like error of Visualization,because the odometry seems like run well. Does the confict that the warning said cause the problem?
/usr/bin/ld: warning: libpcl_visualization.so.1.9, needed by /home/wang/rtabmap_ws/devel/lib/librtabmap_gui.so, may conflict with libpcl_visualization.so.1.7
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

matlabbe
Administrator
Indeed visualization is crashing. The wrong pcl library maybe loaded on runtime by rtabmapviz, which is causing this problem. However, as rtabmap_ros is depending on pcl_ros, and pcl_ros is built with pcl1.7, I think it is the conflict you are seeing. Either force rtabmap to build with pcl1.7, or uninstall pcl1.7 and rebuild everything from source depending on pcl1.7 (so that pcl_ros is also linked to pcl1.9).

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: PCL1.9 and PCL come with ros, how can i choose make with the PCL come with ros

TouchDeeper
Hi,matlabbe
Thanks for your reply!
It is a little hard for me to rebuild everything depending on pcl1.7 even pcl_ros. I install a pcl1.7 in other path and build the rtabmap wit pcl1.7, it runs fine. Maybe it is the best way for me now.