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