Building rtabmap from source with ros

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

Building rtabmap from source with ros

seanxu112
I am currently trying to install RTABMAP from source in order to calibrate camera and use different functionalities of RTABMAP standalone version. I am following the procedure as the repo says, basically pulling and making. The first problem I encountered was the following:
undefined reference to pcl::search::Search<pcl::PointXYZ>::getName
For all point types, while making. I searched online, it was a problem with have to install pcl from source or install pcl 1.8 version. In order to prevent pcl_ros from functioning, I pulled pcl 1.8, compiled and changed the install folder on my Desktop. Then I added this line for rtabmap's CMakeLists.txt:

list(APPEND CMAKE_PREFIX_PATH "/home/nvidia/pcl_1_8_0_install")
And I also changed the required PCL version from 1.7 to 1.8 for me to enforce this version.
At first make completed, but when I clone rtabmap_ros into my catkin_ws, there was some error for catkin_make -j1. Also there is warning saying that there might be a conflict for 2 pcl versions. Thus, I uninstalled pcl 1.8 and changed CMakeLists.txt in rtabmap back because I saw this post

Now I am just getting an error compiling rtabmap:
c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. tools/ExtractObject/CMakeFiles/extractObject.dir/build.make:62: recipe for target 'tools/ExtractObject/CMakeFiles/extractObject.dir/main.cpp.o' failed make[2]: *** [tools/ExtractObject/CMakeFiles/extractObject.dir/main.cpp.o] Error 4
Also can I just use make -j4 for compiling rtabmap?

Sincerely,

Sean Xu
Reply | Threaded
Open this post in threaded view
|

Re: Building rtabmap from source with ros

seanxu112
I removed rtabmap directory and cloned it again, make is successful, but got this error at sudo make install

[100%] Built target noEventsExample Linking CXX executable CMakeFiles/CMakeRelink.dir/rtabmap /usr/bin/aarch64-linux-gnu-ld: warning: libg2o_opengl_helper.so, needed by /opt/ros/kinetic/lib/libg2o_types_slam2d.so, not found (try using -rpath or -rpath-link) /opt/ros/kinetic/lib/libg2o_types_slam3d.so: undefined reference to g2o::opengl::drawPyramid(float, float)'
/opt/ros/kinetic/lib/libg2o_types_slam3d.so: undefined reference to g2o::opengl::drawBox(float, float, float)' /opt/ros/kinetic/lib/libg2o_types_slam2d.so: undefined reference to g2o::opengl::drawPoint(float)'
/opt/ros/kinetic/lib/libg2o_types_slam2d.so: undefined reference to g2o::opengl::drawArrow2D(float, float, float)' collect2: error: ld returned 1 exit status app/src/CMakeFiles/rtabmap.dir/build.make:962: recipe for target 'app/src/CMakeFiles/CMakeRelink.dir/rtabmap' failed make[2]: *** [app/src/CMakeFiles/CMakeRelink.dir/rtabmap] Error 1 CMakeFiles/Makefile2:480: recipe for target 'app/src/CMakeFiles/rtabmap.dir/preinstall' failed make[1]: *** [app/src/CMakeFiles/rtabmap.dir/preinstall] Error 2 Makefile:155: recipe for target 'prei

Would it be because I forgot to sudo make uninstall before I removed the whole directory?
Reply | Threaded
Open this post in threaded view
|

Re: Building rtabmap from source with ros

matlabbe
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Building rtabmap from source with ros

seanxu112
I am trying to compile rtabmap_ros again on TX2 for libpointmatcher. I updated detail on the same github issue:
https://github.com/introlab/rtabmap_ros/issues/399