rawlog_record.h
Go to the documentation of this file.
1 /***********************************************************************************
2  * Revised BSD License *
3  * Copyright (c) 2014, Markus Bader <markus.bader@tuwien.ac.at> *
4  * All rights reserved. *
5  * *
6  * Redistribution and use in source and binary forms, with or without *
7  * modification, are permitted provided that the following conditions are met: *
8  * * Redistributions of source code must retain the above copyright *
9  * notice, this list of conditions and the following disclaimer. *
10  * * Redistributions in binary form must reproduce the above copyright *
11  * notice, this list of conditions and the following disclaimer in the *
12  * documentation and/or other materials provided with the distribution. *
13  * * Neither the name of the Vienna University of Technology nor the *
14  * names of its contributors may be used to endorse or promote products *
15  * derived from this software without specific prior written permission. *
16  * *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  *AND *
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  **
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
22  * DISCLAIMED. IN NO EVENT SHALL Markus Bader BE LIABLE FOR ANY *
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25  **
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
27  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  **
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  ** *
32  ***********************************************************************************/
33 
34 #pragma once
35 
36 #include <mrpt/obs/CActionRobotMovement2D.h>
37 #include <mrpt/obs/CObservation2DRangeScan.h>
38 #include <mrpt/obs/CObservationBeaconRanges.h>
39 #include <mrpt/obs/CObservationBearingRange.h>
40 #include <mrpt/obs/CObservationOdometry.h>
41 #include <mrpt/obs/CRawlog.h>
42 #include <mrpt/poses/CPose2D.h>
43 #include <mrpt/ros1bridge/logging.h>
45 #include <stdint.h>
46 
47 #include <boost/interprocess/sync/interprocess_mutex.hpp>
48 #include <iostream>
49 
50 using mrpt::obs::CActionRobotMovement2D;
51 using mrpt::obs::CRawlog;
52 
54 {
55  public:
56  RawlogRecord() = default;
57  ~RawlogRecord();
58 
59  struct Parameters
60  {
61  Parameters() = default;
62 
67  bool record_range_scan{true};
68  bool record_bearing_range{false};
69  bool record_beacon_range{false};
71  double bearing_range_std_yaw{0.01};
73  CActionRobotMovement2D::TMotionModelOptions motionModelOptions;
74  };
75 
76  protected:
78 
79  CRawlog pRawLog;
80  CRawlog pRawLogASF;
81  void updateRawLogName(const mrpt::system::TTimeStamp& t);
82  boost::interprocess::interprocess_mutex mutexRawLog;
83 };
rawlog_record_defaults.h
RawlogRecord::Parameters::raw_log_name_asf
std::string raw_log_name_asf
Definition: rawlog_record.h:66
RawlogRecord::Parameters::record_range_scan
bool record_range_scan
Definition: rawlog_record.h:67
RawlogRecord::RawlogRecord
RawlogRecord()=default
RawlogRecord::pRawLog
CRawlog pRawLog
Definition: rawlog_record.h:79
RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME
#define RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME
Definition: rawlog_record_defaults.h:39
RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME_ASF
#define RAWLOG_RECORD_DEFAULT_RAW_LOG_NAME_ASF
Definition: rawlog_record_defaults.h:40
RawlogRecord::Parameters::record_beacon_range
bool record_beacon_range
Definition: rawlog_record.h:69
RawlogRecord
Definition: rawlog_record.h:53
RawlogRecord::Parameters::bearing_range_std_range
double bearing_range_std_range
Definition: rawlog_record.h:70
RawlogRecord::Parameters::record_bearing_range
bool record_bearing_range
Definition: rawlog_record.h:68
RawlogRecord::Parameters
Definition: rawlog_record.h:59
RawlogRecord::Parameters::raw_log_folder
std::string raw_log_folder
Definition: rawlog_record.h:64
RawlogRecord::~RawlogRecord
~RawlogRecord()
Definition: rawlog_record.cpp:42
RawlogRecord::updateRawLogName
void updateRawLogName(const mrpt::system::TTimeStamp &t)
Definition: rawlog_record.cpp:75
RawlogRecord::Parameters::raw_log_name
std::string raw_log_name
Definition: rawlog_record.h:65
RawlogRecord::mutexRawLog
boost::interprocess::interprocess_mutex mutexRawLog
Definition: rawlog_record.h:82
RawlogRecord::Parameters::motionModelOptions
CActionRobotMovement2D::TMotionModelOptions motionModelOptions
Definition: rawlog_record.h:73
RawlogRecord::Parameters::bearing_range_std_pitch
double bearing_range_std_pitch
Definition: rawlog_record.h:72
RawlogRecord::Parameters::bearing_range_std_yaw
double bearing_range_std_yaw
Definition: rawlog_record.h:71
RawlogRecord::pRawLogASF
CRawlog pRawLogASF
Definition: rawlog_record.h:80
RawlogRecord::Parameters::Parameters
Parameters()=default
RAWLOG_RECORD_DEFAULT_RAW_FOLDER
#define RAWLOG_RECORD_DEFAULT_RAW_FOLDER
Definition: rawlog_record_defaults.h:38
RawlogRecord::Parameters::debug
bool debug
Definition: rawlog_record.h:63
RawlogRecord::base_param_
Parameters base_param_
Definition: rawlog_record.h:77
RAWLOG_RECORD_DEFAULT_DEBUG
#define RAWLOG_RECORD_DEFAULT_DEBUG
Definition: rawlog_record_defaults.h:37


mrpt_rawlog
Author(s):
autogenerated on Tue Sep 17 2024 02:10:22