Error while compiling latest Rtabmap version

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

Error while compiling latest Rtabmap version

g.bartoli
Hi Mathieu,
I just pulled the latest RTAB-Map version 0.11.7 from the github repository. With the usual git pull master and make procedure, I succesfully compiled the rtabmap library, but when I tried to build the ROS package with catkin_make, I received this error:
CMakeFiles/camera.dir/src/CameraNode.cpp.o: In function `CameraWrapper::setParameters(int, double, std::string const&, bool)':
CameraNode.cpp:(.text._ZN13CameraWrapper13setParametersEidRKSsb[_ZN13CameraWrapper13setParametersEidRKSsb]+0x8b0):
    undefined reference to `rtabmap::CameraImages::CameraImages(std::string const&, float, rtabmap::Transform const&)'
CameraNode.cpp:(.text._ZN13CameraWrapper13setParametersEidRKSsb[_ZN13CameraWrapper13setParametersEidRKSsb]+0xb77):
    undefined reference to `rtabmap::CameraThread::CameraThread(
        rtabmap::Camera*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/vision/catkin_ws/devel/lib/rtabmap_ros/camera] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/camera.dir/all] Error 2
I am using ROS Indigo and previously RTAB-Map 0.10.10 was working fine, I installed all the required libraries using the procedure explained here.
I think it's a linker problem, but it seems related to something missing from rtabmap library and not depending on other components outside rtabmap... Do you have an idea on what is the problem here?

Many thanks,
Guido
~Guido
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

g.bartoli
To be sure that nothing was left behind from the previous version, I also tried to remove rtabmap library and rtabmap_ros folder, then I proceeded for a complete download/compile/install procedure of both components, but I receive the same error...
~Guido
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

matlabbe
Administrator
Hi Guido,

You can look at this post: https://github.com/introlab/rtabmap_ros/issues/67#issuecomment-209100954

Make sure that rtabmap library is installed in rtabmap-0.11 directory, not rtabmap-0.10 directory. Removing the CMakeCache.txt of the rtabmap's build directory and build again would be enough:
$ cd rtabmap
$ git pull origin master
$ cd build
$ rm CMakeCache.txt
$ cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel ..
$ make
$ make install

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

matlabbe
Administrator
If you cleaned up everything, it is indeed a bug. However, 0.11 binaries can be built on the build farm: http://repositories.ros.org/status_page/ros_indigo_default.html?q=rtabmap
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

g.bartoli
In reply to this post by matlabbe
Wow, you're the boss... that was it, just removing build/CMakeCache.txt was sufficient, excuse me for not searching this among rtabmap official issues.

Many many thanks!
~Guido
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

g.bartoli
Just as a note, even if it is working now, I have this file
~/catkin_ws/devel/include/rtabmap-0.11/rtabmap/core/StereoCameraModel.h
mentioned here where you state that it shouldn't be there...

And, it is now safe to remove "catkin_ws/devel/include/rtabmap-0.10"?
~Guido
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

matlabbe
Administrator
It is safe to remove rtabmap-0.10. For StereoCameraModel.h, it may be confusing but yes it should be there. I was referring that if it is there and still have missing StereoCameraModel.h error, it could be that wrong include directories are set for rtabmap. I updated the comment.

Another post for migration from 0.10 to 0.11 that you may be interested: https://github.com/introlab/rtabmap_ros/issues/58

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling latest Rtabmap version

g.bartoli
Ok, thank you Mathieu!
~Guido