diff --git a/.circleci/config.yml b/.circleci/config.yml index 719b2faa5d..bfe4ce60f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,8 @@ workflows: build: jobs: - full-u20.04-focal-codecov - - full-u18.04-bionic + # Disabled to avoid circle CI concurrency limit timeouts + # - full-u18.04-bionic - clang-u18.04-bionic - headless-u18.04-bionic - minimal-u18.04-bionic diff --git a/AUTHORS b/AUTHORS index ce782c9f9e..44b20024a8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -113,7 +113,7 @@ the GitHub contributors page (https://github.com/MRPT/mrpt/graphs/contributors). * Vicente Arevalo Espejo, University of Malaga. - The application camera-calib. - Some classes: mrpt::opengl::CSetOfTexturedTriangles, etc.. - - Some minor changes in: 3DSceneViewer and RawlogViewer applications. + - Some minor changes in: SceneViewer3D and RawlogViewer applications. - Some image-related functions. * Adrien Barral - Robopec (France). diff --git a/apps/2d-slam-demo/slamdemoMain.cpp b/apps/2d-slam-demo/slamdemoMain.cpp index 58e34a4eef..a950ae72f2 100644 --- a/apps/2d-slam-demo/slamdemoMain.cpp +++ b/apps/2d-slam-demo/slamdemoMain.cpp @@ -847,7 +847,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotGT->AddLayer(m_lyGTvisibleRange); plotGT->LockAspect(); - plotGT->EnableDoubleBuffer(true); // Map plot ------------ m_lyMapRobot = new mpPolygon(); @@ -857,7 +856,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) m_lyMapRobot->SetCoordinateBase(0, 0, 0); plotMap->AddLayer(m_lyMapRobot); plotMap->LockAspect(); - plotMap->EnableDoubleBuffer(true); // Observations plot ------------ m_lyObsRobot = new mpPolygon(); @@ -874,7 +872,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotObs->AddLayer(m_lyObsvisibleRange); plotObs->LockAspect(); - plotObs->EnableDoubleBuffer(true); // IC plot ------------ m_lyICvisibleRange = new mpPolygon(); @@ -884,7 +881,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotIndivCompat->AddLayer(m_lyICvisibleRange); plotIndivCompat->LockAspect(false); - plotIndivCompat->EnableDoubleBuffer(true); // X ERROR plot ------------ m_lyERRX_err = new mpFXYVector(); @@ -903,7 +899,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotErrorX->AddLayer(m_lyERRX_boundDown); plotErrorX->LockAspect(false); - plotErrorX->EnableDoubleBuffer(true); // Y ERROR plot ------------ m_lyERRY_err = new mpFXYVector(); @@ -922,7 +917,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotErrorY->AddLayer(m_lyERRY_boundDown); plotErrorY->LockAspect(false); - plotErrorY->EnableDoubleBuffer(true); // Phi ERROR plot ------------ m_lyERRPHI_err = new mpFXYVector(); @@ -941,7 +935,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotErrorPhi->AddLayer(m_lyERRPHI_boundDown); plotErrorPhi->LockAspect(false); - plotErrorPhi->EnableDoubleBuffer(true); // Stats Time plot ------------ m_lyStatTimes = new mpFXYVector(); @@ -950,7 +943,6 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) plotStatTime->AddLayer(m_lyStatTimes); plotStatTime->LockAspect(false); - plotStatTime->EnableDoubleBuffer(true); // DA Stats plots ------------ #define INIT_DA_PLOT(CODE) \ @@ -958,8 +950,7 @@ slamdemoFrame::slamdemoFrame(wxWindow* parent, wxWindowID id) m_lyDa##CODE->SetPen(wxPen(wxColour(0, 0, 0), 5)); \ m_lyDa##CODE->SetContinuity(false); \ plotDa##CODE->AddLayer(m_lyDa##CODE); \ - plotDa##CODE->LockAspect(false); \ - plotDa##CODE->EnableDoubleBuffer(true); + plotDa##CODE->LockAspect(false); INIT_DA_PLOT(FP); INIT_DA_PLOT(FN); diff --git a/apps/RawLogViewer/CFormPlayVideo.cpp b/apps/RawLogViewer/CFormPlayVideo.cpp index 1f504cc71b..ad68463eeb 100644 --- a/apps/RawLogViewer/CFormPlayVideo.cpp +++ b/apps/RawLogViewer/CFormPlayVideo.cpp @@ -513,6 +513,7 @@ void CFormPlayVideo::OnbtnPlayClick(wxCommandEvent& event) { wxTheApp->Yield(); CSerializable::Ptr obj; + mrpt::Clock::time_point imgTimestamp = INVALID_TIMESTAMP; if (fil) { archiveFrom(*fil) >> obj; } else @@ -523,25 +524,38 @@ void CFormPlayVideo::OnbtnPlayClick(wxCommandEvent& event) bool doDelay = false; - if (IS_CLASS(*obj, CSensoryFrame)) - { doDelay = showSensoryFrame(obj.get(), nImgs); } + if (auto sf = std::dynamic_pointer_cast(obj); sf) + { doDelay = showSensoryFrame(*sf, nImgs, imgTimestamp); } else if (IS_DERIVED(*obj, CObservation)) { - CSensoryFrame sf; - sf.insert(std::dynamic_pointer_cast(obj)); - doDelay = showSensoryFrame(&sf, nImgs); + CSensoryFrame sf2; + sf2.insert(std::dynamic_pointer_cast(obj)); + doDelay = showSensoryFrame(sf2, nImgs, imgTimestamp); } // Free the loaded object! if (fil) obj.reset(); // Update UI - if ((count++) % 100 == 0) + count++; + // if ((count) % 10 == 0) { progressBar->SetValue( fil ? (int)fil->getPosition() : (int)count); wxString str; - str.sprintf(_("Processed: %d images"), nImgs); + if (imgTimestamp != INVALID_TIMESTAMP) + { + str.sprintf( + _("Processed: %d images. Timestamp: %f [%s UTC]"), + static_cast(nImgs), + mrpt::Clock::toDouble(imgTimestamp), + mrpt::system::dateTimeToString(imgTimestamp).c_str()); + } + else + { + str.sprintf( + _("Processed: %d images."), static_cast(nImgs)); + } lbProgress->SetLabel(str); if (!doDelay) wxTheApp->Yield(); } @@ -652,12 +666,12 @@ void CFormPlayVideo::drawHorzRules(mrpt::img::CImage& img) img.line(0, y, w - 1, y, mrpt::img::TColor::white()); } -bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs) +bool CFormPlayVideo::showSensoryFrame( + mrpt::obs::CSensoryFrame& SF, size_t& nImgs, Clock::time_point& timestamp) { WX_START_TRY - ASSERT_(SF); - auto* sf = (CSensoryFrame*)SF; + auto* sf = &SF; bool doDelay = false; bool doReduceLargeImgs = cbReduceLarge->GetValue(); @@ -685,6 +699,8 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs) sf->getObservationByClass(img_idx_sf); if (!obsImg) break; // No more images, go on... + timestamp = obsImg->timestamp; + // Onto which panel to draw?? if (!orderByYaw && !orderByY) { @@ -810,8 +826,10 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs) { CObservationStereoImages::Ptr obsImg2 = sf->getObservationByClass(); + if (obsImg2) { + timestamp = obsImg2->timestamp; nImgs++; // Left: @@ -944,8 +962,10 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs) { CObservation3DRangeScan::Ptr obs3D = sf->getObservationByClass(); + if (obs3D && obs3D->hasIntensityImage) { + timestamp = obs3D->timestamp; nImgs++; // Intensity channel @@ -997,32 +1017,45 @@ bool CFormPlayVideo::showSensoryFrame(void* SF, size_t& nImgs) return false; } -void CFormPlayVideo::OnprogressBarCmdScrollChanged(wxScrollEvent& event) +void CFormPlayVideo::OnprogressBarCmdScrollChanged(wxScrollEvent&) { int idx = progressBar->GetValue(); m_idxInRawlog = idx; + mrpt::Clock::time_point imgTimestamp; + size_t nImgs = 0; + if (idx > 0 && idx < (int)rawlog.size()) { if (rawlog.getType(idx) == CRawlog::etSensoryFrame) { - size_t dummy = 0; - CSensoryFrame::Ptr sf = rawlog.getAsObservations(idx); - showSensoryFrame(sf.get(), dummy); + showSensoryFrame(*sf.get(), nImgs, imgTimestamp); edIndex->SetValue(idx); } else if (rawlog.getType(idx) == CRawlog::etObservation) { - size_t dummy = 0; - CObservation::Ptr o = rawlog.getAsObservation(idx); CSensoryFrame sf; sf.insert(o); - showSensoryFrame(&sf, dummy); + showSensoryFrame(sf, nImgs, imgTimestamp); edIndex->SetValue(idx); } + + wxString str; + if (imgTimestamp != INVALID_TIMESTAMP) + { + str.sprintf( + _("Processed: %d images. Timestamp: %f [%s UTC]"), + static_cast(nImgs), mrpt::Clock::toDouble(imgTimestamp), + mrpt::system::dateTimeToString(imgTimestamp).c_str()); + } + else + { + str.sprintf(_("Processed: %d images."), static_cast(nImgs)); + } + lbProgress->SetLabel(str); } } @@ -1103,20 +1136,11 @@ void CFormPlayVideo::saveCamImage(int n) WX_END_TRY } -void CFormPlayVideo::OnbtnSaveCam1Click(wxCommandEvent& event) -{ - saveCamImage(0); -} -void CFormPlayVideo::OnbtnSaveCam2Click(wxCommandEvent& event) -{ - saveCamImage(1); -} -void CFormPlayVideo::OnbtnSaveCam3Click(wxCommandEvent& event) -{ - saveCamImage(2); -} +void CFormPlayVideo::OnbtnSaveCam1Click(wxCommandEvent&) { saveCamImage(0); } +void CFormPlayVideo::OnbtnSaveCam2Click(wxCommandEvent&) { saveCamImage(1); } +void CFormPlayVideo::OnbtnSaveCam3Click(wxCommandEvent&) { saveCamImage(2); } -void CFormPlayVideo::OncbImageDirsSelect(wxCommandEvent& event) +void CFormPlayVideo::OncbImageDirsSelect(wxCommandEvent&) { wxString dir = cbImageDirs->GetValue(); string dirc = string(dir.mb_str()); diff --git a/apps/RawLogViewer/CFormPlayVideo.h b/apps/RawLogViewer/CFormPlayVideo.h index 8ecb975e29..c05c84ac36 100644 --- a/apps/RawLogViewer/CFormPlayVideo.h +++ b/apps/RawLogViewer/CFormPlayVideo.h @@ -24,7 +24,9 @@ #include //*) +#include #include +#include class CFormPlayVideo : public wxDialog { @@ -87,7 +89,9 @@ class CFormPlayVideo : public wxDialog void OncbImageDirsSelect(wxCommandEvent& event); //*) - bool showSensoryFrame(void* SF, size_t& nImgs); + bool showSensoryFrame( + mrpt::obs::CSensoryFrame& SF, size_t& nImgs, + mrpt::Clock::time_point& timestamp); void drawHorzRules(mrpt::img::CImage& img); diff --git a/apps/RawLogViewer/CFormRawMap.cpp b/apps/RawLogViewer/CFormRawMap.cpp index a5adbdb430..8f13610dc9 100644 --- a/apps/RawLogViewer/CFormRawMap.cpp +++ b/apps/RawLogViewer/CFormRawMap.cpp @@ -715,7 +715,6 @@ void CFormRawMap::OnbtnGenerateClick(wxCommandEvent&) plotMap->AddLayer(lyPoints); plotMap->AddLayer(lyPath); - plotMap->EnableDoubleBuffer(true); lyPath->SetData(pathX, pathY); @@ -976,7 +975,6 @@ void CFormRawMap::OnbtnGeneratePathsClick(wxCommandEvent&) plotMap->AddLayer(lyCov, false); // - plotMap->EnableDoubleBuffer(true); plotMap->Fit(); // Update the window to show the new data fitted. plotMap->LockAspect(true); @@ -1121,7 +1119,6 @@ void CFormRawMap::OnGenerateFromRTK(wxCommandEvent&) plotMap->AddLayer(lyPoints); plotMap->AddLayer(lyPath); - plotMap->EnableDoubleBuffer(true); lyPath->SetData(pathX, pathY); diff --git a/apps/RawLogViewer/CRawlogTreeView.cpp b/apps/RawLogViewer/CRawlogTreeView.cpp index b00135228b..bb0af2b7ac 100644 --- a/apps/RawLogViewer/CRawlogTreeView.cpp +++ b/apps/RawLogViewer/CRawlogTreeView.cpp @@ -36,6 +36,7 @@ std::atomic_bool CRawlogTreeView::RAWLOG_UNDERGOING_CHANGES{false}; #define MRPT_NO_WARN_BIG_HDR // It's ok here #include #include +#include // this one is in mrpt-maps using namespace mrpt; using namespace mrpt::system; @@ -413,6 +414,15 @@ int CRawlogTreeView::iconIndexFromClass(const TRuntimeClassId* class_ID) iconIndex = 8; else if (class_ID == CLASS_ID(CObservationRFID)) iconIndex = 8; + else if (class_ID == CLASS_ID(CObservationOdometry)) + iconIndex = 9; + else if ( + class_ID == CLASS_ID(CObservation3DRangeScan) || + class_ID == CLASS_ID(CObservationVelodyneScan) || + class_ID == CLASS_ID(CObservationPointCloud)) + iconIndex = 10; + else if (class_ID == CLASS_ID(CObservationIMU)) + iconIndex = 11; else if (class_ID->derivedFrom(CLASS_ID(CObservation))) iconIndex = 2; // Default observation else if (class_ID == CLASS_ID(CActionCollection)) diff --git a/apps/RawLogViewer/CScanAnimation.cpp b/apps/RawLogViewer/CScanAnimation.cpp index 71f02aaaee..b5080558db 100644 --- a/apps/RawLogViewer/CScanAnimation.cpp +++ b/apps/RawLogViewer/CScanAnimation.cpp @@ -634,7 +634,7 @@ void CScanAnimation::OnbtnVizOptions(wxCommandEvent&) wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY")); dlgViz = &dlg; - auto sizer1 = new wxFlexGridSizer(2, 1, 0, 0); + auto sizer1 = new wxFlexGridSizer(0, 1, 0, 0); sizer1->AddGrowableCol(0); auto panel = new ViewOptions3DPoints(&dlg); diff --git a/apps/RawLogViewer/ViewOptions3DPoints.cpp b/apps/RawLogViewer/ViewOptions3DPoints.cpp index 4c5365e68d..499245cdc4 100644 --- a/apps/RawLogViewer/ViewOptions3DPoints.cpp +++ b/apps/RawLogViewer/ViewOptions3DPoints.cpp @@ -170,7 +170,7 @@ ViewOptions3DPoints::ViewOptions3DPoints(wxWindow* parent, wxWindowID id) FlexGridSizer3->Add(FlexGridSizer4, 1, wxALL | wxEXPAND, 0); StaticBoxSizer2->Add(FlexGridSizer3, 1, wxALL | wxEXPAND, 5); FlexGridSizer1->Add(StaticBoxSizer2, 1, wxALL | wxEXPAND, 5); - FlexGridSizer5 = new wxFlexGridSizer(2, 1, 0, 0); + FlexGridSizer5 = new wxFlexGridSizer(0, 1, 0, 0); StaticBoxSizer3 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Sensor pose")); FlexGridSizer6 = new wxFlexGridSizer(0, 1, 0, 0); @@ -228,40 +228,17 @@ ViewOptions3DPoints::ViewOptions3DPoints(wxWindow* parent, wxWindowID id) SetSizer(FlexGridSizer1); FlexGridSizer1->Fit(this); FlexGridSizer1->SetSizeHints(this); - - Connect( - ID_BUTTON1, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction)&ViewOptions3DPoints::OnbtnApplyClick); - Connect( - ID_CHECKBOX1, wxEVT_COMMAND_CHECKBOX_CLICKED, - (wxObjectEventFunction)&ViewOptions3DPoints::OnbtnApplyClick); - Connect( - ID_RADIOBOX1, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction)&ViewOptions3DPoints::OnbtnApplyClick); - Connect( - ID_RADIOBOX2, wxEVT_COMMAND_RADIOBOX_SELECTED, - (wxObjectEventFunction)&ViewOptions3DPoints::OnbtnApplyClick); - Connect( - ID_CHECKBOX2, wxEVT_COMMAND_CHECKBOX_CLICKED, - (wxObjectEventFunction)&ViewOptions3DPoints::OnbtnApplyClick); //*) - Bind(wxEVT_BUTTON, &ViewOptions3DPoints::OnbtnApplyClick, this, ID_BUTTON1); - Bind( - wxEVT_RADIOBOX, &ViewOptions3DPoints::OnbtnApplyClick, this, - ID_RADIOBOX1); - Bind( - wxEVT_RADIOBOX, &ViewOptions3DPoints::OnbtnApplyClick, this, - ID_RADIOBOX2); - Bind( - wxEVT_CHECKBOX, &ViewOptions3DPoints::OnbtnApplyClick, this, - ID_CHECKBOX2); - Bind( - wxEVT_SPINCTRL, &ViewOptions3DPoints::OnbtnApplyClick, this, - ID_SPINCTRL1); - Bind( - wxEVT_CHECKBOX, &ViewOptions3DPoints::OnbtnApplyClick, this, - ID_CHECKBOX3); + using Me = ViewOptions3DPoints; + + Bind(wxEVT_BUTTON, &Me::OnbtnApplyClick, this, ID_BUTTON1); + Bind(wxEVT_CHECKBOX, &Me::OnbtnApplyClick, this, ID_CHECKBOX1); + Bind(wxEVT_CHECKBOX, &Me::OnbtnApplyClick, this, ID_CHECKBOX2); + Bind(wxEVT_RADIOBOX, &Me::OnbtnApplyClick, this, ID_RADIOBOX1); + Bind(wxEVT_RADIOBOX, &Me::OnbtnApplyClick, this, ID_RADIOBOX2); + Bind(wxEVT_CHECKBOX, &Me::OnbtnApplyClick, this, ID_CHECKBOX3); + Bind(wxEVT_SPINCTRL, &Me::OnbtnApplyClick, this, ID_SPINCTRL1); m_params.load_from_ini_file(); m_params.to_UI(*this); diff --git a/apps/RawLogViewer/imgs/tree_icon10.xpm b/apps/RawLogViewer/imgs/tree_icon10.xpm new file mode 100644 index 0000000000..4e8502edff --- /dev/null +++ b/apps/RawLogViewer/imgs/tree_icon10.xpm @@ -0,0 +1,162 @@ +/* XPM */ +static const char * tree_icon10_xpm[] = { +"16 16 143 2", +" c None", +". c #6A6C6E", +"+ c #676A69", +"@ c #494A49", +"# c #424442", +"$ c #454647", +"% c #3A3C3A", +"& c #373939", +"* c #363735", +"= c #3D3E3D", +"- c #181816", +"; c #3A3B3A", +"> c #131414", +", c #4B4E50", +"' c #4A4E51", +") c #4E5253", +"! c #646769", +"~ c #5F615E", +"{ c #31322F", +"] c #2F2F2D", +"^ c #40423D", +"/ c #353632", +"( c #2D2D2A", +"_ c #3D3F3E", +": c #181919", +"< c #363A3C", +"[ c #696F71", +"} c #797E82", +"| c #4F4F4C", +"1 c #30312D", +"2 c #30302D", +"3 c #9D9E99", +"4 c #C9CAC6", +"5 c #979895", +"6 c #434341", +"7 c #2F302D", +"8 c #2F312F", +"9 c #7A8285", +"0 c #4C4F51", +"a c #62676A", +"b c #4A4B48", +"c c #363733", +"d c #141411", +"e c #B4B5B1", +"f c #E7E9E5", +"g c #F5F4F2", +"h c #FBFBF9", +"i c #D2D4D1", +"j c #33342F", +"k c #2A2B28", +"l c #515657", +"m c #3F4243", +"n c #414445", +"o c #5C5F61", +"p c #3A3B35", +"q c #222322", +"r c #BCBDB7", +"s c #E6E7E4", +"t c #F3F3F1", +"u c #F3F4F3", +"v c #F0F2EF", +"w c #AEB0AC", +"x c #2B2B29", +"y c #181917", +"z c #5A5F61", +"A c #444747", +"B c #515455", +"C c #363732", +"D c #171815", +"E c #868682", +"F c #E7E8E5", +"G c #F0F0EE", +"H c #F9F9F8", +"I c #F4F6F4", +"J c #E9EBE8", +"K c #3B3B39", +"L c #292925", +"M c #343435", +"N c #303130", +"O c #232423", +"P c #7A7A79", +"Q c #41423D", +"R c #0C0C0A", +"S c #C3C3C1", +"T c #BEBFBA", +"U c #ECEDE8", +"V c #F6F6F5", +"W c #FAFAFA", +"X c #EDF0ED", +"Y c #8E8E8C", +"Z c #272623", +"` c #1B1B1A", +" . c #505150", +".. c #555857", +"+. c #646460", +"@. c #4D4E49", +"#. c #1B1C17", +"$. c #222321", +"%. c #82837C", +"&. c #D8D9D5", +"*. c #F1F1EF", +"=. c #F5F5F4", +"-. c #F1F1ED", +";. c #ABACA9", +">. c #2D2D29", +",. c #31312F", +"'. c #353533", +"). c #3A3A39", +"!. c #33342E", +"~. c #10100D", +"{. c #B0B1AF", +"]. c #8E908B", +"^. c #EDEEEB", +"/. c #F6F7F5", +"(. c #E8E9E5", +"_. c #6F706B", +":. c #292A25", +"<. c #22221E", +"[. c #585957", +"}. c #747575", +"|. c #40413C", +"1. c #2A2B26", +"2. c #030300", +"3. c #50514E", +"4. c #8E8F8A", +"5. c #BBBBB8", +"6. c #848580", +"7. c #4B4C49", +"8. c #565756", +"9. c #42443F", +"0. c #252620", +"a. c #181814", +"b. c #11120E", +"c. c #363734", +"d. c #1A1B15", +"e. c #2A2B27", +"f. c #565956", +"g. c #31322C", +"h. c #34352F", +"i. c #282A25", +"j. c #2E2F29", +"k. c #31322E", +"l. c #6D706B", +" . ", +" + @ # $ % & ", +" * = - ; > , ' ) ! ", +" ~ { ] ^ / / ( _ : < [ } ", +" | 1 2 3 4 5 6 7 8 9 0 a b ", +" c d e f g h i j k l m n o ", +" p q r s t u v w x y z A B ", +" C D E F G H I J K L M N O P ", +" Q R S T U V W X Y Z ` ...+.", +" @.#.$.%.&.*.=.-.;.>.,.'.). ", +" !.~.{.].^./.(._.:.<.[.}. ", +" |.1.2.3.4.5.6.L :.7.8. ", +" 9.0.a.b.c.d.e.e.f. ", +" g.h.i.j.k.l. ", +" ", +" "}; diff --git a/apps/RawLogViewer/imgs/tree_icon11.xpm b/apps/RawLogViewer/imgs/tree_icon11.xpm new file mode 100644 index 0000000000..b18163ed28 --- /dev/null +++ b/apps/RawLogViewer/imgs/tree_icon11.xpm @@ -0,0 +1,162 @@ +/* XPM */ +static const char * tree_icon11_xpm[] = { +"16 16 143 2", +" c None", +". c #929292", +"+ c #909090", +"@ c #8E8E8E", +"# c #8D8D8D", +"$ c #8C8C8C", +"% c #8B8B8B", +"& c #8A8A8A", +"* c #898989", +"= c #878787", +"- c #868686", +"; c #838383", +"> c #848484", +", c #858585", +"' c #828282", +") c #818181", +"! c #808080", +"~ c #7A7A7A", +"{ c #7B7B7B", +"] c #7C7C7C", +"^ c #797979", +"/ c #6E6E6E", +"( c #6F6F6F", +"_ c #707070", +": c #727272", +"< c #737373", +"[ c #717171", +"} c #ACACAC", +"| c #A4A4A4", +"1 c #787878", +"2 c #696969", +"3 c #666666", +"4 c #676767", +"5 c #686868", +"6 c #6C6C6C", +"7 c #747474", +"8 c #6D726E", +"9 c #ADADAD", +"0 c #C4C4C4", +"a c #DDDDDD", +"b c #B4B4B4", +"c c #949494", +"d c #C2C2C2", +"e c #AFAFAF", +"f c #959595", +"g c #3E423D", +"h c #3C463D", +"i c #4C543F", +"j c #A9A9A7", +"k c #B7B7B7", +"l c #AEAEAE", +"m c #A1A1A1", +"n c #9C9C9C", +"o c #9B9B9B", +"p c #A2A2A2", +"q c #AAAAAA", +"r c #ABABAB", +"s c #959797", +"t c #656965", +"u c #252718", +"v c #2A2F29", +"w c #3D463E", +"x c #3E4630", +"y c #2B2E19", +"z c #000101", +"A c #1F1F1F", +"B c #4A4A4A", +"C c #5A5A59", +"D c #5C5D5C", +"E c #515050", +"F c #5A857D", +"G c #75B8A6", +"H c #21524A", +"I c #172C23", +"J c #272D1D", +"K c #2A2F28", +"L c #3A453A", +"M c #3D452E", +"N c #33371E", +"O c #060707", +"P c #070707", +"Q c #090908", +"R c #090A07", +"S c #090907", +"T c #3C756B", +"U c #71B8A5", +"V c #24584E", +"W c #1B2E25", +"X c #292D1E", +"Y c #2B302A", +"Z c #474D43", +"` c #3A442D", +" . c #353A20", +".. c #060708", +"+. c #080808", +"@. c #080908", +"#. c #0A0B07", +"$. c #090808", +"%. c #367166", +"&. c #6FB7A4", +"*. c #26594F", +"=. c #1E2F24", +"-. c #2A2D1E", +";. c #2F342D", +">. c #999A99", +",. c #363D25", +"'. c #3B3C1C", +"). c #070708", +"!. c #080909", +"~. c #0A0A0A", +"{. c #346E63", +"]. c #76B9A4", +"^. c #1C4942", +"/. c #223023", +"(. c #292E1D", +"_. c #555754", +":. c #A4A4A3", +"<. c #61624D", +"[. c #22210E", +"}. c #090909", +"|. c #0A0B08", +"1. c #33685E", +"2. c #5EA694", +"3. c #092A25", +"4. c #3B453B", +"5. c #767675", +"6. c #646464", +"7. c #A7A7A7", +"8. c #B2B2B2", +"9. c #9D9D9D", +"0. c #6B6B6B", +"a. c #4C4C4C", +"b. c #424241", +"c. c #4D4D4C", +"d. c #7C8C8A", +"e. c #A1A7A6", +"f. c #888888", +"g. c #6A6A6A", +"h. c #757575", +"i. c #7F7F7F", +"j. c #A0A0A0", +"k. c #9E9E9E", +"l. c #9F9F9F", +" . . . + + @ @ # ", +" @ $ % % % $ % & * = - = ", +"# ; ; > > , , > ; ; ' ' ) ) ! ", +"! ~ ~ ~ ~ { ] { ] ~ { ^ ^ ~ ~ ", +"@ / ( _ : _ < : _ [ [ [ _ ( ^ ", +"} | 1 2 3 4 2 5 4 4 3 6 7 * ' ", +"8 9 0 a b c = ! % | d e f ; g ", +"h i j k l m n o p q r s t u v ", +"w x y z A B C D E F G H I J K ", +"L M N O P Q R R S T U V W X Y ", +"Z ` ...+.@.S #.$.%.&.*.=.-.;. ", +">.,.'.).+.!.~.#.S {.].^./.(._.$ ", +"r :.<.[.!.}.Q |.Q 1.2.3.4.5.6.- ", +" 7.8.:.9.0.a.b.c.d.e.% f.7 g. ", +" 8.$ h.i.f.^ * # ^ < , ] ", +" q j.! c n k.l. "}; diff --git a/apps/RawLogViewer/imgs/tree_icon12.xpm b/apps/RawLogViewer/imgs/tree_icon12.xpm new file mode 100644 index 0000000000..7f6ab6b57d --- /dev/null +++ b/apps/RawLogViewer/imgs/tree_icon12.xpm @@ -0,0 +1,110 @@ +/* XPM */ +static const char * tree_icon12_xpm[] = { +"16 16 91 1", +" c None", +". c #878C90", +"+ c #737577", +"@ c #75777A", +"# c #7D8184", +"$ c #82868A", +"% c #6C6F70", +"& c #808487", +"* c #707173", +"= c #888889", +"- c #949190", +"; c #9EA2A7", +"> c #828689", +", c #757778", +"' c #868C91", +") c #8F8987", +"! c #949696", +"~ c #808386", +"{ c #797F85", +"] c #8A8A88", +"^ c #868A8F", +"/ c #7D848C", +"( c #777C84", +"_ c #8B807B", +": c #797A7A", +"< c #66696E", +"[ c #898D91", +"} c #858B90", +"| c #9FA4A5", +"1 c #B8AD92", +"2 c #948D7D", +"3 c #A0977E", +"4 c #C7AD7A", +"5 c #B79F73", +"6 c #BEA774", +"7 c #BBA473", +"8 c #BCA778", +"9 c #938D7A", +"0 c #707375", +"a c #878B8E", +"b c #74797F", +"c c #8A8C8C", +"d c #A6997B", +"e c #8B826D", +"f c #A59775", +"g c #D0B16D", +"h c #CFB06E", +"i c #D7B672", +"j c #DBBD79", +"k c #D8BD7F", +"l c #B7AB8D", +"m c #94999C", +"n c #92979D", +"o c #81878B", +"p c #787C81", +"q c #76797E", +"r c #707172", +"s c #666A6B", +"t c #676968", +"u c #6E6E6A", +"v c #727370", +"w c #7B7C78", +"x c #848583", +"y c #90928F", +"z c #989D9F", +"A c #A1A7AD", +"B c #8A8F92", +"C c #8A8D8F", +"D c #95999D", +"E c #777A7E", +"F c #7D8187", +"G c #8D8884", +"H c #8F9293", +"I c #83878B", +"J c #878B8D", +"K c #767B81", +"L c #928981", +"M c #9A9C9A", +"N c #7C7F83", +"O c #888C8E", +"P c #7F858A", +"Q c #908A86", +"R c #878B8F", +"S c #888C90", +"T c #989CA1", +"U c #9A9EA3", +"V c #9FA3A9", +"W c #7A7D82", +"X c #828687", +"Y c #7A7E83", +"Z c #8B8E92", +" . ", +" +@ #$ ", +" % & ", +" * =-; > ", +" , ') ! > ", +" ~ { ] ", +" ^ /( _:< [ ", +" }|1234567890 a ", +" bcdefghijklmno ", +" pqrstuvwxyzA B ", +" CD EF GH I ", +" J K LM N ", +" O P Q R ", +" STUV W ", +" XS YY ", +" Z "}; diff --git a/apps/RawLogViewer/imgs/tree_icon7.xpm b/apps/RawLogViewer/imgs/tree_icon7.xpm index ab581a323a..2901073ed6 100644 --- a/apps/RawLogViewer/imgs/tree_icon7.xpm +++ b/apps/RawLogViewer/imgs/tree_icon7.xpm @@ -1,24 +1,144 @@ /* XPM */ static const char * tree_icon7_xpm[] = { -"16 16 5 1", -" c None", -". c #6F4DEC", -"+ c #1D0869", -"@ c #3C1EAC", -"# c #0C0525", -"........... ", -"+........... ", -"++........... ", -"+++........... ", -"+++@@@@@@@@@@@ ", -"+++@@@@@@@@@@@ ", -"+++@@@@@@@@@@@ ", -"+++@@@@@@@@@@@ ", -"+++@@@@@@@@@@@ ", -"+++@+++++++++@ ", -"++++#########@ ", -"+++#########+@ ", -"+++#########+@ ", -" ++#########+@ ", -" +@#########@ ", -" @@@@@@@@@@@ "}; +"16 16 125 2", +" c None", +". c #4A494A", +"+ c #454546", +"@ c #413F42", +"# c #3C3D3F", +"$ c #444242", +"% c #3F3D3E", +"& c #413E40", +"* c #434140", +"= c #433F41", +"- c #434344", +"; c #353639", +"> c #494949", +", c #494645", +"' c #414042", +") c #403F40", +"! c #454243", +"~ c #454342", +"{ c #454343", +"] c #3D3D40", +"^ c #414953", +"/ c #36373A", +"( c #444140", +"_ c #464342", +": c #434143", +"< c #43464A", +"[ c #333337", +"} c #3A3A3E", +"| c #586470", +"1 c #3F434B", +"2 c #312F32", +"3 c #28272B", +"4 c #313233", +"5 c #2E2E33", +"6 c #32353B", +"7 c #2F3946", +"8 c #38475C", +"9 c #58585F", +"0 c #263648", +"a c #131E29", +"b c #212C38", +"c c #222F3E", +"d c #393F4D", +"e c #5B6169", +"f c #5C5655", +"g c #213141", +"h c #102F46", +"i c #1E3245", +"j c #2D2B2D", +"k c #474442", +"l c #908781", +"m c #515659", +"n c #47494C", +"o c #4C4846", +"p c #1D1E20", +"q c #1A2125", +"r c #1C2329", +"s c #343132", +"t c #484645", +"u c #666462", +"v c #656765", +"w c #5A636C", +"x c #464443", +"y c #1E2023", +"z c #171E21", +"A c #20252A", +"B c #312C2C", +"C c #3C3A3B", +"D c #282C33", +"E c #414347", +"F c #625F5C", +"G c #5D5E5D", +"H c #4C535A", +"I c #1F2226", +"J c #171C20", +"K c #1C2124", +"L c #454A55", +"M c #5B6779", +"N c #8A9397", +"O c #4C5056", +"P c #464647", +"Q c #5A5854", +"R c #525353", +"S c #313439", +"T c #27282D", +"U c #4C5561", +"V c #8E8C72", +"W c #C0A85B", +"X c #9E833B", +"Y c #3A3C3F", +"Z c #434546", +"` c #3F4142", +" . c #585653", +".. c #303336", +"+. c #242930", +"@. c #58523D", +"#. c #A78837", +"$. c #78693E", +"%. c #3E3F3B", +"&. c #32363B", +"*. c #3D4245", +"=. c #3E4040", +"-. c #414242", +";. c #2C3033", +">. c #292E32", +",. c #3A3D3D", +"'. c #30353A", +"). c #222B36", +"!. c #2C3237", +"~. c #2F3235", +"{. c #414447", +"]. c #3A3B3C", +"^. c #282D30", +"/. c #262C2F", +"(. c #2F3337", +"_. c #2A2E33", +":. c #2F3336", +"<. c #363A3D", +"[. c #48494B", +"}. c #323536", +"|. c #2E3134", +"1. c #303338", +"2. c #34363A", +"3. c #3A3E40", +"4. c #3B3F41", +" . + @ ", +" # $ % & * = - ", +" ; > , ' ) ! ~ { ] ", +" ^ / - ( _ : < [ } ", +" | 1 2 3 4 5 6 7 8 ", +" 9 0 a b c d e ", +" f g h i j k l ", +" m n o p q r s t u ", +" v w x y z A B C D E ", +" F G H I J K L M N O ", +" P Q R S T U V W X Y ", +" Z ` ...+.@.#.$.%.&.*. ", +" =.-.;.>.,.'.).!.~.{. ", +" ].^./.(._.:.<. ", +" [.}.|.1.2. ", +" 3.4. "}; diff --git a/apps/RawLogViewer/main_show_selected_object.cpp b/apps/RawLogViewer/main_show_selected_object.cpp index 0f025f1646..f18fa022a4 100644 --- a/apps/RawLogViewer/main_show_selected_object.cpp +++ b/apps/RawLogViewer/main_show_selected_object.cpp @@ -328,6 +328,12 @@ void xRawLogViewerFrame::SelectObjectInTreeView( // ---------------------- wxImage* img = mrpt::gui::MRPTImage2wxImage(obs->image); bmpObsImage->SetBitmap(wxBitmap(*img)); + bmpObsImage->SetSize(img->GetWidth(), img->GetHeight()); + FlexGridSizerImg->FitInside(ScrolledWindow2); + // bmpObsImage->FitInside(); + // ScrolledWindow2->SetVirtualSize(img->GetWidth(), img->GetHeight()); + ScrolledWindow2->SetScrollRate(1, 1); + bmpObsImage->Refresh(); delete img; obs->image.unload(); // For externally-stored datasets diff --git a/apps/RawLogViewer/wxsmith/xRawLogViewerframe.wxs b/apps/RawLogViewer/wxsmith/xRawLogViewerframe.wxs index 0135dfd1a6..c2bf70625c 100644 --- a/apps/RawLogViewer/wxsmith/xRawLogViewerframe.wxs +++ b/apps/RawLogViewer/wxsmith/xRawLogViewerframe.wxs @@ -993,7 +993,6 @@ - Create stereo images observations from pairs of monocular images diff --git a/apps/RawLogViewer/xRawLogViewerMain.cpp b/apps/RawLogViewer/xRawLogViewerMain.cpp index 93d9f137d0..191056b531 100644 --- a/apps/RawLogViewer/xRawLogViewerMain.cpp +++ b/apps/RawLogViewer/xRawLogViewerMain.cpp @@ -84,6 +84,9 @@ #include #include "imgs/tree_icon1.xpm" +#include "imgs/tree_icon10.xpm" +#include "imgs/tree_icon11.xpm" +#include "imgs/tree_icon12.xpm" #include "imgs/tree_icon2.xpm" #include "imgs/tree_icon3.xpm" #include "imgs/tree_icon4.xpm" @@ -371,6 +374,7 @@ const long xRawLogViewerFrame::ID_MENUITEM48 = wxNewId(); const long xRawLogViewerFrame::ID_TIMER1 = wxNewId(); //*) const long xRawLogViewerFrame::ID_MENUITEM_RENAME_BY_SF_IDX = wxNewId(); +static const long ID_SCROLLEDWINDOW2 = wxNewId(); BEGIN_EVENT_TABLE(xRawLogViewerFrame, wxFrame) //(*EventTable(xRawLogViewerFrame) @@ -386,6 +390,10 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) // Load my custom icons: wxArtProvider::Push(new MyArtProvider); + const wxFont monoFont( + 8, wxFontFamily::wxFONTFAMILY_TELETYPE, wxFontStyle::wxFONTSTYLE_NORMAL, + wxFontWeight::wxFONTWEIGHT_NORMAL); + //(*Initialize(xRawLogViewerFrame) wxMenu* Menu39; wxBoxSizer* BoxSizer6; @@ -674,10 +682,7 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP | wxNO_BORDER | wxVSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL1")); - wxFont memoFont( - wxSize(10, 10), wxFontFamily::wxFONTFAMILY_TELETYPE, - wxFontStyle::wxFONTSTYLE_NORMAL, wxFontWeight::wxFONTWEIGHT_NORMAL); - memo->SetFont(memoFont); + memo->SetFont(monoFont); BoxSizer2->Add(memo, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 0); Panel3->SetSizer(BoxSizer2); BoxSizer2->Fit(Panel3); @@ -717,10 +722,7 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxVSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL2")); memStats->SetMinSize(wxSize(-1, 150)); - wxFont memStatsFont( - 10, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxNORMAL, false, - _T("Monospace"), wxFONTENCODING_DEFAULT); - memStats->SetFont(memStatsFont); + memStats->SetFont(monoFont); memStats->SetToolTip(_("Statistics of the rawlog load")); Panel11 = new wxPanel( SplitterWindow2, ID_PANEL25, wxDefaultPosition, wxDefaultSize, @@ -739,10 +741,7 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) Notebook3, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY, wxDefaultValidator, _T("ID_TEXTCTRL3")); - wxFont txtExceptionFont( - 10, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxNORMAL, false, - _T("Monospace"), wxFONTENCODING_DEFAULT); - txtException->SetFont(txtExceptionFont); + txtException->SetFont(monoFont); Notebook3->AddPage(SplitterWindow2, _("Dataset statistics && info"), false); Notebook3->AddPage(txtException, _("End of load message"), false); FlexGridSizer6->Add( @@ -784,7 +783,7 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) pn_CObservationImage = new wxPanel( Notebook1, ID_PANEL9, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL9")); - FlexGridSizer3 = new wxFlexGridSizer(2, 1, 0, 0); + FlexGridSizer3 = new wxFlexGridSizer(0, 1, 0, 0); FlexGridSizer3->AddGrowableCol(0); FlexGridSizer3->AddGrowableRow(1); StaticText2 = new wxStaticText( @@ -794,10 +793,26 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) FlexGridSizer3->Add( StaticText2, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5); + + ScrolledWindow2 = new wxScrolledWindow( + pn_CObservationImage, ID_SCROLLEDWINDOW2, wxDefaultPosition, + wxDefaultSize, wxHSCROLL | wxVSCROLL, _T("ID_SCROLLEDWINDOW2")); + FlexGridSizerImg = new wxFlexGridSizer(0, 1, 0, 0); + FlexGridSizerImg->AddGrowableCol(0); + FlexGridSizerImg->AddGrowableRow(0); + bmpObsImage = new wxStaticBitmapPopup( - pn_CObservationImage, ID_STATICBITMAP1, wxNullBitmap, wxPoint(0, 0), + ScrolledWindow2, ID_STATICBITMAP1, wxNullBitmap, wxPoint(0, 0), wxDefaultSize, wxFULL_REPAINT_ON_RESIZE, _T("ID_STATICBITMAP1")); - FlexGridSizer3->Add(bmpObsImage, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5); + + FlexGridSizerImg->Add( + bmpObsImage, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 0); + ScrolledWindow2->SetSizer(FlexGridSizerImg); + FlexGridSizerImg->Fit(ScrolledWindow2); + FlexGridSizerImg->SetSizeHints(ScrolledWindow2); + + FlexGridSizer3->Add( + ScrolledWindow2, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 0); pn_CObservationImage->SetSizer(FlexGridSizer3); FlexGridSizer3->Fit(pn_CObservationImage); FlexGridSizer3->SetSizeHints(pn_CObservationImage); @@ -1274,10 +1289,9 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) wxEmptyString, wxITEM_NORMAL); Menu23->Append(MenuItem30); MenuItem68 = new wxMenuItem( - Menu23, ID_MENUITEM71, - _("Convert pairs of mono into stereo...\tCreate stereo images " - "observations from pairs of monocular images"), - wxEmptyString, wxITEM_NORMAL); + Menu23, ID_MENUITEM71, _("Convert pairs of mono into stereo..."), + "Create stereo images observations from pairs of monocular images", + wxITEM_NORMAL); Menu23->Append(MenuItem68); MenuItem69 = new wxMenuItem( Menu23, ID_MENUITEM72, _("Batch rectify images..."), wxEmptyString, @@ -1655,6 +1669,9 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) imgList->Add(wxIcon(tree_icon7_xpm)); imgList->Add(wxIcon(tree_icon8_xpm)); imgList->Add(wxIcon(tree_icon9_xpm)); + imgList->Add(wxIcon(tree_icon10_xpm)); + imgList->Add(wxIcon(tree_icon11_xpm)); + imgList->Add(wxIcon(tree_icon12_xpm)); tree_view->AssignImageList(imgList); @@ -1698,12 +1715,6 @@ xRawLogViewerFrame::xRawLogViewerFrame(wxWindow* parent, wxWindowID id) plotRangeBearing->AddLayer(new mpScaleY()); plotRangeBearing->AddLayer(lyRangeBearingLandmarks); - plotScan2D->EnableDoubleBuffer(true); - plotAct2D_XY->EnableDoubleBuffer(true); - plotAct2D_PHI->EnableDoubleBuffer(true); - plotRangeBearing->EnableDoubleBuffer(true); - plotRawlogSensorTimes->EnableDoubleBuffer(true); - Maximize(); // Maximize the main window // Set sliders: @@ -6458,6 +6469,6 @@ void xRawLogViewerFrame::On3DObsPagesChange(wxBookCtrlEvent& event) m_gl3DRangeScan->Refresh(); wxTheApp->Yield(); // Let the app. process messages - m_gl3DRangeScan->Render(); + // m_gl3DRangeScan->Render(); } } diff --git a/apps/RawLogViewer/xRawLogViewerMain.h b/apps/RawLogViewer/xRawLogViewerMain.h index 70c1041f38..ba689ba768 100644 --- a/apps/RawLogViewer/xRawLogViewerMain.h +++ b/apps/RawLogViewer/xRawLogViewerMain.h @@ -577,6 +577,8 @@ class xRawLogViewerFrame : public wxFrame wxButton* btnEditComments; wxMenuItem* MenuItem85; //*) + wxFlexGridSizer* FlexGridSizerImg = nullptr; + wxScrolledWindow* ScrolledWindow2 = nullptr; void OnComboImageDirsChange(wxCommandEvent& event); void On3DObsPagesChange(wxBookCtrlEvent& event); diff --git a/apps/SceneViewer3D/CodeBlock_project_Linux/3DSceneViewer.cbp b/apps/SceneViewer3D/CodeBlock_project_Linux/3DSceneViewer.cbp index 85384719d3..61c1b632b1 100644 --- a/apps/SceneViewer3D/CodeBlock_project_Linux/3DSceneViewer.cbp +++ b/apps/SceneViewer3D/CodeBlock_project_Linux/3DSceneViewer.cbp @@ -2,12 +2,12 @@ -