Re: Compiling in ROS-Indigo with PCL-1.7.2: Undefined reference to...

Posted by Frank on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Compiling-in-ROS-Indigo-with-PCL-1-7-2-Undefined-reference-to-tp386p395.html

Thanks for the reply!
Okay, I tried:

1) uninstalled rtabmap binaries
sudo apt-get remove ros-indigo-rtabmap*

2) I removed everything related to rtabmap in my lib forlder:
 (i removed all of the rtabmap stuff)

(removed)


3) re-installed the binaries
sudo apt-get install ros-indigo-rtabmap-ros

4) sourced the binaries workspace
source /opt/ros/indigo/setup.bash

5) ran the demo
roslaunch rtabmap_ros demo_robot_mapping.launch
rosbag play --clock demo_mapping.bag

6) the output is as follows:

[ INFO] [1430780676.609884383]: Starting node...
[ INFO] [1430780676.610201356]: Starting node...
[ INFO] [1430780676.681968082]: rtabmap: frame_id = base_footprint
[ INFO] [1430780676.682028525]: rtabmap: map_frame_id = map
[ INFO] [1430780676.682045257]: rtabmap: queue_size = 10
[ INFO] [1430780676.682066072]: rtabmap: tf_delay = 0.050000
[ INFO] [1430780676.756005263]: rtabmapviz: Using configuration from "/opt/ros/indigo/share/rtabmap_ros/launch/config/rgbd_gui.ini"
[ INFO] [1430780676.805853032]: Setting RTAB-Map parameter "LccBow/InlierDistance"="0.1"
[ INFO] [1430780676.808597933]: Setting RTAB-Map parameter "LccBow/MaxDepth"="0.0"
[ INFO] [1430780676.813676320]: Setting RTAB-Map parameter "LccIcp/Type"="2"
[ INFO] [1430780676.986151354]: Setting RTAB-Map parameter "RGBD/LocalLoopDetectionSpace"="true"
[ INFO] [1430780676.987043230]: Setting RTAB-Map parameter "RGBD/LocalLoopDetectionTime"="false"
[ INFO] [1430780676.992076210]: Setting RTAB-Map parameter "RGBD/OptimizeFromGraphEnd"="false"
[ INFO] [1430780676.992706493]: Setting RTAB-Map parameter "RGBD/PoseScanMatching"="true"
[ INFO] [1430780677.196148468]: RTAB-Map rate detection = 1.000000 Hz
[ INFO] [1430780677.196266464]: rtabmap: Deleted database "/home/frank/.ros/rtabmap.db" (--delete_db_on_start is set).
[ INFO] [1430780677.196294881]: rtabmap: Using database from "/home/frank/.ros/rtabmap.db".
[ INFO] [1430780679.535643095]: Reading parameters from the ROS server...
[ INFO] [1430780679.632737115]: Parameters read = 160
[ INFO] [1430780679.632780730]: Parameters successfully read.
[ INFO] [1430780679.989173444]: Registering Depth+LaserScan callback...
[ INFO] [1430780680.005879212]: rtabmapviz started.
[ INFO] [1430780681.421181167]: Registering Depth+LaserScan callback...
[ INFO] [1430780681.425888948]: rtabmap started...
[ WARN] [1430780694.289810701, 1368730003.591011384]: Lookup would require extrapolation into the past.  Requested time 1368730003.446602750 but the earliest data is at time 1368730003.965610098, when looking up transform from frame [base_laser_link] to frame [base_footprint]
[ WARN] [1430780694.396128407, 1368730003.702068083]: Lookup would require extrapolation into the past.  Requested time 1368730003.521858750 but the earliest data is at time 1368730003.965610098, when looking up transform from frame [base_laser_link] to frame [base_footprint]
[ WARN] [1430780694.492963733, 1368730003.792808273]: Lookup would require extrapolation into the past.  Requested time 1368730003.596578750 but the earliest data is at time 1368730003.965610098, when looking up transform from frame [base_laser_link] to frame [base_footprint]
[ WARN] [1430780694.652662785, 1368730003.953971980]: Lookup would require extrapolation into the past.  Requested time 1368730003.721525750 but the earliest data is at time 1368730003.965610098, when looking up transform from frame [base_laser_link] to frame [base_footprint]
[ WARN] [1430780694.683855956, 1368730003.984162321]: Lookup would require extrapolation into the past.  Requested time 1368730003.871489750 but the earliest data is at time 1368730003.965610098, when looking up transform from frame [base_laser_link] to frame [base_footprint]
[ WARN] [1430780695.292200393, 1368730004.599848293]: Could not get transform from base_footprint to base_laser_link after 1 second!
[ WARN] [1430780696.299412695, 1368730005.606087500]: Could not get transform from base_footprint to base_laser_link after 1 second!
[ WARN] [1430780696.477603878, 1368730005.777524988]: Use depth image with "unsigned short" type to avoid conversion. This message is only printed once...
[ INFO] [1430780696.630476441, 1368730005.929071965]: rtabmap: Update rate=1.000000s, Limit=0.000000s, Processing time = 0.153744s (1 local nodes)
[ WARN] (2015-05-04 16:04:57.668) Memory.cpp:2009::computeIcpTransform() Clouds 2D empty ?!?
[ WARN] (2015-05-04 16:04:57.668) Rtabmap.cpp:873::process() Scan matching rejected: Clouds 2D empty ?!?
[ INFO] [1430780697.669335896, 1368730006.976816503]: rtabmap: Update rate=1.000000s, Limit=0.000000s, Processing time = 0.105409s (2 local nodes)
/opt/ros/indigo/lib/rtabmap_ros/rtabmapviz: symbol lookup error: /opt/ros/indigo/lib/x86_64-linux-gnu/librtabmap_core.so.0.8: undefined symbol: _ZN3pcl6search6KdTreeINS_8PointXYZEEC1Eb
[rtabmap/rtabmapviz-3] process has died [pid 11520, exit code 127, cmd /opt/ros/indigo/lib/rtabmap_ros/rtabmapviz -d /opt/ros/indigo/share/rtabmap_ros/launch/config/rgbd_gui.ini rgb/image:=/data_throttled_image depth/image:=/data_throttled_image_depth rgb/camera_info:=/data_throttled_camera_info scan:=/jn0/base_scan odom:=/az3/base_controller/odom __name:=rtabmapviz __log:=/home/frank/.ros/log/ea15f354-f2b1-11e4-b5ce-acb57d02f12d/rtabmap-rtabmapviz-3.log].
log file: /home/frank/.ros/log/ea15f354-f2b1-11e4-b5ce-acb57d02f12d/rtabmap-rtabmapviz-3*.log


Using c++filt on the symbol above:
echo _ZN3pcl6search6KdTreeINS_8PointXYZEEC1Eb|c++filt
pcl::search::KdTree<pcl::PointXYZ>::KdTree(bool)

---
Looks like it is complaining about PCL now. I have both PCL (ros binaries) and PCL 1.7.2 installed. Do you think it is linking with 1.7.2 but requires the ROS version?

Thanks,
-Frank

---
Update 1:
I uninstalled PCL 1.7.2 and tried again.
1) sudo make uninstall (from the build folder of pcl)
2) Then i reinstalled the rtabmap binaries.
3) Then I ran the demo and it worked perfectly.

How can I specify for the binaries to link with pcl_ros and not PCL 1.7.2? I want to keep 1.7.2 installed since I'm developing with it. I will try again compiling from source but I'm not sure how to make it link with pcl_ros and not PCL 1.7.2. I will update how it goes.

---
Update 2:
I compiled from source by following these steps:
1) uninstalled the binaries
sudo apt-get remove ros-indigo-rtabmap-ros

2) pulled from git and compiled rtabmap
it compiled fine

3) pulled from git and compiled rtabmap_ros using catkin_make. It failed.
Here is the failure:


How do you make rtabmap_ros link with PCL 1.7.2?

Thanks!