Ask Your Question
0

'make' fails when building the rtabmap package.

asked 2019-07-31 19:28:15 -0600

MalarJN gravatar image

updated 2019-08-02 22:35:51 -0600

Hi,

I was using rtabmap_ros version 0.17.6 and working on SLAM with Gazebo as shown here. I wanted to take a look at the map that is stored in ~/.ros/rtabmap.db and saw that I needed the database viewer tool for that.

So this is where I think I played around and messed things up.

I noticed that I only had a folder called 'rtabmap_ros' and no folder called 'rtabmap' and when I tried to run the following command:

rtabmap-databaseViewer~/.ros/rtabmap.db

I got the error message:

[ERROR] (2019-07-31 21:11:51.053)  DBDriverSqlite3.cpp:398::connectDatabaseQuery() Opened database version (0.18.3) is more recent than rtabmap installed version (0.17.6). Please update rtabmap to new version!

So I tried to install RTAB-Map standalone libraries as shown in step 2 of 'Build from source', to later update to a newer version as shown at the end of the tutorial and it failed at make. So I uninstalled rtabmap and rtabmap_ros and then tried the installation instructions from the beginning and still the make in step 2 failed.

So I thought I might have to remove all rtabmap and rtabmap_ros folders already in the VM apart from unistalling the packages and start from the beginning. However, this time step 2 fails with:

CMake Error at rtabmap_ros/CMakeLists.txt:34 (find_package):   Could not find a configuration file for package "RTABMap" that is   compatible with requested version "0.19.3".

 The following configuration files were considered but not accepted:

/usr/local/lib/rtabmap-0.18/RTABMapConfig.cmake, version: 0.18.3
/opt/ros/kinetic/lib/x86_64-linux-gnu/rtabmap-0.17/RTABMapConfig.cmake, version: 0.17.6
/usr/local/lib/rtabmap-0.18/RTABMapConfig.cmake, version: 0.18.3

-- Configuring incomplete, errors occurred! See also
"/home/malar/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also
"/home/malar/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

Now I am at a loss of how to fix this issue. I still have the 'rtabmap_ros' and 'rtabmap' folders that I deleted in trash (just in case). Do I just move them back into their place?

And ever since I tried to update the 'rtabmap_ros' packages, when I run roslaunch rtabmap_ros demo_turtlebot_mapping.launch simulation:=true. I get the following error:

Failed to load nodelet [/rtabmap/rtabmap] of type [rtabmap_ros/rtabmap] even after refreshing the cache: MultiLibraryClassLoader: Could not create object of class type rtabmap_ros::CoreWrapper as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()

The error before refreshing the cache was: MultiLibraryClassLoader: Could not create object of class type rtabmap_ros::CoreWrapper as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()

How do I successfully update rtabmap and rtabmap_ros to be able to use the database viewer tool? If not, how do I restore everything back to how it was, so that at the very least rtabmap_ros works?

Edit: So, I moved the 'rtabmap_ros' folders to their original ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-01 13:16:42 -0600

matlabbe gravatar image

You may have multiple versions of rtabmap. rtabmap-databaseViewer is installed with the binaries. To make it simple, remove rtabmap installed by source, then make sure you upgrade both ros-kinetic-rtabmap and ros-kinetic-rtabmap-ros packages to latest version:

$ sudo rm -r /usr/local/bin/rtabmap*
$ sudo rm -r /usr/local/lib/rtabmap*
$ sudo rm -r /usr/local/lib/librtabmap*
$ sudo rm -r /usr/local/include/rtabmap*

$ sudo apt-get install ros-kinetic-rtabmap-ros ros-kinetic-rtabmap

cheers,
Mathieu

edit flag offensive delete link more

Comments

Hi Mathieu,

Thank you very much for your response. I followed your suggestion and installed rtabmap and rtabmap_ros again following this tutorial. I built rtabmap successfully, however, catkin_make -j1 fails for rtabmap_ros with the following error:

make[2]: *** No rule to make target '/usr/local/lib/librtabmap_core.so', needed by '/home/malar/catkin_ws/devel/lib/rtabmap_ros/pointcloud_to_depthimage'.  Stop.
CMakeFiles/Makefile2:10766: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_pointcloud_to_depthimage.dir/all' failed
make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_pointcloud_to_depthimage.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed

How would I fix this?

Best regards, Malar.

MalarJN gravatar imageMalarJN ( 2019-08-05 16:28:31 -0600 )edit

I built it from source using this tutorial and it worked the second time. Thank you.

MalarJN gravatar imageMalarJN ( 2019-08-08 21:40:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-07-31 19:28:15 -0600

Seen: 123 times

Last updated: Aug 02