From d5cc8df89df8874f70d3edf72d23e7c070bd6710 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Wed, 20 Jul 2022 07:23:26 +0200 Subject: [PATCH 01/13] patch version bump --- appveyor.yml | 2 +- doc/source/doxygen-docs/changelog.md | 3 +++ package.xml | 2 +- version_prefix.txt | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6f2fae1376..ece8439f8e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ # version format -version: 2.5.0-{branch}-build{build} +version: 2.5.1-{branch}-build{build} os: Visual Studio 2019 diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 143a876165..94e191807a 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,5 +1,8 @@ \page changelog Change Log +# Version 2.5.1: UNRELEASED +- (none yet) + # Version 2.5.0: Released July 18th, 2022 - Changes in applications: - RawLogViewer: diff --git a/package.xml b/package.xml index eac505f2c1..0261e75faa 100644 --- a/package.xml +++ b/package.xml @@ -7,7 +7,7 @@ mrpt2 - 2.5.0 + 2.5.1 Mobile Robot Programming Toolkit (MRPT) version 2.x Jose-Luis Blanco-Claraco diff --git a/version_prefix.txt b/version_prefix.txt index 4123fc27e5..e3a2158dd5 100644 --- a/version_prefix.txt +++ b/version_prefix.txt @@ -1,4 +1,4 @@ -2.5.0 +2.5.1 # IMPORTANT: This file is parsed by CMake, don't add any comment to # the first line. # This file is used in both Windows and Linux scripts to automatically From e4746ac467a8dc11ea46950a0492cb22dc0dbcac Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Wed, 20 Jul 2022 10:33:55 +0200 Subject: [PATCH 02/13] FIX: assimp texture relative paths --- doc/source/doxygen-docs/changelog.md | 3 ++- libs/opengl/src/CAssimpModel.cpp | 15 ++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 94e191807a..ce109f02f1 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,7 +1,8 @@ \page changelog Change Log # Version 2.5.1: UNRELEASED -- (none yet) +- BUG FIXES: + - Fix regression: mrpt::opengl::CAssimpModel may fail to resolve texture relative paths. # Version 2.5.0: Released July 18th, 2022 - Changes in applications: diff --git a/libs/opengl/src/CAssimpModel.cpp b/libs/opengl/src/CAssimpModel.cpp index c5fe208851..dc525ff9ac 100644 --- a/libs/opengl/src/CAssimpModel.cpp +++ b/libs/opengl/src/CAssimpModel.cpp @@ -84,10 +84,7 @@ class TexturesCache entry.load_ok = mrpt::img::CImage::loadTGA( texturePath, entry.img_rgb, *entry.img_alpha); } - else - { - entry.load_ok = entry.img_rgb.loadFromFile(texturePath); - } + else { entry.load_ok = entry.img_rgb.loadFromFile(texturePath); } if (entry.load_ok) { @@ -429,10 +426,7 @@ static mrpt::img::TColor apply_material( { // return color4_to_TColor(diffuse); } - else - { - return defaultColor; - } + else { return defaultColor; } } static mrpt::math::CMatrixDouble44 aiMatrix_to_mrpt(const aiMatrix4x4& m) @@ -655,8 +649,7 @@ void CAssimpModel::process_textures(const aiScene* scene) } } - const auto basepath = mrpt::system::filePathSeparatorsToNative( - mrpt::system::extractFileDirectory(m_modelPath)); + const auto basepath = mrpt::system::extractFileDirectory(m_modelPath); for (auto& kv : m_textureIdMap) { @@ -671,7 +664,7 @@ void CAssimpModel::process_textures(const aiScene* scene) m_texturedObjects.emplace_back(CSetOfTexturedTriangles::Create()); const std::string fileloc = - mrpt::system::filePathSeparatorsToNative(basepath + filename); + mrpt::system::pathJoin({basepath, filename}); // Query textureCache: auto& cache = internal::TexturesCache::Instance(); From edb68489d6f86e8919e7b485cb6e27e421568dd2 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Wed, 20 Jul 2022 11:23:32 +0200 Subject: [PATCH 03/13] FIX: CMesh reversed texture coordinates --- doc/source/doxygen-docs/changelog.md | 1 + libs/opengl/src/CMesh.cpp | 4 ++-- samples/opengl_objects_demo/test.cpp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index ce109f02f1..6701e96a2a 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -3,6 +3,7 @@ # Version 2.5.1: UNRELEASED - BUG FIXES: - Fix regression: mrpt::opengl::CAssimpModel may fail to resolve texture relative paths. + - mrpt::opengl::CMesh was implementing texture coordinates flipping (u,v) wrt documented behavior. # Version 2.5.0: Released July 18th, 2022 - Changes in applications: diff --git a/libs/opengl/src/CMesh.cpp b/libs/opengl/src/CMesh.cpp index 3089e172aa..3f603cf44a 100644 --- a/libs/opengl/src/CMesh.cpp +++ b/libs/opengl/src/CMesh.cpp @@ -364,9 +364,9 @@ void CMesh::onUpdateBuffers_TexturedTriangles() for (int k = 0; k < 3; k++) { - tri.vertices[k].uv.x = - (tri.vertices[k].xyzrgba.pt.x - m_xMin) / (m_xMax - m_xMin); tri.vertices[k].uv.y = + (tri.vertices[k].xyzrgba.pt.x - m_xMin) / (m_xMax - m_xMin); + tri.vertices[k].uv.x = (tri.vertices[k].xyzrgba.pt.y - m_yMin) / (m_yMax - m_yMin); } diff --git a/samples/opengl_objects_demo/test.cpp b/samples/opengl_objects_demo/test.cpp index 17b6228b65..f4851a6b1c 100644 --- a/samples/opengl_objects_demo/test.cpp +++ b/samples/opengl_objects_demo/test.cpp @@ -500,7 +500,6 @@ void TestOpenGLObjects() if (im2.loadFromFile(texture_file2)) { im2.getAsMatrix(Z2); - Z2 = Z2.transpose().eval(); // mesh assumes z(x,y) vs z(y,x)! opengl::CMesh::Ptr obj = opengl::CMesh::Create( false /*transparency*/, // From dd793076cdabce92170dbd504999f521489b4877 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 06:35:45 +0200 Subject: [PATCH 04/13] format --- libs/opengl/src/CAssimpModel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/opengl/src/CAssimpModel.cpp b/libs/opengl/src/CAssimpModel.cpp index dc525ff9ac..acd91fed72 100644 --- a/libs/opengl/src/CAssimpModel.cpp +++ b/libs/opengl/src/CAssimpModel.cpp @@ -84,7 +84,10 @@ class TexturesCache entry.load_ok = mrpt::img::CImage::loadTGA( texturePath, entry.img_rgb, *entry.img_alpha); } - else { entry.load_ok = entry.img_rgb.loadFromFile(texturePath); } + else + { + entry.load_ok = entry.img_rgb.loadFromFile(texturePath); + } if (entry.load_ok) { @@ -426,7 +429,10 @@ static mrpt::img::TColor apply_material( { // return color4_to_TColor(diffuse); } - else { return defaultColor; } + else + { + return defaultColor; + } } static mrpt::math::CMatrixDouble44 aiMatrix_to_mrpt(const aiMatrix4x4& m) From 541352065550597a644e1aac212ea865e6722b63 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 09:28:23 +0200 Subject: [PATCH 05/13] FIX: build with emscc --- doc/source/doxygen-docs/changelog.md | 1 + libs/system/include/mrpt/system/CTicTac.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 6701e96a2a..db48e0aa51 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -4,6 +4,7 @@ - BUG FIXES: - Fix regression: mrpt::opengl::CAssimpModel may fail to resolve texture relative paths. - mrpt::opengl::CMesh was implementing texture coordinates flipping (u,v) wrt documented behavior. + - Fix `static_assert()` failure in CTicTac when building with latest emscripten clang compiler. # Version 2.5.0: Released July 18th, 2022 - Changes in applications: diff --git a/libs/system/include/mrpt/system/CTicTac.h b/libs/system/include/mrpt/system/CTicTac.h index fdeedb4b6e..4ecf27e78e 100644 --- a/libs/system/include/mrpt/system/CTicTac.h +++ b/libs/system/include/mrpt/system/CTicTac.h @@ -30,7 +30,7 @@ class CTicTac double Tac() const noexcept; private: - alignas(16) unsigned long largeInts[2]{0, 0}; + alignas(16) unsigned long largeInts[4]{0, 0}; }; // End of class def. } // namespace mrpt::system From 0c9ea81745f4e305c184c3abf86299feb3017724 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 09:39:34 +0200 Subject: [PATCH 06/13] update ref to nanoflann --- 3rdparty/nanoflann | 2 +- doc/source/doxygen-docs/changelog.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/3rdparty/nanoflann b/3rdparty/nanoflann index 3adbc464f3..2f54b8eb07 160000 --- a/3rdparty/nanoflann +++ b/3rdparty/nanoflann @@ -1 +1 @@ -Subproject commit 3adbc464f34a4a0f1194898ae669d841ae401e58 +Subproject commit 2f54b8eb07c719bc605445e4ec44d61240f5a2ce diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index db48e0aa51..770904367b 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,6 +1,8 @@ \page changelog Change Log # Version 2.5.1: UNRELEASED +- Changes in libraries: + - Embedded nanoflann version upgraded to v1.4.3 - BUG FIXES: - Fix regression: mrpt::opengl::CAssimpModel may fail to resolve texture relative paths. - mrpt::opengl::CMesh was implementing texture coordinates flipping (u,v) wrt documented behavior. From 5449209e4afcbf7804a30d34b6c4abc03824c107 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 14:18:15 +0200 Subject: [PATCH 07/13] sync nanoflann: avoid X11.h conflicts --- 3rdparty/nanoflann | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/nanoflann b/3rdparty/nanoflann index 2f54b8eb07..b62267612b 160000 --- a/3rdparty/nanoflann +++ b/3rdparty/nanoflann @@ -1 +1 @@ -Subproject commit 2f54b8eb07c719bc605445e4ec44d61240f5a2ce +Subproject commit b62267612bd9e0480e81ba03471300d25a28c22c From e165072c21f24ac9f2b1859eed1da46e1c0cbde9 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 14:30:18 +0200 Subject: [PATCH 08/13] bold points when selecting sensor in timeline UI --- apps/RawLogViewer/main_timeline.cpp | 33 +++++++++++++++++++++------ apps/RawLogViewer/xRawLogViewerMain.h | 3 ++- doc/source/doxygen-docs/changelog.md | 3 +++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/apps/RawLogViewer/main_timeline.cpp b/apps/RawLogViewer/main_timeline.cpp index 1d198ad7d4..030e2604b4 100644 --- a/apps/RawLogViewer/main_timeline.cpp +++ b/apps/RawLogViewer/main_timeline.cpp @@ -115,7 +115,7 @@ void xRawLogViewerFrame::createTimeLineObjects(wxFlexGridSizer* fgzMain) m_timeline.ySensorLabels = mrpt::opengl::CSetOfObjects::Create(); scene->insert(m_timeline.ySensorLabels); - m_timeline.allSensorDots = mrpt::opengl::CPointCloud::Create(); + m_timeline.allSensorDots = mrpt::opengl::CSetOfObjects::Create(); scene->insert(m_timeline.allSensorDots); m_timeline.cursor = mrpt::opengl::CBox::Create(); @@ -248,10 +248,6 @@ void xRawLogViewerFrame::rebuildBottomTimeLine() // Main per-sensor points: tl.allSensorDots->clear(); - tl.allSensorDots->setColor_u8(0x00, 0x00, 0xff, 0xff); - tl.allSensorDots->setPointSize(1.0f); - tl.allSensorDots->enableVariablePointSize(false); - tl.yCoordToSensorLabel.clear(); tl.ySensorLabels->clear(); @@ -265,6 +261,14 @@ void xRawLogViewerFrame::rebuildBottomTimeLine() { if (e.second.timOccurs.empty()) continue; + auto glDots = mrpt::opengl::CPointCloud::Create(); + tl.allSensorDots->insert(glDots); + + glDots->setColor_u8(0x00, 0x00, 0xff, 0xff); + glDots->setPointSize(1.0f); + glDots->enableVariablePointSize(false); + glDots->setName(e.first); + double lastX = -2; // actual coords go in [-1,1] for (const auto& tim : e.second.timOccurs) { @@ -279,7 +283,7 @@ void xRawLogViewerFrame::rebuildBottomTimeLine() continue; // no worth adding so many points lastX = x; - tl.allSensorDots->insertPoint(x, y0, 0); + glDots->insertPoint(x, y0, 0); } // Keep a map between vertical coords and sensor labels: @@ -656,9 +660,24 @@ std::optional> if (trackedSensorLabel.has_value() && glLb->getString() == *trackedSensorLabel) - glLb->setColor_u8(0xff, 0x00, 0x00, 0xff); + { glLb->setColor_u8(0xff, 0x00, 0x00, 0xff); } else + { glLb->setColor_u8(0x00, 0x00, 0x00, 0xff); + } + } + + // bold dots in selected line: + for (size_t i = 0;; i++) + { + auto glPts = tl.allSensorDots->getByClass(i); + if (!glPts) break; + + glPts->setPointSize( + (trackedSensorLabel.has_value() && + glPts->getName() == *trackedSensorLabel) + ? 4.0f + : 1.0f); } m_timeline.horizontalCursor->setVisibility(false); diff --git a/apps/RawLogViewer/xRawLogViewerMain.h b/apps/RawLogViewer/xRawLogViewerMain.h index 639f0229e6..72052d8b14 100644 --- a/apps/RawLogViewer/xRawLogViewerMain.h +++ b/apps/RawLogViewer/xRawLogViewerMain.h @@ -463,7 +463,8 @@ class xRawLogViewerFrame : public wxFrame mrpt::opengl::CBox::Ptr borderBox; mrpt::opengl::CSetOfObjects::Ptr xTicks; - mrpt::opengl::CPointCloud::Ptr allSensorDots; + /// one pointcloud per sensorLabel + mrpt::opengl::CSetOfObjects::Ptr allSensorDots; mrpt::opengl::CBox::Ptr cursor; mrpt::opengl::CBox::Ptr visiblePage; mrpt::opengl::CSetOfObjects::Ptr ySensorLabels; diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 770904367b..69e8ea4605 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,6 +1,9 @@ \page changelog Change Log # Version 2.5.1: UNRELEASED +- Changes in applications: + - RawLogViewer: + - Bold points when selecting a sensor in the timeline UI. - Changes in libraries: - Embedded nanoflann version upgraded to v1.4.3 - BUG FIXES: From 464f07187eb80a8ce0698ed337dd0bf41dabf59c Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 14:38:19 +0200 Subject: [PATCH 09/13] fix typos --- apps/benchmarking-image-features/src/mainwindow.cpp | 5 +++-- .../benchmarking-image-features/src/place_recognition.cpp | 2 +- apps/ptg-configurator/ptgConfiguratorMain.cpp | 3 +-- libs/comms/src/CSerialPort.cpp | 8 ++++---- libs/config/include/mrpt/config/CConfigFile.h | 2 +- libs/gui/include/mrpt/gui/CDisplayWindowPlots.h | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/benchmarking-image-features/src/mainwindow.cpp b/apps/benchmarking-image-features/src/mainwindow.cpp index 70185f4559..e79cd93e28 100644 --- a/apps/benchmarking-image-features/src/mainwindow.cpp +++ b/apps/benchmarking-image-features/src/mainwindow.cpp @@ -776,7 +776,7 @@ void MainWindow::on_detector_choose(int choice) { param1->setText("Threshold: "); param2->setText("MinimumDistance: "); - // param3->setText("Enable non maximal supression (true/false): "); + // param3->setText("Enable non maximal suppression (true/false): "); // param4->setText("Enable use KLT response (true/false): "); param1_edit->setText("20"); param2_edit->setText("5"); @@ -784,7 +784,8 @@ void MainWindow::on_detector_choose(int choice) // param4_edit->setText("true"); param1_boolean->setChecked(true); - param1_boolean->setText("Enable non maximal supression (true/false): "); + param1_boolean->setText( + "Enable non maximal suppression (true/false): "); param1_boolean->setVisible(true); param2_boolean->setChecked(true); param2_boolean->setText("Enable use KLT response (true/false): "); diff --git a/apps/benchmarking-image-features/src/place_recognition.cpp b/apps/benchmarking-image-features/src/place_recognition.cpp index 7098cff8dd..df88c490e8 100644 --- a/apps/benchmarking-image-features/src/place_recognition.cpp +++ b/apps/benchmarking-image-features/src/place_recognition.cpp @@ -413,7 +413,7 @@ string PlaceRecognition::startPlaceRecognition(CFeatureExtraction fext) this->total_vocab_size_org = len_train_words; this->training_file_written_flag = true; - } // end of writting training features to a file + } // end of writing training features to a file CTicTac testing_time; testing_time.Tic(); diff --git a/apps/ptg-configurator/ptgConfiguratorMain.cpp b/apps/ptg-configurator/ptgConfiguratorMain.cpp index 233f0f26a6..38966a4956 100644 --- a/apps/ptg-configurator/ptgConfiguratorMain.cpp +++ b/apps/ptg-configurator/ptgConfiguratorMain.cpp @@ -1473,8 +1473,7 @@ void ptgConfiguratorframe::OnExportSelectedPath(wxCommandEvent&) std::ofstream f(sFil.c_str()); if (!f.is_open()) - THROW_EXCEPTION_FMT( - "Cannot open file for writting: '%s'", sFil.c_str()); + THROW_EXCEPTION_FMT("Cannot open file for writing: '%s'", sFil.c_str()); f << "%\n"; f << "% File generated automatically by ptg-configurator, MRPT project.\n"; diff --git a/libs/comms/src/CSerialPort.cpp b/libs/comms/src/CSerialPort.cpp index 6ad854a6ff..413f68e6f1 100644 --- a/libs/comms/src/CSerialPort.cpp +++ b/libs/comms/src/CSerialPort.cpp @@ -358,7 +358,7 @@ void CSerialPort::setConfig( else { // Normal baudrate: Just in case, undo possible custom divisors: - //#ifdef HAVE_LINUX_SERIAL_H + // #ifdef HAVE_LINUX_SERIAL_H // struct serial_struct serial; // if (ioctl(hCOM, TIOCGSERIAL, &serial) < 0) // THROW_EXCEPTION("error on TIOCGSERIAL ioctl"); @@ -367,7 +367,7 @@ void CSerialPort::setConfig( // // if (ioctl(hCOM, TIOCSSERIAL, &serial) < 0) // THROW_EXCEPTION("error on TIOCSSERIAL ioctl"); - //#endif + // #endif } termios port_settings; @@ -777,8 +777,8 @@ size_t CSerialPort::Write(const void* Buffer, size_t Count) usecs = (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec); } while (usecs < 60); - // std::this_thread::sleep_for(1ms); // we'll continue writting is a - // ms. + // std::this_thread::sleep_for(1ms); + // we'll continue writing in 1 ms. } } while ((total_bytes_written < Count) && (!errno || EAGAIN == errno)); // diff --git a/libs/config/include/mrpt/config/CConfigFile.h b/libs/config/include/mrpt/config/CConfigFile.h index 33389a4bd6..270138356b 100644 --- a/libs/config/include/mrpt/config/CConfigFile.h +++ b/libs/config/include/mrpt/config/CConfigFile.h @@ -62,7 +62,7 @@ class CConfigFile : public CConfigFileBase CConfigFile(const std::string& fileName); /** Constructor, does not open any file. You should call "setFileName" - * before reading or writting or otherwise nothing will be read and write + * before reading or writing or otherwise nothing will be read and write * operations will be eventually lost. * However, it's perfectly right to use this object without an associated * file, in which case it will behave as an "in-memory" file. diff --git a/libs/gui/include/mrpt/gui/CDisplayWindowPlots.h b/libs/gui/include/mrpt/gui/CDisplayWindowPlots.h index 2026795d4b..13c0dfa29e 100644 --- a/libs/gui/include/mrpt/gui/CDisplayWindowPlots.h +++ b/libs/gui/include/mrpt/gui/CDisplayWindowPlots.h @@ -253,7 +253,7 @@ class CDisplayWindowPlots : public mrpt::gui::CBaseGUIWindow * \sa plot, hold_on, hold_off */ inline void clf() { clear(); } - /** Enables keeping all the graphs, instead of overwritting them. + /** Enables keeping all the graphs, instead of overwriting them. * \sa hold_off, plot */ void hold_on(); From c666128824b1c4011d79bb31f97367ba14a3c32c Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 14:43:33 +0200 Subject: [PATCH 10/13] fix inconsistent app naming --- .../CMakeLists.txt | 2 +- doc/man-pages/CMakeLists.txt | 1 - .../pod/benchmarking-image-features.pod | 9 ++--- .../pod/benchmarkingImageFeatures_GUI.pod | 37 ------------------- 4 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 doc/man-pages/pod/benchmarkingImageFeatures_GUI.pod diff --git a/apps/benchmarking-image-features/CMakeLists.txt b/apps/benchmarking-image-features/CMakeLists.txt index 6893bcf895..c4c6d4552a 100644 --- a/apps/benchmarking-image-features/CMakeLists.txt +++ b/apps/benchmarking-image-features/CMakeLists.txt @@ -1,6 +1,6 @@ include(../../cmakemodules/AssureCMakeRootFile.cmake) -project(benchmarkingImageFeatures_GUI) +project(benchmarking-image-features) if(CMAKE_MRPT_HAS_Qt5 AND CMAKE_MRPT_HAS_OPENCV AND NOT "${MRPT_OPENCV_VERSION}" VERSION_LESS "3.2" AND NOT WIN32 # added JLBC (may 2019): the app uses gcc-only headers dirent.h (!) diff --git a/doc/man-pages/CMakeLists.txt b/doc/man-pages/CMakeLists.txt index 9ad139c6be..d6644ee78c 100644 --- a/doc/man-pages/CMakeLists.txt +++ b/doc/man-pages/CMakeLists.txt @@ -77,7 +77,6 @@ if (PROG_GZIP AND PROG_POD2MAN) CREATE_MANPAGE_PROJECT(DifOdometry-Camera) CREATE_MANPAGE_PROJECT(robot-map-gui) CREATE_MANPAGE_PROJECT(benchmarking-image-features) - CREATE_MANPAGE_PROJECT(benchmarkingImageFeatures_GUI) CREATE_MANPAGE_PROJECT(yaml2ini) CREATE_MANPAGE_PROJECT(ini2yaml) CREATE_MANPAGE_PROJECT(rosbag2rawlog) diff --git a/doc/man-pages/pod/benchmarking-image-features.pod b/doc/man-pages/pod/benchmarking-image-features.pod index c3fa7bd60c..37cbbda13f 100644 --- a/doc/man-pages/pod/benchmarking-image-features.pod +++ b/doc/man-pages/pod/benchmarking-image-features.pod @@ -4,11 +4,11 @@ benchmarking-image-features - GUI app for different detector/descriptors =head1 SYNOPSIS -benchmarking-image-features [I] +benchmarking-image-features =head1 DESCRIPTION -A complete GUI viewer and editor of robotic datasets. +GUI app for different detector/descriptors. =head1 BUGS @@ -20,7 +20,6 @@ The application list and their documentation: https://docs.mrpt.org/reference/la =head1 AUTHORS - B is part of the Mobile Robot Programming Toolkit (MRPT), It under development by Raghavender Sahdev during the Google Summer of Code (GSOC) 2017 program. @@ -32,9 +31,7 @@ This manual page was written by Raghavender Sahdev This program is free software; you can redistribute it and/or modify it under the terms of the BSD License. -On Debian GNU/Linux systems, the complete text of the BSD License can be +On Debian GNU/Linux systems, the complete text of the BSD License can be found in `/usr/share/common-licenses/BSD'. =cut - - diff --git a/doc/man-pages/pod/benchmarkingImageFeatures_GUI.pod b/doc/man-pages/pod/benchmarkingImageFeatures_GUI.pod deleted file mode 100644 index b3dac3b878..0000000000 --- a/doc/man-pages/pod/benchmarkingImageFeatures_GUI.pod +++ /dev/null @@ -1,37 +0,0 @@ -=head1 NAME - -benchmarkingImageFeatures_GUI - GUI app for different detector/descriptors - -=head1 SYNOPSIS - -benchmarkingImageFeatures_GUI - -=head1 DESCRIPTION - -GUI app for different detector/descriptors. - -=head1 BUGS - -Please report bugs at https://github.com/MRPT/mrpt/issues - -=head1 SEE ALSO - -The application list and their documentation: https://docs.mrpt.org/reference/latest/applications.html - -=head1 AUTHORS - -B is part of the Mobile Robot Programming Toolkit (MRPT), It -under development by Raghavender Sahdev during the Google Summer of Code (GSOC) -2017 program. - -This manual page was written by Raghavender Sahdev . - -=head1 COPYRIGHT - -This program is free software; you can redistribute it and/or modify it -under the terms of the BSD License. - -On Debian GNU/Linux systems, the complete text of the BSD License can be -found in `/usr/share/common-licenses/BSD'. - -=cut From cf63a7051b5fe0c557ff33bb6b294028416a61eb Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 24 Jul 2022 14:44:36 +0200 Subject: [PATCH 11/13] Remove spare manual page --- doc/man-pages/CMakeLists.txt | 1 - doc/man-pages/pod/prrt-navigator-demo.pod | 42 ----------------------- 2 files changed, 43 deletions(-) delete mode 100644 doc/man-pages/pod/prrt-navigator-demo.pod diff --git a/doc/man-pages/CMakeLists.txt b/doc/man-pages/CMakeLists.txt index d6644ee78c..ea9071da04 100644 --- a/doc/man-pages/CMakeLists.txt +++ b/doc/man-pages/CMakeLists.txt @@ -53,7 +53,6 @@ if (PROG_GZIP AND PROG_POD2MAN) CREATE_MANPAGE_PROJECT(GridmapNavSimul) CREATE_MANPAGE_PROJECT(grid-matching) CREATE_MANPAGE_PROJECT(features-matching) - CREATE_MANPAGE_PROJECT(prrt-navigator-demo) CREATE_MANPAGE_PROJECT(holonomic-navigator-demo) CREATE_MANPAGE_PROJECT(navlog-viewer) CREATE_MANPAGE_PROJECT(hmt-slam) diff --git a/doc/man-pages/pod/prrt-navigator-demo.pod b/doc/man-pages/pod/prrt-navigator-demo.pod deleted file mode 100644 index 2f7d3e9bae..0000000000 --- a/doc/man-pages/pod/prrt-navigator-demo.pod +++ /dev/null @@ -1,42 +0,0 @@ -=head1 NAME - -prrt-navigator-demo - Mobile robot navigation simulator - -=head1 SYNOPSIS - -prrt-navigator-demo - -=head1 DESCRIPTION - -B is a GUI program that allows experimenting with a -new robot navigation algorithm based on Rapidly-exploring Random Tree (RTT) -exploration using Parameterized Trajectory Generators (PTGs). - -Refer to the source code and related papers for more information about the -method itself. - -=head1 BUGS - -Please report bugs at https://github.com/MRPT/mrpt/issues - -=head1 SEE ALSO - -The application list and their documentation: https://docs.mrpt.org/reference/latest/applications.html - -=head1 AUTHORS - -B is part of the Mobile Robot Programming Toolkit (MRPT), and was originally -written by the MAPIR laboratory (University of Malaga). - -This manual page was written by Jose Luis Blanco . - -=head1 COPYRIGHT - -This program is free software; you can redistribute it and/or modify it -under the terms of the BSD License. - -On Debian GNU/Linux systems, the complete text of the BSD License can be -found in `/usr/share/common-licenses/BSD'. - -=cut - From ae7bd1e80284e67f263d5e34e84e65cfcac77abd Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Tue, 26 Jul 2022 00:04:29 +0200 Subject: [PATCH 12/13] BUGFIX: yaml bool parsing (+unit tests) --- doc/source/doxygen-docs/changelog.md | 1 + .../containers/include/mrpt/containers/yaml.h | 10 ++++++- libs/containers/src/yaml_unittest.cpp | 29 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 69e8ea4605..80f084b913 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -10,6 +10,7 @@ - Fix regression: mrpt::opengl::CAssimpModel may fail to resolve texture relative paths. - mrpt::opengl::CMesh was implementing texture coordinates flipping (u,v) wrt documented behavior. - Fix `static_assert()` failure in CTicTac when building with latest emscripten clang compiler. + - Fix regression: yaml parsing boolean values may throw an exception inside `std::stoi()`. # Version 2.5.0: Released July 18th, 2022 - Changes in applications: diff --git a/libs/containers/include/mrpt/containers/yaml.h b/libs/containers/include/mrpt/containers/yaml.h index c8ff8b92b3..fc2d9dd302 100644 --- a/libs/containers/include/mrpt/containers/yaml.h +++ b/libs/containers/include/mrpt/containers/yaml.h @@ -1153,10 +1153,18 @@ T implAnyAsGetter(const mrpt::containers::yaml::scalar_t& s) if (storedType == typeid(std::string)) { const auto str = implAnyAsGetter(s); + std::optional intVal; + try + { + intVal = std::stoi(str); + } + catch (...) + { + } return str == "y" || str == "Y" || str == "yes" || str == "Yes" || str == "YES" || str == "true" || str == "True" || str == "TRUE" || str == "on" || str == "ON" || str == "On" || - std::stoi(str) != 0; + (intVal.has_value() && intVal.value() != 0); } } diff --git a/libs/containers/src/yaml_unittest.cpp b/libs/containers/src/yaml_unittest.cpp index 1bd1d52d46..508df2cab0 100644 --- a/libs/containers/src/yaml_unittest.cpp +++ b/libs/containers/src/yaml_unittest.cpp @@ -939,4 +939,33 @@ MRPT_TEST(yaml, fromJSON) } MRPT_TEST_END() +MRPT_TEST(yaml, booleanVersions) +{ + mrpt::containers::yaml p; + p["b01"] = "0"; + p["b02"] = "False"; + p["b03"] = "false"; + p["b04"] = "FALSE"; + p["b05"] = "No"; + + p["b11"] = "1"; + p["b12"] = "True"; + p["b13"] = "true"; + p["b14"] = "TRUE"; + p["b15"] = "Yes"; + + EXPECT_EQ(p["b01"].as(), false); + EXPECT_EQ(p["b02"].as(), false); + EXPECT_EQ(p["b03"].as(), false); + EXPECT_EQ(p["b04"].as(), false); + EXPECT_EQ(p["b05"].as(), false); + + EXPECT_EQ(p["b11"].as(), true); + EXPECT_EQ(p["b12"].as(), true); + EXPECT_EQ(p["b13"].as(), true); + EXPECT_EQ(p["b14"].as(), true); + EXPECT_EQ(p["b15"].as(), true); +} +MRPT_TEST_END() + #endif // MRPT_HAS_FYAML From 7c6bcc69beea0ce4d59b82eb0a314ee69eca1ef5 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Thu, 4 Aug 2022 00:36:55 +0200 Subject: [PATCH 13/13] update release date --- doc/source/doxygen-docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index 80f084b913..ab3774b8ab 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,6 +1,6 @@ \page changelog Change Log -# Version 2.5.1: UNRELEASED +# Version 2.5.1: Released August 4th, 2022 - Changes in applications: - RawLogViewer: - Bold points when selecting a sensor in the timeline UI.