Standalone RTABMAP not finding freenect2 driver :(

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

Standalone RTABMAP not finding freenect2 driver :(

dify1492
Hi,

So I have libfreenect2 driver installed on ~/ on Ubuntu18.04 and Protonect on ~/libfreenect2/build/bin works fine with my kinect v2. At this point I only have rtabmap built from source on my ~/rtabmap directory.
However, when I launch ~/rtabmap/bin/rtabmap and go under detection -> select source -> rgbd -> kinect v2   freenect2 driver is unavailable to use (colored in gray).

I am not sure how to specify cmake -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2 for CMake based third-party application to find libfreenect2. I think that is my current problem I'm stuck at.

Can someone guide me how to get that correctly done so that when i build rtabmap from ~/rtabmap/build it'll find the correct freenect2 driver?

Right now here is what running cmake .. on ~/rtabmap/build shows about the Freenect2 location. And it shows  With Freenect2            = YES.



Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Standalone RTABMAP not finding freenect2 driver :(

matlabbe
Administrator
Hi,

If you do ~/rtabmap/bin/rtabmap --version, does it show:
With Freenect2:           true
too ?

If CMake tells that "With Freenect2            = YES", then --version above should show yes too and the freenect2 driver should be enabled.

Note that sometimes not the right rtabmap is started when launching just with "rtabmap", the melodic binaries are taken instead. You can make sure that binaries are uninstalled:
sudo apt remove ros-melodic-rtabmap 

Other issue is that the right "rtabmap" is taken, but the the right librtabmap_core.so is loading on runtime. You can do "ldd ~/rtabmap/bin/rtabmap" to make sure it uses the right library.

cheers,
Mathieu