Skip to content

Commit

Permalink
Merge branch 'develop' to release v2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Mar 4, 2023
2 parents 451f276 + 9610854 commit b750be5
Show file tree
Hide file tree
Showing 315 changed files with 6,551 additions and 3,568 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: Install Dependencies
run: |
# See bug/issue: https://github.com/orgs/community/discussions/47863
sudo apt-mark hold grub-efi-amd64-signed
sudo apt-get -y update
sudo apt-get -y upgrade
Expand Down
4 changes: 2 additions & 2 deletions apps/2d-slam-demo/slamdemoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <mrpt/math/ops_matrices.h>
#include <mrpt/math/wrap2pi.h>
#include <mrpt/obs/CObservationComment.h>
#include <mrpt/opengl/COpenGLScene.h>
#include <mrpt/opengl/Scene.h>
#include <mrpt/random.h>
#include <mrpt/serialization/CArchive.h>

Expand Down Expand Up @@ -2256,7 +2256,7 @@ void slamdemoFrame::OnMenuSaveFilterState(wxCommandEvent& event)
auto obj3D = mrpt::opengl::CSetOfObjects::Create();
m_SLAM.getAs3DObject(obj3D);

mrpt::opengl::COpenGLScene scene;
mrpt::opengl::Scene scene;
scene.insert(obj3D);

scene.saveToFile(filName);
Expand Down
2 changes: 1 addition & 1 deletion apps/3d-rotation-converter/3d-rotation-converter_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static void AppRotationConverter()
// Add a background scene:
// -----------------------------
{
auto scene = mrpt::opengl::COpenGLScene::Create();
auto scene = mrpt::opengl::Scene::Create();
scene->insert(mrpt::opengl::CGridPlaneXY::Create());

scene->insert(app.gl_corner_user);
Expand Down
2 changes: 1 addition & 1 deletion apps/DifOdometry-Camera/DifOdometry_Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void CDifodoCamera::initializeScene()
// User-interface information
img::CImage img_legend;
img_legend.loadFromXPM(legend_xpm);
COpenGLViewport::Ptr legend = scene->createViewport("legend");
Viewport::Ptr legend = scene->createViewport("legend");
legend->setViewportPosition(20, 20, 350, 201);
legend->setImageView(img_legend);

Expand Down
4 changes: 2 additions & 2 deletions apps/DifOdometry-Camera/DifOdometry_Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <mrpt/core/round.h>
#include <mrpt/gui/CDisplayWindow3D.h>
#include <mrpt/img/CImage.h>
#include <mrpt/opengl/COpenGLScene.h>
#include <mrpt/opengl/Scene.h>
#include <mrpt/system/CTicTac.h>
#include <mrpt/vision/CDifodo.h>

Expand Down Expand Up @@ -74,7 +74,7 @@ class CDifodoCamera : public mrpt::vision::CDifodo
unsigned int repr_level;

/** Opengl scene */
mrpt::opengl::COpenGLScene::Ptr scene;
mrpt::opengl::Scene::Ptr scene;

// OpenNI variables to manage the camera
openni::Status rc;
Expand Down
2 changes: 1 addition & 1 deletion apps/DifOdometry-Datasets/DifOdometry_Datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void CDifodoDatasets::initializeScene()
// User-interface information
CImage img_legend;
img_legend.loadFromXPM(legend_xpm);
COpenGLViewport::Ptr legend = scene->createViewport("legend");
Viewport::Ptr legend = scene->createViewport("legend");
legend->setViewportPosition(20, 20, 332, 164);
legend->setImageView(img_legend);

Expand Down
4 changes: 2 additions & 2 deletions apps/DifOdometry-Datasets/DifOdometry_Datasets.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <mrpt/img/CImage.h>
#include <mrpt/obs/CObservation3DRangeScan.h>
#include <mrpt/obs/CRawlog.h>
#include <mrpt/opengl/COpenGLScene.h>
#include <mrpt/opengl/Scene.h>
#include <mrpt/vision/CDifodo.h>

#include <Eigen/Dense>
Expand All @@ -28,7 +28,7 @@ class CDifodoDatasets : public mrpt::vision::CDifodo
mrpt::poses::CPose3D gt_oldpose;

/** Opengl scene */
mrpt::opengl::COpenGLScene::Ptr scene;
mrpt::opengl::Scene::Ptr scene;
mrpt::gui::CDisplayWindow3D window;
mrpt::obs::CRawlog dataset;
std::ifstream f_gt;
Expand Down
12 changes: 6 additions & 6 deletions apps/GridmapNavSimul/gridmapSimulMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText9, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edAxb = new wxTextCtrl(
Panel3, ID_TEXTCTRL6, _("1e-5"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL6, _("1e-2"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL6"));
FlexGridSizer9->Add(
edAxb, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand All @@ -407,7 +407,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText13, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edAxs = new wxTextCtrl(
Panel3, ID_TEXTCTRL7, _("10e-4"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL7, _("0.01"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL7"));
FlexGridSizer9->Add(
edAxs, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand All @@ -418,7 +418,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText10, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edAyb = new wxTextCtrl(
Panel3, ID_TEXTCTRL8, _("1e-5"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL8, _("0.01"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL8"));
FlexGridSizer9->Add(
edAyb, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand All @@ -429,7 +429,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText11, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edAys = new wxTextCtrl(
Panel3, ID_TEXTCTRL9, _("10e-4"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL9, _("0.10"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL9"));
FlexGridSizer9->Add(
edAys, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand All @@ -440,7 +440,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText12, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edApb = new wxTextCtrl(
Panel3, ID_TEXTCTRL10, _("5e-4"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL10, _("0.01"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL10"));
FlexGridSizer9->Add(
edApb, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand All @@ -451,7 +451,7 @@ gridmapSimulFrame::gridmapSimulFrame(wxWindow* parent, wxWindowID id)
FlexGridSizer9->Add(
StaticText14, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
edAps = new wxTextCtrl(
Panel3, ID_TEXTCTRL11, _("10e-4"), wxDefaultPosition, wxDefaultSize, 0,
Panel3, ID_TEXTCTRL11, _("0.01"), wxDefaultPosition, wxDefaultSize, 0,
wxDefaultValidator, _T("ID_TEXTCTRL11"));
FlexGridSizer9->Add(
edAps, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL,
Expand Down
6 changes: 2 additions & 4 deletions apps/RawLogViewer/CFormMotionModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,8 @@ CFormMotionModel::CFormMotionModel(wxWindow* parent, wxWindowID id)
btnOk, 1, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5);
HyperlinkCtrl1 = new wxHyperlinkCtrl(
this, ID_HYPERLINKCTRL1,
_("http://www.mrpt.org/tutorials/programming/"
"odometry-and-motion-models/probabilistic_motion_models/"),
_("http://www.mrpt.org/tutorials/programming/"
"odometry-and-motion-models/probabilistic_motion_models/"),
_("https://docs.mrpt.org/reference/latest/tutorial-motion-models.html"),
_("https://docs.mrpt.org/reference/latest/tutorial-motion-models.html"),
wxDefaultPosition, wxDefaultSize,
wxHL_CONTEXTMENU | wxHL_ALIGN_CENTRE | wxNO_BORDER,
_T("ID_HYPERLINKCTRL1"));
Expand Down
8 changes: 4 additions & 4 deletions apps/RawLogViewer/CFormRawMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ CFormRawMap::~CFormRawMap()
//*)
}

void loadMapInto3DScene(COpenGLScene& scene)
void loadMapInto3DScene(Scene& scene)
{
{
TPoint3D minC, maxC;
Expand Down Expand Up @@ -779,7 +779,7 @@ void CFormRawMap::OnbtnSave3DClick(wxCommandEvent&)
wxBusyCursor waitCursor;

CFileGZOutputStream fil(std::string(dialog.GetPath().mb_str()));
COpenGLScene scene;
Scene scene;

loadMapInto3DScene(scene);

Expand Down Expand Up @@ -1387,12 +1387,12 @@ void CFormRawMap::OnbtnSavePathClick(wxCommandEvent&)
void CFormRawMap::OnbtnSaveObsPathClick(wxCommandEvent&) {}
void CFormRawMap::OnbtnView3DClick(wxCommandEvent&)
{
COpenGLScene scene;
Scene scene;

loadMapInto3DScene(scene);

win3Dmap = CDisplayWindow3D::Create("Raw-map 3D preview");
COpenGLScene::Ptr the_scene = win3Dmap->get3DSceneAndLock();
Scene::Ptr the_scene = win3Dmap->get3DSceneAndLock();
*the_scene = scene;
win3Dmap->unlockAccess3DScene();
win3Dmap->repaint();
Expand Down
4 changes: 2 additions & 2 deletions apps/RawLogViewer/main_gps_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void xRawLogViewerFrame::OnMenuDrawGPSPath(wxCommandEvent& event)
"GPS path, %i points (%s) %.03f meters length", int(M),
the_label.c_str(), overall_distance));

COpenGLScene scene;
Scene scene;
CPointCloud::Ptr gl_path = std::make_shared<CPointCloud>();
gl_path->setAllPoints(xs, ys, zs);
gl_path->setColor(0, 0, 1);
Expand All @@ -195,7 +195,7 @@ void xRawLogViewerFrame::OnMenuDrawGPSPath(wxCommandEvent& event)
scene.insert(
std::make_shared<CAxis>(-300, -300, -50, 300, 300, 50, 1.0, 3, true));

COpenGLScene::Ptr the_scene = winGPSPath->get3DSceneAndLock();
Scene::Ptr the_scene = winGPSPath->get3DSceneAndLock();
*the_scene = scene;
winGPSPath->unlockAccess3DScene();
winGPSPath->repaint();
Expand Down
3 changes: 1 addition & 2 deletions apps/RawLogViewer/main_timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ void xRawLogViewerFrame::createTimeLineObjects(wxFlexGridSizer* fgzMain)

// Set-up bottom timeline view opengl objects:
{
mrpt::opengl::COpenGLScene::Ptr& scene =
m_glTimeLine->getOpenGLSceneRef();
mrpt::opengl::Scene::Ptr& scene = m_glTimeLine->getOpenGLSceneRef();
scene->clear();

// Enable no-projection mode in this viewport:
Expand Down
2 changes: 1 addition & 1 deletion apps/ReactiveNav3D-Demo/ReactiveNav3D_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class CMyReactInterface
std::vector<CRobotKinects> kinects;
CShortTermMemory stm;
gui::CDisplayWindow3D window;
COpenGLScene::Ptr scene;
Scene::Ptr scene;

bool getCurrentPoseAndSpeeds(
mrpt::math::TPose2D& curPose, mrpt::math::TTwist2D& curVel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ void reactive_navigator_demoframe::OnAbout(wxCommandEvent&)

void reactive_navigator_demoframe::updateMap3DView()
{
gl_grid = m_gridMap.getVisualization();
m_gridMap.getVisualizationInto(*gl_grid);
}

void reactive_navigator_demoframe::OnbtnPlaceRobotClick(wxCommandEvent& event)
Expand Down
20 changes: 10 additions & 10 deletions apps/SceneViewer3D/_DSceneViewerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ const std::string iniFileSect("CONF_LIN");
#include <mrpt/opengl/CAssimpModel.h>
#include <mrpt/opengl/CFBORender.h>
#include <mrpt/opengl/CGridPlaneXY.h>
#include <mrpt/opengl/COpenGLScene.h>
#include <mrpt/opengl/CPlanarLaserScan.h> // It's in lib mrpt-maps
#include <mrpt/opengl/CPointCloud.h>
#include <mrpt/opengl/CPointCloudColoured.h>
#include <mrpt/opengl/Scene.h>
#include <mrpt/opengl/stock_objects.h>
#include <mrpt/serialization/CArchive.h>
#include <mrpt/system/CDirectoryExplorer.h>
Expand Down Expand Up @@ -817,7 +817,7 @@ void _DSceneViewerFrame::OnNewScene(wxCommandEvent& event)
openGLSceneRef->insert(stock_objects::CornerXYZ());

// Add a clone viewport:
COpenGLViewport::Ptr vi = openGLSceneRef->createViewport("clone");
Viewport::Ptr vi = openGLSceneRef->createViewport("clone");
vi->setViewportPosition(0.05, 0.05, 0.2, 0.2);
vi->setCloneView("main");
vi->setCloneCamera(true);
Expand Down Expand Up @@ -887,7 +887,7 @@ void _DSceneViewerFrame::loadFromFile(
// Change the camera if necesary:
if (openGLSceneRef->followCamera())
{
COpenGLViewport::Ptr view = openGLSceneRef->getViewport("main");
Viewport::Ptr view = openGLSceneRef->getViewport("main");
ASSERTMSG_(
view, "ERROR: there is no 'main' viewport in the 3D scene!");

Expand Down Expand Up @@ -1215,7 +1215,7 @@ void _DSceneViewerFrame::OnTravellingTrigger(wxTimerEvent& event)
else
{
// Change the camera
COpenGLViewport::Ptr view = openGLSceneRef->getViewport("main");
Viewport::Ptr view = openGLSceneRef->getViewport("main");

if (!view)
THROW_EXCEPTION(
Expand Down Expand Up @@ -1303,7 +1303,7 @@ void _DSceneViewerFrame::OnStartCameraTravelling(wxCommandEvent& event)
else
{
// Change the camera
COpenGLViewport::Ptr view = openGLSceneRef->getViewport("main");
Viewport::Ptr view = openGLSceneRef->getViewport("main");

if (!view)
THROW_EXCEPTION(
Expand Down Expand Up @@ -1705,7 +1705,7 @@ void _DSceneViewerFrame::OnMenuItemImportPLYPointCloud(wxCommandEvent& event)
{
auto openGLSceneRef = m_canvas->getOpenGLSceneRef();
// Set the point cloud as the only object in scene:
openGLSceneRef = std::make_shared<opengl::COpenGLScene>();
openGLSceneRef = std::make_shared<opengl::Scene>();

if (dlgPLY.cbXYGrid->GetValue())
{
Expand Down Expand Up @@ -2099,7 +2099,7 @@ void _DSceneViewerFrame::OnmnuImportLASSelected(wxCommandEvent& event)
const double scene_size = bb.min.distanceTo(bb.max);

// Set the point cloud as the only object in scene:
auto scene = std::make_shared<opengl::COpenGLScene>();
auto scene = std::make_shared<opengl::Scene>();
m_canvas->setOpenGLSceneRef(scene);

if (dlgPLY.cbXYGrid->GetValue())
Expand Down Expand Up @@ -2154,7 +2154,7 @@ void _DSceneViewerFrame::OnmnuImportLASSelected(wxCommandEvent& event)
m_canvas->setAzimuthDegrees(45);
m_canvas->setElevationDegrees(30);

COpenGLViewport::Ptr gl_view = scene->getViewport();
Viewport::Ptr gl_view = scene->getViewport();
gl_view->setViewportClipDistances(0.01, 10 * scene_size);

loadedFileName =
Expand Down Expand Up @@ -2198,7 +2198,7 @@ void _DSceneViewerFrame::OnmnuImportImageView(wxCommandEvent&)
{
try
{
auto scene = std::make_shared<opengl::COpenGLScene>();
auto scene = std::make_shared<opengl::Scene>();
m_canvas->setOpenGLSceneRef(scene);
wxFileDialog dialog(
this, _("Choose the LAS file to import"),
Expand All @@ -2217,7 +2217,7 @@ void _DSceneViewerFrame::OnmnuImportImageView(wxCommandEvent&)
if (!im.loadFromFile(fil))
THROW_EXCEPTION_FMT("Error loading image file: '%s'", fil.c_str());

COpenGLViewport::Ptr gl_view = scene->getViewport();
Viewport::Ptr gl_view = scene->getViewport();
gl_view->setImageView(im);

Refresh();
Expand Down
2 changes: 1 addition & 1 deletion apps/camera-calib/CDlgPoseEst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ CDlgPoseEst::CDlgPoseEst(
pose_mat << -25, 25, 100, -0.1, 0.25, 0.5;
//*)

scene = mrpt::opengl::COpenGLScene::Create();
scene = mrpt::opengl::Scene::Create();
cor = mrpt::opengl::stock_objects::CornerXYZ();
cor1 = mrpt::opengl::stock_objects::CornerXYZ();

Expand Down
2 changes: 1 addition & 1 deletion apps/camera-calib/CDlgPoseEst.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class CDlgPoseEst : public wxDialog
mrpt::vision::pnp::CPnP pnp_algos;
Eigen::MatrixXd obj_pts, img_pts, pose_mat, cam_intrinsic, I3;

mrpt::opengl::COpenGLScene::Ptr scene;
mrpt::opengl::Scene::Ptr scene;
mrpt::opengl::CSetOfObjects::Ptr cor, cor1;
mrpt::opengl::CGridPlaneXY::Ptr grid;

Expand Down
3 changes: 1 addition & 2 deletions apps/camera-calib/camera_calib_guiMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,7 @@ void camera_calib_guiDialog::OnlbFilesSelect(wxCommandEvent& event)

void camera_calib_guiDialog::show3Dview()
{
mrpt::opengl::COpenGLScene::Ptr scene =
mrpt::opengl::COpenGLScene::Create();
mrpt::opengl::Scene::Ptr scene = mrpt::opengl::Scene::Create();

const unsigned int check_size_x = edSizeX->GetValue();
const unsigned int check_size_y = edSizeY->GetValue();
Expand Down
9 changes: 4 additions & 5 deletions apps/graph-slam/display_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void display_graph(const GRAPHTYPE& g)
}
}

mrpt::opengl::COpenGLScene::Ptr& scene = win.get3DSceneAndLock();
mrpt::opengl::Scene::Ptr& scene = win.get3DSceneAndLock();
scene->insert(objGraph);

win.unlockAccess3DScene();
Expand Down Expand Up @@ -153,7 +153,7 @@ void display_graph(const GRAPHTYPE& g)
std::cout << "Dumping scene to file: " << sFil
<< std::endl;

mrpt::opengl::COpenGLScene scene;
mrpt::opengl::Scene scene;
scene.insert(m_new_3dobj);
mrpt::io::CFileGZOutputStream f(sFil);
mrpt::serialization::archiveFrom(f) << scene;
Expand Down Expand Up @@ -225,9 +225,8 @@ void display_graph(const GRAPHTYPE& g)
win_feedback.observeBegin(win);
// and openglviewport events:
{
COpenGLScene::Ptr& theScene = win.get3DSceneAndLock();
opengl::COpenGLViewport::Ptr the_main_view =
theScene->getViewport("main");
Scene::Ptr& theScene = win.get3DSceneAndLock();
opengl::Viewport::Ptr the_main_view = theScene->getViewport("main");
win_feedback.observeBegin(*the_main_view);
win.unlockAccess3DScene();
}
Expand Down
5 changes: 2 additions & 3 deletions apps/hmt-slam-gui/generate_3d_views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,8 @@ void hmt_slam_guiFrame::updateLocalMapView()

ellip->setCovMatrix(C);
ellip->setQuantiles(3);
ellip->setLocation(
ellip->getPoseX(), ellip->getPoseY(),
ellip->getPoseZ() + 0.5);
const auto p = ellip->getPose().translation();
ellip->setLocation(p.x, p.y, p.z + 0.5);
ellip->setColor(1, 0, 0);
ellip->setLineWidth(3);

Expand Down
Loading

0 comments on commit b750be5

Please sign in to comment.