Skip to content

Commit

Permalink
Docker updated artful image. Memory: fixed 2x icp correspondence rati…
Browse files Browse the repository at this point in the history
…o error (>1.0) when creating registration for icp proximity detection
  • Loading branch information
matlabbe committed Mar 22, 2018
1 parent ef017c9 commit 420feca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
17 changes: 14 additions & 3 deletions corelib/src/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
14 changes: 1 addition & 13 deletions docker/artful/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
libpcl-dev \
git \
cmake \
libopencv-dev \
libproj-dev \
libqt5svg5-dev \
libfreenect-dev \
Expand All @@ -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

Expand Down

0 comments on commit 420feca

Please sign in to comment.