Go to the documentation of this file.
10 #include <gtest/gtest.h>
12 #include <mrpt/config.h>
15 #include <test_mrpt_common.h>
18 #if MRPT_HAS_FFMPEG && MRPT_HAS_OPENCV
19 TEST(RawlogGrabberApp, CGenericCamera_AVI)
21 TEST(RawlogGrabberApp, DISABLED_CGenericCamera_AVI)
24 using namespace std::string_literals;
27 mrpt::UNITTEST_BASEDIR +
28 "/share/mrpt/config_files/rawlog-grabber/camera_ffmpeg_video_file.ini"s;
32 mrpt::UNITTEST_BASEDIR +
"/share/mrpt/datasets/dummy_video.avi"s;
55 app.
params.
write(
"Camera1",
"process_rate",
"10.0");
64 const std::size_t REQUIRED_GRAB_OBS = 3U;
65 std::atomic_bool runEnded =
false;
67 auto tWatchDog = std::thread([&]() {
70 const auto numSavedObjs = [&]() {
74 if (numSavedObjs >= REQUIRED_GRAB_OBS)
80 std::this_thread::sleep_for(std::chrono::milliseconds(500));
92 if (tWatchDog.joinable()) tWatchDog.join();
96 catch (
const std::exception& e)
mrpt::config::CConfigFileMemory params
Populated in initialize().
void write(const std::string §ion, const std::string &name, enum_t value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string())
bool show_sensor_thread_exceptions
If enabled (default), exceptions in sensor threads will be reported to std::cerr.
TEST(ICP_SLAM_App, MapFromRawlog_PointMap)
const std::string video_fil
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
const std::string ini_fil
std::string getTempFileName()
Returns the name of a proposed temporary file name.
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
RawlogGrabber application wrapper class.
void initialize(int argc, const char **argv)
Initializes the application from CLI parameters.
double run_for_seconds
If >0, run() will return after this period (in seconds)
void setMinLoggingLevel(const VerbosityLevel level)
Set the minimum logging level for which the incoming logs are going to be taken into account.
void run()
Runs with the current parameter set.
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
std::mutex params_mtx
Acquire this mutex if changing parameters while the app is running.
std::size_t rawlog_saved_objects
Counter of saved objects.
LockHelper< T > lockHelper(T &t)
Syntactic sugar to easily create a locker to any kind of std::mutex.
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
bool createDirectory(const std::string &dirName)
Creates a directory.
std::mutex results_mtx
Acquire this mutex if reading these output variables while the app is running.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020 | |