rawlog_record.h
Go to the documentation of this file.
00001 /***********************************************************************************
00002  * Revised BSD License *
00003  * Copyright (c) 2014, Markus Bader <markus.bader@tuwien.ac.at> *
00004  * All rights reserved. *
00005  *                                                                                 *
00006  * Redistribution and use in source and binary forms, with or without *
00007  * modification, are permitted provided that the following conditions are met: *
00008  *     * Redistributions of source code must retain the above copyright *
00009  *       notice, this list of conditions and the following disclaimer. *
00010  *     * Redistributions in binary form must reproduce the above copyright *
00011  *       notice, this list of conditions and the following disclaimer in the *
00012  *       documentation and/or other materials provided with the distribution. *
00013  *     * Neither the name of the Vienna University of Technology nor the *
00014  *       names of its contributors may be used to endorse or promote products *
00015  *       derived from this software without specific prior written permission. *
00016  *                                                                                 *
00017  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018  *AND *
00019  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  **
00021  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
00022  * DISCLAIMED. IN NO EVENT SHALL Markus Bader BE LIABLE FOR ANY *
00023  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
00024  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00025  **
00026  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
00027  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
00028  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00029  **
00030  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  **                       *
00032  ***********************************************************************************/
00033 
00034 #include <iostream>
00035 #include <stdint.h>
00036 #include <boost/interprocess/sync/interprocess_mutex.hpp>
00037 
00038 #ifndef MRPT_RAWLOG_RECORD_H
00039 #define MRPT_RAWLOG_RECORD_H
00040 
00041 #include <mrpt/version.h>
00042 #include <mrpt/obs/CRawlog.h>
00043 #include <mrpt/obs/CActionRobotMovement2D.h>
00044 #include <mrpt/obs/CObservationOdometry.h>
00045 #include <mrpt/obs/CObservation2DRangeScan.h>
00046 #include <mrpt/obs/CObservationBearingRange.h>
00047 #include <mrpt/obs/CObservationBeaconRanges.h>
00048 
00049 using mrpt::obs::CActionRobotMovement2D;
00050 using mrpt::obs::CRawlog;
00051 
00052 #include <mrpt/poses/CPose2D.h>
00053 #include <mrpt_bridge/mrpt_log_macros.h>
00054 
00055 #include <mrpt_rawlog_record/rawlog_record_defaults.h>
00056 
00057 class RawlogRecord
00058 {
00059         MRPT_VIRTUAL_LOG_MACROS;
00060 
00061    public:
00062         struct Parameters
00063         {
00064                 Parameters() = default;
00065 
00066                 bool debug{RAWLOG_RECORD_DEFAULT_DEBUG};
00067                 std::string raw_log_folder{RAWLOG_RECORD_DEFAULT_RAW_FOLDER};
00068                 std::string raw_log_name{RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME};
00069                 std::string raw_log_name_asf{RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME_ASF};
00070                 bool record_range_scan{true};
00071                 bool record_bearing_range{false};
00072                 bool record_beacon_range{false};
00073                 double bearing_range_std_range{0.1};
00074                 double bearing_range_std_yaw{0.01};
00075                 double bearing_range_std_pitch{0.01};
00076                 CActionRobotMovement2D::TMotionModelOptions motionModelOptions;
00077         };
00078         RawlogRecord() = default;
00079         ~RawlogRecord();
00080 
00081    protected:
00082         Parameters base_param_;
00083 
00084         CRawlog pRawLog;
00085         CRawlog pRawLogASF;
00086         void updateRawLogName(const mrpt::system::TTimeStamp& t);
00087         boost::interprocess::interprocess_mutex mutexRawLog;
00088 };
00089 
00090 #endif  // MRPT_RAWLOG_RECORD_H


mrpt_rawlog
Author(s):
autogenerated on Thu Jun 6 2019 21:53:23