Main MRPT website > C++ reference
MRPT logo

carmen_log_tools.h

Go to the documentation of this file.
00001 /* +---------------------------------------------------------------------------+
00002    |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
00003    |                                                                           |
00004    |                   http://mrpt.sourceforge.net/                            |
00005    |                                                                           |
00006    |   Copyright (C) 2005-2011  University of Malaga                           |
00007    |                                                                           |
00008    |    This software was written by the Machine Perception and Intelligent    |
00009    |      Robotics Lab, University of Malaga (Spain).                          |
00010    |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
00011    |                                                                           |
00012    |  This file is part of the MRPT project.                                   |
00013    |                                                                           |
00014    |     MRPT is free software: you can redistribute it and/or modify          |
00015    |     it under the terms of the GNU General Public License as published by  |
00016    |     the Free Software Foundation, either version 3 of the License, or     |
00017    |     (at your option) any later version.                                   |
00018    |                                                                           |
00019    |   MRPT is distributed in the hope that it will be useful,                 |
00020    |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
00021    |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
00022    |     GNU General Public License for more details.                          |
00023    |                                                                           |
00024    |     You should have received a copy of the GNU General Public License     |
00025    |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
00026    |                                                                           |
00027    +---------------------------------------------------------------------------+ */
00028 
00029 #ifndef CARMEN_LOG_TOOLS_H
00030 #define CARMEN_LOG_TOOLS_H
00031 
00032 #include <mrpt/system/datetime.h>
00033 #include <mrpt/slam/CObservation.h>
00034 
00035 namespace mrpt
00036 {
00037         namespace slam
00038         {
00039                 /** Parse one line from an text input stream and interpret it as a CARMEN log entry,
00040                   *  returning its MRPT observation representation.
00041                   *
00042                   * The first word in each line determines the type of that entry. Supported
00043                   *  line entries in this class are the following:
00044                   *             - "ROBOTLASER(.*)": A joint odometry-laser entry. This function will return both an mrpt::slam::CObservationOdometry and an mrpt::slam::CObservation2DRangeScan
00045                   *             - "FLASER": (Idem)
00046                   *             - "RLASER": (Idem)
00047                   *             - "PARAM": This case is special (read below).
00048                   *
00049                   *  Note that the sensor position on the robot will be always deduced from the corresponding CARMEN log line automatically.
00050                   *
00051                   *  The following entry types will be IGNORED, since with the tags above will be enough in most applications.
00052                   *             - "ODOM"
00053                   *             - "RAWLASER"
00054                   *
00055                   * About the PARAM entries: This functions has an internal static status consisting on some PARAM values
00056                   *  which have effects on the future read observations. When the function finds one of these, it stores the
00057                   *  parameter value, return an empty vector of observations, and use those values for future laser entries of types FLASER or RLASER.
00058                   * Currently, only these parameters are processed:
00059                   *             - "robot_front_laser_max"
00060                   *             - "laser_front_laser_resolution"
00061                   *             - "robot_rear_laser_max"
00062                   *             - "laser_rear_laser_resolution"
00063                   *
00064                   *  \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).
00065                   *
00066                   * References: http://carmen.sourceforge.net/doc/binary__loggerplayback.html
00067                   *
00068                   * \return true on success, false on end-of-file (EOF).
00069                   * \exception std::runtime_error On any invalid line found.
00070                   */
00071                   bool OBS_IMPEXP carmen_log_parse_line(
00072                         std::istream &in_stream,
00073                         std::vector<mrpt::slam::CObservationPtr> &out_imported_observations,
00074                         const mrpt::system::TTimeStamp &time_start_log );
00075 
00076 
00077         } // end NS
00078 } // end NS
00079 #endif



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011