Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 3, 2022
2 parents 97edfdb + 7c6bcc6 commit 4cfc607
Show file tree
Hide file tree
Showing 24 changed files with 102 additions and 119 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/nanoflann
33 changes: 26 additions & 7 deletions apps/RawLogViewer/main_timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();

Expand All @@ -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)
{
Expand All @@ -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:
Expand Down Expand Up @@ -656,9 +660,24 @@ std::optional<std::pair<double, size_t>>

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<mrpt::opengl::CPointCloud>(i);
if (!glPts) break;

glPts->setPointSize(
(trackedSensorLabel.has_value() &&
glPts->getName() == *trackedSensorLabel)
? 4.0f
: 1.0f);
}

m_timeline.horizontalCursor->setVisibility(false);
Expand Down
3 changes: 2 additions & 1 deletion apps/RawLogViewer/xRawLogViewerMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion apps/benchmarking-image-features/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 (!)
Expand Down
5 changes: 3 additions & 2 deletions apps/benchmarking-image-features/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,16 @@ 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");
// param3_edit->setText("true");
// 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): ");
Expand Down
2 changes: 1 addition & 1 deletion apps/benchmarking-image-features/src/place_recognition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions apps/ptg-configurator/ptgConfiguratorMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# version format
version: 2.5.0-{branch}-build{build}
version: 2.5.1-{branch}-build{build}

os: Visual Studio 2019

Expand Down
2 changes: 0 additions & 2 deletions doc/man-pages/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -77,7 +76,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)
Expand Down
9 changes: 3 additions & 6 deletions doc/man-pages/pod/benchmarking-image-features.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ benchmarking-image-features - GUI app for different detector/descriptors

=head1 SYNOPSIS

benchmarking-image-features [I<dataset.rawlog>]
benchmarking-image-features

=head1 DESCRIPTION

A complete GUI viewer and editor of robotic datasets.
GUI app for different detector/descriptors.

=head1 BUGS

Expand All @@ -20,7 +20,6 @@ The application list and their documentation: https://docs.mrpt.org/reference/la

=head1 AUTHORS


B<benchmarking-image-features> is part of the Mobile Robot Programming Toolkit (MRPT), It
under development by Raghavender Sahdev during the Google Summer of Code (GSOC)
2017 program.
Expand All @@ -32,9 +31,7 @@ This manual page was written by Raghavender Sahdev <raghavendersahdev@gmail.com>
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


37 changes: 0 additions & 37 deletions doc/man-pages/pod/benchmarkingImageFeatures_GUI.pod

This file was deleted.

42 changes: 0 additions & 42 deletions doc/man-pages/pod/prrt-navigator-demo.pod

This file was deleted.

12 changes: 12 additions & 0 deletions doc/source/doxygen-docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
\page changelog Change Log

# Version 2.5.1: Released August 4th, 2022
- 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:
- 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:
- RawLogViewer:
Expand Down
8 changes: 4 additions & 4 deletions libs/comms/src/CSerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -367,7 +367,7 @@ void CSerialPort::setConfig(
//
// if (ioctl(hCOM, TIOCSSERIAL, &serial) < 0)
// THROW_EXCEPTION("error on TIOCSSERIAL ioctl");
//#endif
// #endif
}

termios port_settings;
Expand Down Expand Up @@ -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));
//
Expand Down
2 changes: 1 addition & 1 deletion libs/config/include/mrpt/config/CConfigFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion libs/containers/include/mrpt/containers/yaml.h
Original file line number Diff line number Diff line change
Expand Up @@ -1153,10 +1153,18 @@ T implAnyAsGetter(const mrpt::containers::yaml::scalar_t& s)
if (storedType == typeid(std::string))
{
const auto str = implAnyAsGetter<std::string>(s);
std::optional<int> 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);
}
}

Expand Down
29 changes: 29 additions & 0 deletions libs/containers/src/yaml_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(), false);
EXPECT_EQ(p["b02"].as<bool>(), false);
EXPECT_EQ(p["b03"].as<bool>(), false);
EXPECT_EQ(p["b04"].as<bool>(), false);
EXPECT_EQ(p["b05"].as<bool>(), false);

EXPECT_EQ(p["b11"].as<bool>(), true);
EXPECT_EQ(p["b12"].as<bool>(), true);
EXPECT_EQ(p["b13"].as<bool>(), true);
EXPECT_EQ(p["b14"].as<bool>(), true);
EXPECT_EQ(p["b15"].as<bool>(), true);
}
MRPT_TEST_END()

#endif // MRPT_HAS_FYAML
2 changes: 1 addition & 1 deletion libs/gui/include/mrpt/gui/CDisplayWindowPlots.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading

0 comments on commit 4cfc607

Please sign in to comment.