From 420fecad51e2654e5118a821548a3af463c52471 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Thu, 22 Mar 2018 11:22:47 -0400 Subject: [PATCH] Docker updated artful image. Memory: fixed 2x icp correspondence ratio error (>1.0) when creating registration for icp proximity detection --- corelib/src/Memory.cpp | 17 ++++++++++++++--- docker/artful/Dockerfile | 14 +------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/corelib/src/Memory.cpp b/corelib/src/Memory.cpp index 4869fb84a5..9c6a98e9f0 100644 --- a/corelib/src/Memory.cpp +++ b/corelib/src/Memory.cpp @@ -121,7 +121,13 @@ Memory::Memory(const ParametersMap & parameters) : float corRatio = Parameters::defaultIcpCorrespondenceRatio(); Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio); ParametersMap paramsMulti = parameters; - paramsMulti.insert(ParametersPair(Parameters::kIcpCorrespondenceRatio(), uNumber2Str(corRatio*2.0f))); + paramsMulti.insert(ParametersPair(Parameters::kIcpCorrespondenceRatio(), uNumber2Str(corRatio>=0.5f?1.0f:corRatio*2.0f))); + if(corRatio >= 0.5) + { + UWARN( "%s is >=0.5, which sets correspondence ratio for proximity detection using " + "laser scans to 100% (2 x Ratio). You may lower the ratio to accept proximity " + "detection with not full scans overlapping."); + } _registrationIcpMulti = new RegistrationIcp(paramsMulti); _occupancy = new OccupancyGrid(parameters); @@ -569,12 +575,17 @@ void Memory::parseParameters(const ParametersMap & parameters) { if(uContains(params, Parameters::kIcpCorrespondenceRatio())) { - // for local scan matching, correspondences ratio should be two times higher as we expect more matches // for local scan matching, correspondences ratio should be two times higher as we expect more matches float corRatio = Parameters::defaultIcpCorrespondenceRatio(); Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio); ParametersMap paramsMulti = params; - paramsMulti.at(Parameters::kIcpCorrespondenceRatio()) = uNumber2Str(corRatio*2.0f); + paramsMulti.insert(ParametersPair(Parameters::kIcpCorrespondenceRatio(), uNumber2Str(corRatio>=0.5f?1.0f:corRatio*2.0f))); + if(corRatio >= 0.5) + { + UWARN( "%s is >=0.5, which sets correspondence ratio for proximity detection using " + "laser scans to 100% (2 x Ratio). You may lower the ratio to accept proximity " + "detection with not full scans overlapping."); + } _registrationIcpMulti->parseParameters(paramsMulti); } else diff --git a/docker/artful/Dockerfile b/docker/artful/Dockerfile index 5169b3067a..9de9c79eec 100644 --- a/docker/artful/Dockerfile +++ b/docker/artful/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \ libpcl-dev \ git \ cmake \ + libopencv-dev \ libproj-dev \ libqt5svg5-dev \ libfreenect-dev \ @@ -17,19 +18,6 @@ RUN apt-get update && apt-get install -y \ WORKDIR /root/ -# using OpenCV from source because ffmpeg (libavutil..) error with opencv binaries: -# rtabmap: symbol lookup error: /usr/lib/x86_64-linux-gnu/libavutil.so.55: undefined symbol: vdp_device_create_x11 -# ffmpeg above should be installed before building opencv - -RUN git clone https://github.com/opencv/opencv_contrib.git -RUN git clone https://github.com/opencv/opencv.git -RUN cd opencv && mkdir build && cd build && \ - cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF .. && \ - make -j$(nproc) && \ - make install && \ - cd ../.. && \ - rm -rf opencv opencv_contrib - # Clone source code RUN git clone https://github.com/introlab/rtabmap.git