29 cout <<
"Please, select the input video file or camera...\n";
35 cout <<
"Video stream open OK\n";
46 gl_view_main = theScene->getViewport(
"main");
49 win.unlockAccess3DScene();
58 mrpt::make_aligned_shared<mrpt::opengl::CGridPlaneXY>());
61 gl_view_aux = theScene->createViewport(
"aux");
63 gl_view_aux->setViewportPosition(10, 10, 300, 200);
64 gl_view_aux->setTransparent(
true);
67 win2.unlockAccess3DScene();
71 win2.setPos(400, 100);
73 cout <<
"Close any window to end.\n";
74 while (
win.isOpen() && win2.isOpen())
76 win.addTextMessage(5, 5,
format(
"%.02fFPS",
win.getRenderingFPS()));
77 win2.addTextMessage(5, 5,
format(
"%.02fFPS", win2.getRenderingFPS()));
78 std::this_thread::sleep_for(1ms);
88 win.get3DSceneAndLock();
89 gl_view_main->setImageView(o->image);
90 win.unlockAccess3DScene();
93 win2.get3DSceneAndLock();
94 gl_view_aux->setImageView_fast(o->image);
95 win2.unlockAccess3DScene();
113 catch (std::exception& e)
115 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
120 printf(
"Untyped exception!!");
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
CCameraSensor::Ptr prepareVideoSourceFromUserSelection()
Show to the user a list of possible camera drivers and creates and open the selected camera...
#define ASSERT_(f)
Defines an assertion mechanism.
This base provides a set of functions for maths stuff.
This namespace contains representation of robot actions and observations.
mrpt::gui::CDisplayWindow3D::Ptr win
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::rtti::CObject) is of the give...
The namespace for 3D scene representation and rendering.
GLenum GLsizei GLenum format
Classes for creating GUI windows for 2D and 3D visualization.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.