Main MRPT website > C++ reference
MRPT logo
carmen_log_tools.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 
29 #ifndef CARMEN_LOG_TOOLS_H
30 #define CARMEN_LOG_TOOLS_H
31 
32 #include <mrpt/system/datetime.h>
33 #include <mrpt/slam/CObservation.h>
34 
35 namespace mrpt
36 {
37  namespace slam
38  {
39  /** Parse one line from an text input stream and interpret it as a CARMEN log entry,
40  * returning its MRPT observation representation.
41  *
42  * The first word in each line determines the type of that entry. Supported
43  * line entries in this class are the following:
44  * - "ROBOTLASER(.*)": A joint odometry-laser entry. This function will return both an mrpt::slam::CObservationOdometry and an mrpt::slam::CObservation2DRangeScan
45  * - "FLASER": (Idem)
46  * - "RLASER": (Idem)
47  * - "PARAM": This case is special (read below).
48  *
49  * Note that the sensor position on the robot will be always deduced from the corresponding CARMEN log line automatically.
50  *
51  * The following entry types will be IGNORED, since with the tags above will be enough in most applications.
52  * - "ODOM"
53  * - "RAWLASER"
54  *
55  * About the PARAM entries: This functions has an internal static status consisting on some PARAM values
56  * which have effects on the future read observations. When the function finds one of these, it stores the
57  * parameter value, return an empty vector of observations, and use those values for future laser entries of types FLASER or RLASER.
58  * Currently, only these parameters are processed:
59  * - "robot_front_laser_max"
60  * - "laser_front_laser_resolution"
61  * - "robot_rear_laser_max"
62  * - "laser_rear_laser_resolution"
63  *
64  * \param time_start_log The real timestamp that corresponds to a "0" in the CARMEN log (you can get a mrpt::system::now() once and pass that same value with each call).
65  *
66  * References: http://carmen.sourceforge.net/doc/binary__loggerplayback.html
67  *
68  * \return true on success, false on end-of-file (EOF).
69  * \exception std::runtime_error On any invalid line found.
70  * \ingroup mrpt_obs_grp
71  */
73  std::istream &in_stream,
74  std::vector<mrpt::slam::CObservationPtr> &out_imported_observations,
75  const mrpt::system::TTimeStamp &time_start_log );
76 
77 
78  } // end NS
79 } // end NS
80 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013