MRPT  1.9.9
carmen_log_tools.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #ifndef CARMEN_LOG_TOOLS_H
11 #define CARMEN_LOG_TOOLS_H
12 
13 #include <mrpt/system/datetime.h>
14 #include <mrpt/obs/CObservation.h>
15 
16 namespace mrpt::obs
17 {
18 /** Parse one line from an text input stream and interpret it as a CARMEN log
19  *entry,
20  * returning its MRPT observation representation.
21  *
22  * The first word in each line determines the type of that entry. Supported
23  * line entries in this class are the following:
24  * - "ROBOTLASER(.*)": A joint odometry-laser entry. This function will
25  *return
26  *both an mrpt::obs::CObservationOdometry and an
27  *mrpt::obs::CObservation2DRangeScan
28  * - "FLASER": (Idem)
29  * - "RLASER": (Idem)
30  * - "PARAM": This case is special (read below).
31  *
32  * Note that the sensor position on the robot will be always deduced from the
33  *corresponding CARMEN log line automatically.
34  *
35  * The following entry types will be IGNORED, since with the tags above will
36  *be enough in most applications.
37  * - "ODOM"
38  * - "RAWLASER"
39  *
40  * About the PARAM entries: This functions has an internal static status
41  *consisting on some PARAM values
42  * which have effects on the future read observations. When the function finds
43  *one of these, it stores the
44  * parameter value, return an empty vector of observations, and use those
45  *values for future laser entries of types FLASER or RLASER.
46  * Currently, only these parameters are processed:
47  * - "robot_front_laser_max"
48  * - "laser_front_laser_resolution"
49  * - "robot_rear_laser_max"
50  * - "laser_rear_laser_resolution"
51  *
52  * \param time_start_log The real timestamp that corresponds to a "0" in the
53  *CARMEN log (you can get a mrpt::system::now() once and pass that same value
54  *with each call).
55  *
56  * References: http://carmen.sourceforge.net/doc/binary__loggerplayback.html
57  *
58  * \return true on success, false on end-of-file (EOF).
59  * \exception std::runtime_error On any invalid line found.
60  * \ingroup mrpt_obs_grp
61  */
63  std::istream& in_stream,
64  std::vector<mrpt::obs::CObservation::Ptr>& out_imported_observations,
65  const mrpt::system::TTimeStamp& time_start_log);
66 
67 }
68 #endif
69 
70 
bool carmen_log_parse_line(std::istream &in_stream, std::vector< mrpt::obs::CObservation::Ptr > &out_imported_observations, const mrpt::system::TTimeStamp &time_start_log)
Parse one line from an text input stream and interpret it as a CARMEN log entry, returning its MRPT o...
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:40
This namespace contains representation of robot actions and observations.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020