Skip to content

Commit

Permalink
Fix the rest of the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jolting committed Feb 11, 2018
1 parent 5dff686 commit 2934373
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions samples/hwdrivers_capture_video_dc1394/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using namespace mrpt::hwdrivers;
using namespace mrpt::gui;
using namespace mrpt::obs;
using namespace mrpt::system;
using namespace std;

//#define DO_CAPTURE 1
Expand Down
7 changes: 6 additions & 1 deletion samples/hwdrivers_capture_video_flycapture2/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
#include <mrpt/io/CFileGZOutputStream.h>
#include <mrpt/system/CTicTac.h>
#include <mrpt/gui/CDisplayWindow.h>
#include <mrpt/serialization/CArchive.h>
#include <mrpt/system/os.h>
#include <mrpt/system/CTicTac.h>
#include <iostream>

using namespace mrpt::hwdrivers;
using namespace mrpt::obs;
using namespace mrpt::gui;
using namespace mrpt::io;
using namespace mrpt::serialization;
using namespace mrpt::system;
using namespace std;

// ------------------------------------------------------
Expand Down Expand Up @@ -77,7 +82,7 @@ void TestCapture_FlyCapture2()
cout.flush();
if (win.isOpen()) win.showImage(obs->image);

fil << obs;
archiveFrom(fil) << obs;
}
}

Expand Down
6 changes: 5 additions & 1 deletion samples/hwdrivers_capture_video_flycapture2_stereo/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
#include <mrpt/obs/CObservationImage.h>
#include <mrpt/gui/CDisplayWindow.h>
#include <mrpt/system/os.h>
#include <mrpt/serialization/CArchive.h>
#include <iostream>

using namespace mrpt::hwdrivers;
using namespace mrpt::gui;
using namespace mrpt::obs;
using namespace mrpt::io;
using namespace mrpt::system;
using namespace mrpt::serialization;
using namespace std;

// ------------------------------------------------------
Expand Down Expand Up @@ -127,7 +131,7 @@ void TestCapture_FlyCapture2_stereo()
if (winL.isOpen()) winL.showImage(obsL->image);
if (winR.isOpen()) winR.showImage(obsR->image);

fil << obsL << obsR;
archiveFrom(fil) << obsL << obsR;
}
}

Expand Down
6 changes: 5 additions & 1 deletion samples/hwdrivers_capture_video_opencv/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
#include <mrpt/io/CFileGZOutputStream.h>
#include <mrpt/system/CTicTac.h>
#include <mrpt/gui/CDisplayWindow.h>
#include <mrpt/serialization/CArchive.h>
#include <iostream>

using namespace mrpt::hwdrivers;
using namespace mrpt::gui;
using namespace mrpt::obs;
using namespace mrpt::system;
using namespace mrpt::io;
using namespace mrpt::serialization;
using namespace std;

// ------------------------------------------------------
Expand Down Expand Up @@ -79,7 +83,7 @@ void TestCapture_OpenCV()
break;
}

fil << obs;
archiveFrom(fil) << obs;

cout << ".";
cout.flush();
Expand Down
1 change: 1 addition & 0 deletions samples/hwdrivers_joystick_example/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

using namespace std;
using namespace mrpt;
using namespace mrpt::system;
using namespace mrpt::hwdrivers;

// ------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions samples/maps_gridmap_benchmark/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
#include <mrpt/obs/CObservation2DRangeScan.h>
#include <mrpt/obs/CRawlog.h>
#include <mrpt/config/CConfigFile.h>
#include <mrpt/system/CTicTac.h>
#include <iostream>

using namespace mrpt;
using namespace mrpt::maps;
using namespace mrpt::obs;
using namespace mrpt::random;
using namespace mrpt::poses;
using namespace mrpt::system;
using namespace std;

#include <mrpt/examples_config.h>
Expand Down
2 changes: 1 addition & 1 deletion samples/obs_mox_model_rawlog/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main(int argc, char** argv)
{
try
{
CObservation::Ptr o;
CSerializable::Ptr o;
archiveFrom(file_input) >> o;

if (o) // ASSERT_(o);
Expand Down
2 changes: 1 addition & 1 deletion samples/opengl_video_viewport_demo/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void TestOpenGLVideo()
{
COpenGLScene::Ptr& theScene = win.get3DSceneAndLock();
gl_view_main = theScene->getViewport("main");
ASSERT_(gl_view_main)
ASSERT_(gl_view_main);
// IMPORTANT!!! IF NOT UNLOCKED, THE WINDOW WILL NOT BE UPDATED!
win.unlockAccess3DScene();
}
Expand Down
4 changes: 0 additions & 4 deletions samples/slam_icp3d_simple_example/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ void test_icp3D()
CSetOfObjects::Ptr PTNS1 = mrpt::make_aligned_shared<CSetOfObjects>();
CSetOfObjects::Ptr PTNS2 = mrpt::make_aligned_shared<CSetOfObjects>();

<<<<<<< HEAD
CPointsMap::COLOR_3DSCENE(mrpt::img::TColorf(1, 0, 0));
=======
CPointsMap::COLOR_3DSCENE(mrpt::utils::TColorf(1, 0, 0));
>>>>>>> master
M1.getAs3DObject(PTNS1);

CPointsMap::COLOR_3DSCENE(mrpt::img::TColorf(0, 0, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ using namespace mrpt::maps;
using namespace mrpt::system;
using namespace mrpt::random;
using namespace mrpt::poses;
using namespace mrpt::config;
using namespace std;

float SIGMA = 0.03f;
Expand Down

2 comments on commit 2934373

@jlblancoc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"¡Ole"! ;-)

@jolting
Copy link
Member Author

@jolting jolting commented on 2934373 Feb 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that one limitation of DefineExamples.cmake is that you cannot define non-mrpt dependencies.
hwdrivers_openni2_to_rawlog hwdrivers_openni2_proximity_demo and hwdrivers_openni2_rgbd_demo use OpenNI directly, so either they need to be rewritten or external dependencies must be supported.

Please sign in to comment.