Skip to content

Commit

Permalink
Merge pull request #1263 from MRPT/develop
Browse files Browse the repository at this point in the history
Merge for release v2.5.7
  • Loading branch information
jlblancoc authored Nov 25, 2022
2 parents b989c96 + 2531a53 commit 6c277a0
Show file tree
Hide file tree
Showing 185 changed files with 1,121 additions and 472 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- image: mrpt/mrpt-build-env:full-bionic
steps:
- checkout
- run: apt install clang-format-10 -yq
- run: apt install clang-format-11 -yq
- run: git submodule sync
- run: git submodule update --init --recursive
- run: pip3 install --user -r .circleci/python_reqs.txt
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,21 @@ jobs:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
ubuntu-22.04-gcc,
ubuntu-latest-clang,
ubuntu-latest-gcc
]

build_type: [ Release ]
include:
- name: ubuntu-22.04-gcc
os: ubuntu-22.04
compiler: gcc
coverage: OFF
extra_pkgs_to_install: libdc1394-dev

- name: ubuntu-latest-clang
os: ubuntu-latest
compiler: clang
coverage: OFF
extra_pkgs_to_install: libdc1394-22-dev

- name: ubuntu-latest-gcc
os: ubuntu-latest
compiler: gcc
coverage: ON
extra_pkgs_to_install: libdc1394-22-dev

steps:
- name: Checkout
Expand All @@ -68,10 +59,9 @@ jobs:
libavformat-dev libswscale-dev libpcap-dev \
liboctomap-dev libopenni2-dev \
libtinyxml2-dev \
libdc1394-dev \
yamllint
sudo apt install ${{ matrix.extra_pkgs_to_install }}
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt install libicu-dev libsimpleini-dev
# to enable pymrpt:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt install clang-format-10 -yq
sudo apt install clang-format-11 -yq
pip3 install --user -r .circleci/python_reqs.txt
- name: Check code style
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/nanoflann
Submodule nanoflann updated 154 files
4 changes: 3 additions & 1 deletion apps/2d-slam-demo/slamdemoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,9 @@ void slamdemoFrame::executeOneStep()

// Save dataset to file?
if (m_rawlog_out_file.fileOpenCorrectly())
{ archiveFrom(m_rawlog_out_file) << act << sf; }
{
archiveFrom(m_rawlog_out_file) << act << sf;
}
}

// For the case of doing D.A., save the correspondences REAL_MAP <->
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/CFormEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,9 @@ void leave_horizontalScans(
auto* o = static_cast<CObservation2DRangeScan*>(obs.get());

if (fabs(o->sensorPose.pitch()) > minPitchToDeleteLaserScan)
{ it = SF->erase(it); }
{
it = SF->erase(it);
}
else
{
changesCount++; // Count success
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/CFormPlayVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ void CFormPlayVideo::OnbtnPlayClick(wxCommandEvent&)
bool doDelay = false;

if (auto sf = std::dynamic_pointer_cast<CSensoryFrame>(obj); sf)
{ doDelay = showSensoryFrame(*sf, nImgs, imgTimestamp); }
{
doDelay = showSensoryFrame(*sf, nImgs, imgTimestamp);
}
else if (IS_DERIVED(*obj, CObservation))
{
CSensoryFrame sf2;
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/CFormRawMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ void loadMapInto3DScene(COpenGLScene& scene)
auto this_t = it.first;

if (distanceBetweenPoints(x0, y0, z0, p.x, p.y, p.z) < 5.5)
{ obj->appendLine(x0, y0, z0, p.x, p.y, p.z); }
{
obj->appendLine(x0, y0, z0, p.x, p.y, p.z);
}
else if (last_t)
{
// We have a gap without GT:
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/CScanAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ bool CScanAnimation::update_opengl_viz(const CSensoryFrame& sf)
(tim_last != INVALID_TIMESTAMP &&
fabs(mrpt::system::timeDifference(ro.timestamp, tim_last)) >
largest_period))
{ lst_to_delete.push_back(o.first); }
{
lst_to_delete.push_back(o.first);
}
}

// Remove too old observations:
Expand Down
8 changes: 6 additions & 2 deletions apps/RawLogViewer/main_convert_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,9 @@ void xRawLogViewerFrame::OnMenuShiftTimestampsByLabel(wxCommandEvent& event)
_("%u changes. Do you want to re-order by timestamp?"),
nChanges),
_("Done"), wxYES_NO, this))
{ OnMenuResortByTimestamp(event); }
{
OnMenuResortByTimestamp(event);
}

WX_END_TRY
}
Expand Down Expand Up @@ -1016,7 +1018,9 @@ void xRawLogViewerFrame::OnMenuConvertSF(wxCommandEvent& event)
countLoop,
wxString::Format(
wxT("Parsing rawlog... %u objects"), countLoop)))
{ return; }
{
return;
}
wxTheApp->Yield(); // Let the app. process messages
}

Expand Down
24 changes: 18 additions & 6 deletions apps/RawLogViewer/main_gps_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ void xRawLogViewerFrame::OnMenuDrawGPSPath(wxCommandEvent& event)
CObservation::Ptr o =
sf->getObservationBySensorLabel(the_label);
if (o && IS_CLASS(*o, CObservationGPS))
{ obs = std::dynamic_pointer_cast<CObservationGPS>(o); }
{
obs = std::dynamic_pointer_cast<CObservationGPS>(o);
}
}
break;

Expand All @@ -124,7 +126,9 @@ void xRawLogViewerFrame::OnMenuDrawGPSPath(wxCommandEvent& event)

if (!os::_strcmpi(o->sensorLabel.c_str(), the_label.c_str()) &&
IS_CLASS(*o, CObservationGPS))
{ obs = std::dynamic_pointer_cast<CObservationGPS>(o); }
{
obs = std::dynamic_pointer_cast<CObservationGPS>(o);
}
}
break;

Expand All @@ -134,7 +138,9 @@ void xRawLogViewerFrame::OnMenuDrawGPSPath(wxCommandEvent& event)
// If we had a GPS obs, process it:
const mrpt::obs::gnss::Message_NMEA_GGA* gga = nullptr;
if (obs && obs->hasMsgClass<mrpt::obs::gnss::Message_NMEA_GGA>())
{ gga = &obs->getMsgByClass<mrpt::obs::gnss::Message_NMEA_GGA>(); }
{
gga = &obs->getMsgByClass<mrpt::obs::gnss::Message_NMEA_GGA>();
}

if (gga &&
(!only_rtk || gga->fields.fix_quality == 4 ||
Expand Down Expand Up @@ -219,10 +225,14 @@ void fixGPStimestamp(

const gnss::Message_NMEA_GGA* gga = nullptr;
if (obs && obs->hasMsgClass<gnss::Message_NMEA_GGA>())
{ gga = &obs->getMsgByClass<gnss::Message_NMEA_GGA>(); }
{
gga = &obs->getMsgByClass<gnss::Message_NMEA_GGA>();
}
const gnss::Message_NMEA_RMC* rmc = nullptr;
if (obs && obs->hasMsgClass<gnss::Message_NMEA_RMC>())
{ rmc = &obs->getMsgByClass<gnss::Message_NMEA_RMC>(); }
{
rmc = &obs->getMsgByClass<gnss::Message_NMEA_RMC>();
}

if (gga && gga->fields.fix_quality > 0)
{
Expand Down Expand Up @@ -354,7 +364,9 @@ void xRawLogViewerFrame::OnMenuRegenerateGPSTimestamps(wxCommandEvent& event)
"Do you want to re-order by timestamp?"),
nChanges, average_time_change, std_time_change),
_("Done"), wxYES_NO, this))
{ OnMenuResortByTimestamp(event); }
{
OnMenuResortByTimestamp(event);
}

WX_END_TRY
}
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/main_images_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ void xRawLogViewerFrame::OnMenuMono2Stereo(wxCommandEvent& event)
countLoop,
wxString::Format(
wxT("Parsing rawlog... %u objects"), countLoop)))
{ return; }
{
return;
}
wxTheApp->Yield(); // Let the app. process messages
}

Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/main_show_selected_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ catch (CExceptionExternalImageNotFound& e)
this, _("Choose the base directory for relative image paths"),
CImage::getImagesPathBase().c_str(), 0, wxDefaultPosition);
if (dirDialog.ShowModal() == wxID_OK)
{ CImage::setImagesPathBase(string(dirDialog.GetPath().mb_str())); }
{
CImage::setImagesPathBase(string(dirDialog.GetPath().mb_str()));
}
}
}
catch (const std::exception& e)
Expand Down
4 changes: 3 additions & 1 deletion apps/RawLogViewer/main_timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,9 @@ 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);
Expand Down
12 changes: 9 additions & 3 deletions apps/RawLogViewer/xRawLogViewerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2942,7 +2942,9 @@ void xRawLogViewerFrame::OnFileCountEntries(wxCommandEvent&)
if (newObj->GetRuntimeClass() == CLASS_ID(CSensoryFrame) ||
newObj->GetRuntimeClass() == CLASS_ID(CActionCollection) ||
newObj->GetRuntimeClass() == CLASS_ID(CPose2D))
{ entryIndex++; }
{
entryIndex++;
}
else
{
// Unknown class:
Expand Down Expand Up @@ -3654,7 +3656,9 @@ void xRawLogViewerFrame::OnRemoveSpecificRangeMeas(wxCommandEvent&)
obs_2->sensedData[q].sensedDistance);

if (filter)
{ obs_2->sensedData[q].sensedDistance = 0; }
{
obs_2->sensedData[q].sensedDistance = 0;
}
nFilt++;
}
}
Expand Down Expand Up @@ -4076,7 +4080,9 @@ void xRawLogViewerFrame::OnRecalculateActionsICP(wxCommandEvent&)
{
// Check type:
if (rawlog.getType(countLoop) == CRawlog::etActionCollection)
{ act_between = rawlog.getAsAction(countLoop); }
{
act_between = rawlog.getAsAction(countLoop);
}
else if (rawlog.getType(countLoop) == CRawlog::etSensoryFrame)
{
// This is a SF:
Expand Down
16 changes: 12 additions & 4 deletions apps/ReactiveNav3D-Demo/ReactiveNav3D_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ class CRobotKinects
{
if ((kinectrelpose.distance3DTo(x[i], y[i], z[i]) < m_min_range) ||
(kinectrelpose.distance3DTo(x[i], y[i], z[i]) > m_max_range))
{ deletion.push_back(1); }
{
deletion.push_back(1);
}
else
{
deletion.push_back(0);
Expand Down Expand Up @@ -217,18 +219,24 @@ class CRobotKinects
if (k == 0)
{
if (point.z < heights[k])
{ m_points.insertPoint(point); }
{
m_points.insertPoint(point);
}
}
else if (k == m_maps.size() - 1)
{
if (point.z >= h)
{ m_points.insertPoint(point); }
{
m_points.insertPoint(point);
}
}
else
{
if ((point.z >= h) &&
(point.z < h + heights[k]))
{ m_points.insertPoint(point); }
{
m_points.insertPoint(point);
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion apps/ReactiveNavigationDemo/reactive_navigator_demoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,9 @@ void reactive_navigator_demoframe::simulateOneStep(double time_step)

static int decim_path = 0;
if (gl_robot_path->empty() || ++decim_path > 10)
{ gl_robot_path->appendLine(cur_pt, cur_pt); }
{
gl_robot_path->appendLine(cur_pt, cur_pt);
}
else
{
gl_robot_path->appendLineStrip(cur_pt);
Expand Down
12 changes: 9 additions & 3 deletions apps/SceneViewer3D/_DSceneViewerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,9 @@ void _DSceneViewerFrame::OntimLoadFileCmdLineTrigger(wxTimerEvent&)
"3Dscene",
mrpt::system::extractFileExtension(
global_fileToOpen, true /*ignore .gz*/)))
{ loadFromFile(global_fileToOpen); }
{
loadFromFile(global_fileToOpen);
}
else
{
std::cout << "Filename extension does not match `3Dscene`, "
Expand Down Expand Up @@ -1207,7 +1209,9 @@ void _DSceneViewerFrame::OnTravellingTrigger(wxTimerEvent& event)
if ((openGLSceneRef->viewportsCount() == 0) ||
!openGLSceneRef->getViewport("main") ||
(openGLSceneRef->getViewport("main")->size() == 0))
{ wxMessageBox(_("Canvas is empty"), _("Warning"), wxOK, this); }
{
wxMessageBox(_("Canvas is empty"), _("Warning"), wxOK, this);
}
else
{
// Change the camera
Expand Down Expand Up @@ -1293,7 +1297,9 @@ void _DSceneViewerFrame::OnStartCameraTravelling(wxCommandEvent& event)
if ((openGLSceneRef->viewportsCount() == 0) ||
!openGLSceneRef->getViewport("main") ||
(openGLSceneRef->getViewport("main")->size() == 0))
{ wxMessageBox(_("Canvas is empty"), _("Warning"), wxOK, this); }
{
wxMessageBox(_("Canvas is empty"), _("Warning"), wxOK, this);
}
else
{
// Change the camera
Expand Down
16 changes: 12 additions & 4 deletions apps/benchmarking-image-features/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,18 @@ void MainWindow::on_button_generate_clicked()
auxImg1 = *ft1.patch;
if (currentInputIndex == 1 || currentInputIndex == 4 ||
(currentInputIndex == 2 && rawlog_type == 1))
{ auxImg2 = *best_ft2.patch; }
{
auxImg2 = *best_ft2.patch;
}
}
else if (descriptor_selected == 3) // descPolarImages
{
auxImg1.setFromMatrix(*ft1.descriptors.PolarImg);
if (currentInputIndex == 1 || currentInputIndex == 4 ||
(currentInputIndex == 2 && rawlog_type == 1))
{ auxImg2.setFromMatrix(*best_ft2.descriptors.PolarImg); }
{
auxImg2.setFromMatrix(*best_ft2.descriptors.PolarImg);
}
}
else if (descriptor_selected == 4) // descLogPolarImages
{
Expand Down Expand Up @@ -1875,7 +1879,9 @@ void MainWindow::ReadInputFormat()
// numFeatures = numFeaturesLineEdit->text().toInt();

if (currentInputIndex == 0)
{ file_path1 = inputFilePath->text().toStdString(); }
{
file_path1 = inputFilePath->text().toStdString();
}
else if (currentInputIndex == 1) // only read the single images if a single
// image or stereo image input is
// specified
Expand Down Expand Up @@ -4086,7 +4092,9 @@ void MainWindow::Mouse_Pressed()
images_static = images1[pos];
if (currentInputIndex == 1 || currentInputIndex == 4 ||
(currentInputIndex == 2 && rawlog_type == 1))
{ images_static2 = images2[pos]; }
{
images_static2 = images2[pos];
}

/// this is done to fix the overlaying of labels on top of each other.
if (flag_descriptor_match) featureMatched->setVisible(false);
Expand Down
Loading

0 comments on commit 6c277a0

Please sign in to comment.