rtabmap and alicevision, how to build and use?

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

rtabmap and alicevision, how to build and use?

Mikor
Hi Mathieu,

as the title says I am interested in using RTAB-map with alicevision. For starters, I was searching for some information on how to build RTAB-map with it and I found this dockerfile. I tried to build it but at step 23:

Step 23/26 : RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then git clone https://github.com/alicevision/AliceVision.git --recursive &&     cd AliceVision &&     git checkout 0f6115b6af6183c524aa7fcf26141337c1cf3872 &&     wget https://gist.githubusercontent.com/matlabbe/1df724465106c056ca4cc195c81d8cf0/raw/b3ed4cb8f9b270833a40d57d870a259eabfa4415/alicevision_0f6115b.patch &&     git apply alicevision_0f6115b.patch &&     mkdir build &&     cd build &&     cmake -DALICEVISION_USE_CUDA=OFF -DALICEVISION_USE_APRILTAG=OFF -DALICEVISION_BUILD_SOFTWARE=OFF .. &&     make -j$(nproc) &&     make install &&     cd &&     rm -r AliceVision; fi

but this results in an error:

[ 41%] Linking CXX static library ../../../../../Linux-x86_64/liblib_clp.a
[ 41%] Built target lib_clp
make: *** [Makefile:130: all] Error 2
The command '/bin/sh -c if [ "$TARGETPLATFORM" = "linux/amd64" ]; then git clone https://github.com/alicevision/AliceVision.git --recursive &&     cd AliceVision &&     git checkout 0f6115b6af6183c524aa7fcf26141337c1cf3872 &&     wget https://gist.githubusercontent.com/matlabbe/1df724465106c056ca4cc195c81d8cf0/raw/b3ed4cb8f9b270833a40d57d870a259eabfa4415/alicevision_0f6115b.patch &&     git apply alicevision_0f6115b.patch &&     mkdir build &&     cd build &&     cmake -DALICEVISION_USE_CUDA=OFF -DALICEVISION_USE_APRILTAG=OFF -DALICEVISION_BUILD_SOFTWARE=OFF .. &&     make -j$(nproc) &&     make install &&     cd &&     rm -r AliceVision; fi' returned a non-zero code: 2

I'd like some instructions on how to build this successfully please, also can you point out how this extra module works with rtabmap ? When I run
rtabmap-export --help | grep "AliceVision" 
--multiband               Enable multiband texturing (AliceVision dependency required).
  Is this the only involvement of the alicevision module? And does it refer to this ?
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap and alicevision, how to build and use?

Mikor
The actual error was not at the lines before it was raised as AliceVision package was built with multiple jobs (make -j N). So, when I used make -j 1 I had an error similar to this . The solution came after following the first comment that said that I have to update the gcc&g++ to a higher version:
sudo apt install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap and alicevision, how to build and use?

matlabbe
Administrator
Hi,

That docker image is based on ros noetic perception image, so maybe the g++10 was already installed there. To build AliceVision, we should also build its dependencies before here.

And yes, the only usage of AliceVision is for --multiband option in rtabmap-export and related options in Export Clouds dialog in standalone/dbviewer. It refers to texturing approach explained in the link you shared.

You can compare the following reconstruction without multiband and with multiband. I would say that with multiband, the results are very similar to output of photogrammetry (it is normal as Meshroom/AliceVision is a photogrammetry software).

cheers,
Mathieu