Permalink
Browse files

clang-format fixes

  • Loading branch information...
jlblancoc committed Oct 13, 2018
1 parent a4bfcfa commit 3d99eff7b92e1539e59798b94aec84faddf3a048
Showing 1,111 changed files with 26,406 additions and 26,951 deletions.
@@ -402,8 +402,9 @@ CDlgParams::CDlgParams(
FlexGridSizer12->AddGrowableCol(0);
FlexGridSizer13 = new wxFlexGridSizer(0, 3, 0, 0);
cbSensorDistin = new wxCheckBox(
this, ID_CHECKBOX1, _("Sensor distingishes landmarks (Checked: avoids "
"data association problem)"),
this, ID_CHECKBOX1,
_("Sensor distingishes landmarks (Checked: avoids "
"data association problem)"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator,
_T("ID_CHECKBOX1"));
cbSensorDistin->SetValue(false);
@@ -518,8 +519,9 @@ CDlgParams::CDlgParams(
FlexGridSizer20 = new wxFlexGridSizer(1, 2, 0, 0);
FlexGridSizer20->AddGrowableCol(1);
StaticText26 = new wxStaticText(
this, ID_STATICTEXT26, _("Normally-distributeed number\nof spurious "
"per \"observation\":\n(Both to 0 = disable)"),
this, ID_STATICTEXT26,
_("Normally-distributeed number\nof spurious "
"per \"observation\":\n(Both to 0 = disable)"),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE,
_T("ID_STATICTEXT26"));
FlexGridSizer20->Add(
@@ -80,10 +80,9 @@ void slamdemoApp::DoBatchExperiments(const std::string& cfgFil)
{
}
err_D2 += dm2;
err_phi += fabs(
wrapToPi(
win->m_historicData[i].GT_robot_pose.phi() -
win->m_historicData[i].estimate_robot_pose.getMeanVal().phi()));
err_phi += fabs(wrapToPi(
win->m_historicData[i].GT_robot_pose.phi() -
win->m_historicData[i].estimate_robot_pose.getMeanVal().phi()));
}

if (N)
@@ -169,8 +169,7 @@ void CDifodoCamera::loadFrame()
const int width = framed.getWidth();

// Store the depth values
const auto* pDepthRow =
(const openni::DepthPixel*)framed.getData();
const auto* pDepthRow = (const openni::DepthPixel*)framed.getData();
int rowSize = framed.getStrideInBytes() / sizeof(openni::DepthPixel);

for (int yc = height - 1; yc >= 0; --yc)
@@ -55,14 +55,14 @@ class CDifodoCamera : public mrpt::vision::CDifodo

/** A pre-step that should be performed before starting to estimate the
* camera velocity.
* It can also be called to reset the estimated trajectory and pose */
* It can also be called to reset the estimated trajectory and pose */
void reset();

/** Save the pose estimation following the format of the TUM datasets:
*
* 'timestamp tx ty tz qx qy qz qw'
*
* Please visit
*
* 'timestamp tx ty tz qx qy qz qw'
*
* Please visit
* http://vision.in.tum.de/data/datasets/rgbd-dataset/file_formats for
* further details.*/
void writeTrajectoryFile();
@@ -63,16 +63,16 @@ class CDifodoDatasets : public mrpt::vision::CDifodo

/** A pre-step that should be performed before starting to estimate the
* camera speed
* As a couple of frames are necessary to estimate the camera motion, this
* As a couple of frames are necessary to estimate the camera motion, this
* methods loads the first frame
* before any motion can be estimated.*/
* before any motion can be estimated.*/
void reset();

/** Save the pose estimation following the format of the TUM datasets:
*
* 'timestamp tx ty tz qx qy qz qw'
*
* Please visit
*
* 'timestamp tx ty tz qx qy qz qw'
*
* Please visit
* http://vision.in.tum.de/data/datasets/rgbd-dataset/file_formats for
* further details.*/
void writeTrajectoryFile();
@@ -155,9 +155,10 @@ void CFormBatchSensorPose::OnbtnOpenClick(wxCommandEvent& event)
wxFileDialog dialog(
this, _("Select file with sensor parameters") /* caption */,
_U(iniFile->read_string(iniFileSect, "LastDir", ".").c_str()),
_("*.ini") /* defaultFilename */, _("rawlog-grabber config files "
"(*.ini)|*.ini|All files "
"(*.*)|*.*") /* wildcard */,
_("*.ini") /* defaultFilename */,
_("rawlog-grabber config files "
"(*.ini)|*.ini|All files "
"(*.*)|*.*") /* wildcard */,
wxFD_OPEN | wxFD_FILE_MUST_EXIST);

if (dialog.ShowModal() != wxID_OK) return;
@@ -866,8 +866,8 @@ void CFormChangeSensorPositions::executeOperationOnRawlog(

if (!isInMemory) archiveFrom(*out_fil) << *acts;
}
else if (
newObj->GetRuntimeClass()->derivedFrom(CLASS_ID(CObservation)))
else if (newObj->GetRuntimeClass()->derivedFrom(
CLASS_ID(CObservation)))
{
// A sensory frame:
CObservation::Ptr o(
@@ -884,10 +884,9 @@ void CFormChangeSensorPositions::executeOperationOnRawlog(
}
else
{ // Unknown class:
THROW_EXCEPTION(
format(
"Unexpected class found in the file: '%s'",
newObj->GetRuntimeClass()->className));
THROW_EXCEPTION(format(
"Unexpected class found in the file: '%s'",
newObj->GetRuntimeClass()->className));
}
}
catch (exception& e)
@@ -971,7 +970,7 @@ void exec_setPoseByLabel(
{
for (auto obs : *SF)
{
if (obs->sensorLabel == labelToProcess)
if (obs->sensorLabel == labelToProcess)
{
if (changeOnlyXYZ)
{
@@ -361,8 +361,8 @@ CFormEdit::CFormEdit(wxWindow* parent, wxWindowID id)
FlexGridSizer5->AddGrowableCol(0);
FlexGridSizer5->AddGrowableRow(0);
cbObsClass = new wxCheckListBox(
this, ID_CHECKLISTBOX2, wxDefaultPosition, wxSize(-1, 200), 0, nullptr, 0,
wxDefaultValidator, _T("ID_CHECKLISTBOX2"));
this, ID_CHECKLISTBOX2, wxDefaultPosition, wxSize(-1, 200), 0, nullptr,
0, wxDefaultValidator, _T("ID_CHECKLISTBOX2"));
cbObsClass->SetMaxSize(wxSize(-1, 200));
FlexGridSizer5->Add(
cbObsClass, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
@@ -397,8 +397,8 @@ CFormEdit::CFormEdit(wxWindow* parent, wxWindowID id)
FlexGridSizer13->AddGrowableCol(0);
FlexGridSizer13->AddGrowableRow(0);
cbObsLabel = new wxCheckListBox(
this, ID_CHECKLISTBOX1, wxDefaultPosition, wxSize(-1, 200), 0, nullptr, 0,
wxDefaultValidator, _T("ID_CHECKLISTBOX1"));
this, ID_CHECKLISTBOX1, wxDefaultPosition, wxSize(-1, 200), 0, nullptr,
0, wxDefaultValidator, _T("ID_CHECKLISTBOX1"));
cbObsLabel->SetMaxSize(wxSize(-1, 200));
FlexGridSizer13->Add(
cbObsLabel, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
@@ -726,8 +726,7 @@ void filter_delActsByIndex(
if (acts)
{
int j = 0;
for (auto it = acts->begin(); it != acts->end();
++j)
for (auto it = acts->begin(); it != acts->end(); ++j)
{
if (auxMask[j])
{
@@ -783,7 +782,7 @@ void filter_swapColors(
{
for (auto obs : *SF)
{
if (IS_CLASS(obs, CObservationImage))
if (IS_CLASS(obs, CObservationImage))
{
auto* o = (CObservationImage*)obs.get();
if (o->image.isColor())
@@ -794,8 +793,7 @@ void filter_swapColors(
}
else if (IS_CLASS(obs, CObservationStereoImages))
{
auto* o =
(CObservationStereoImages*)obs.get();
auto* o = (CObservationStereoImages*)obs.get();
if (o->imageLeft.isColor())
{
swapColors(o->imageLeft);
@@ -1052,8 +1050,8 @@ void CFormEdit::executeOperationOnRawlog(

if (!isInMemory) archiveFrom(*out_fil) << *sf;
}
else if (
newObj->GetRuntimeClass()->derivedFrom(CLASS_ID(CObservation)))
else if (newObj->GetRuntimeClass()->derivedFrom(
CLASS_ID(CObservation)))
{
// A single observation:
dummy_sf->clear();
@@ -1092,10 +1090,9 @@ void CFormEdit::executeOperationOnRawlog(
}
else
{ // Unknown class:
THROW_EXCEPTION(
format(
"Unexpected class found in the file: '%s'",
newObj->GetRuntimeClass()->className));
THROW_EXCEPTION(format(
"Unexpected class found in the file: '%s'",
newObj->GetRuntimeClass()->className));
}
}
catch (exception& e)
@@ -1231,8 +1228,7 @@ void leave_horizontalScans(

if (IS_CLASS(obs, CObservation2DRangeScan))
{
auto* o =
static_cast<CObservation2DRangeScan*>(obs.get());
auto* o = static_cast<CObservation2DRangeScan*>(obs.get());

if (fabs(o->sensorPose.pitch()) > minPitchToDeleteLaserScan)
{
@@ -687,7 +687,7 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)
// displayedImgs.resize(3);

// unload current imgs:
for (auto & displayedImg : displayedImgs)
for (auto& displayedImg : displayedImgs)
if (displayedImg) displayedImg->unload();

CImage auxImgForSubSampling;
@@ -815,9 +815,9 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)
}

// save:
displayedImgs[thePanel == pnLeft ? 0
: (thePanel == pnRight ? 1 : 2)] =
obsImg;
displayedImgs
[thePanel == pnLeft ? 0 : (thePanel == pnRight ? 1 : 2)] =
obsImg;

doDelay = true;

@@ -845,9 +845,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)

if (firstFit)
{
pnLeft->SetMinSize(
wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
pnLeft->SetMinSize(wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
// Fit();
// firstFit=false; // Done in the right pane below...
}
@@ -864,9 +863,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)
0, 0, wxIMG->GetWidth(), wxIMG->GetHeight(), &tmpDc, 0, 0);
delete wxIMG;

lbCam1->SetLabel(
_U(format("%s - left", obsImg2->sensorLabel.c_str())
.c_str()));
lbCam1->SetLabel(_U(
format("%s - left", obsImg2->sensorLabel.c_str()).c_str()));

// save:
displayedImgs[0] = obsImg2;
@@ -888,9 +886,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)

if (firstFit)
{
pnRight->SetMinSize(
wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
pnRight->SetMinSize(wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
Fit();
firstFit = false;
}
@@ -931,9 +928,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)

if (firstFit)
{
pnRight->SetMinSize(
wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
pnRight->SetMinSize(wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
Fit();
firstFit = false;
}
@@ -983,9 +979,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs)

if (firstFit)
{
pnLeft->SetMinSize(
wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
pnLeft->SetMinSize(wxSize(
imgShow->getWidth() + 2, imgShow->getHeight() + 2));
// Fit();
// firstFit=false; // Done in the right pane below...
}
@@ -1095,11 +1090,10 @@ void CFormPlayVideo::saveCamImage(int n)
.c_str());
break;
case 1:
defaultFilename =
_U(format(
"%s_right_%i.jpg", o->sensorLabel.c_str(),
m_idxInRawlog)
.c_str());
defaultFilename = _U(format(
"%s_right_%i.jpg",
o->sensorLabel.c_str(), m_idxInRawlog)
.c_str());
break;
case 2:
defaultFilename = _U(
@@ -508,17 +508,15 @@ void loadMapInto3DScene(COpenGLScene& scene)
// -> 3D local coords
auto i1 =
rtk_path_info.best_gps_path.lower_bound(last_t.value());
auto i2 =
rtk_path_info.best_gps_path.upper_bound(this_t);
auto i2 = rtk_path_info.best_gps_path.upper_bound(this_t);

// cout << mrpt::system::timeLocalToString(last_t) << " -> " <<
// mrpt::system::timeLocalToString(this_t) << " D: " <<
// std::distance(i1,i2) << endl;

if (i1 != rtk_path_info.best_gps_path.end())
{
for (auto t =
i1;
for (auto t = i1;
t != i2 && t != rtk_path_info.best_gps_path.end(); ++t)
{
obj2->appendLine(
@@ -544,10 +542,8 @@ void loadMapInto3DScene(COpenGLScene& scene)
// Try to interpolate using the best GPS path:
// map<Clock::time_point,CPoint3D> best_gps_path; // time ->
// 3D local coords
auto i1 =
rtk_path_info.best_gps_path.lower_bound(last_t.value());
auto i2 =
rtk_path_info.best_gps_path.upper_bound(this_t);
auto i1 = rtk_path_info.best_gps_path.lower_bound(last_t.value());
auto i2 = rtk_path_info.best_gps_path.upper_bound(this_t);

// cout << mrpt::system::timeLocalToString(last_t) << " -> " <<
// mrpt::system::timeLocalToString(this_t) << " D: " <<
@@ -1166,8 +1162,7 @@ void CFormRawMap::OnGenerateFromRTK(wxCommandEvent&)
double overall_dist = 0;
double last_x = 0, last_y = 0, last_z = 0;

for (auto i = robot_path.begin();
i != robot_path.end(); ++i)
for (auto i = robot_path.begin(); i != robot_path.end(); ++i)
{
if (i != robot_path.begin())
overall_dist += (mrpt::math::TPoint3D(i->second) -
Oops, something went wrong.

0 comments on commit 3d99eff

Please sign in to comment.