mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Docker updated artful image. Memory: fixed 2x icp correspondence ratio error (>1.0) when creating registration for icp proximity detection
This commit is contained in:
@@ -121,7 +121,13 @@ Memory::Memory(const ParametersMap & parameters) :
|
|||||||
float corRatio = Parameters::defaultIcpCorrespondenceRatio();
|
float corRatio = Parameters::defaultIcpCorrespondenceRatio();
|
||||||
Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio);
|
Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio);
|
||||||
ParametersMap paramsMulti = parameters;
|
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);
|
_registrationIcpMulti = new RegistrationIcp(paramsMulti);
|
||||||
|
|
||||||
_occupancy = new OccupancyGrid(parameters);
|
_occupancy = new OccupancyGrid(parameters);
|
||||||
@@ -569,12 +575,17 @@ void Memory::parseParameters(const ParametersMap & parameters)
|
|||||||
{
|
{
|
||||||
if(uContains(params, Parameters::kIcpCorrespondenceRatio()))
|
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
|
// for local scan matching, correspondences ratio should be two times higher as we expect more matches
|
||||||
float corRatio = Parameters::defaultIcpCorrespondenceRatio();
|
float corRatio = Parameters::defaultIcpCorrespondenceRatio();
|
||||||
Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio);
|
Parameters::parse(parameters, Parameters::kIcpCorrespondenceRatio(), corRatio);
|
||||||
ParametersMap paramsMulti = params;
|
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);
|
_registrationIcpMulti->parseParameters(paramsMulti);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libpcl-dev \
|
libpcl-dev \
|
||||||
git \
|
git \
|
||||||
cmake \
|
cmake \
|
||||||
|
libopencv-dev \
|
||||||
libproj-dev \
|
libproj-dev \
|
||||||
libqt5svg5-dev \
|
libqt5svg5-dev \
|
||||||
libfreenect-dev \
|
libfreenect-dev \
|
||||||
@@ -17,19 +18,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
|
|
||||||
WORKDIR /root/
|
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
|
# Clone source code
|
||||||
RUN git clone https://github.com/introlab/rtabmap.git
|
RUN git clone https://github.com/introlab/rtabmap.git
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user