00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://www.mrpt.org/ | 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 #ifndef CObservationBeaconRanges_H 00029 #define CObservationBeaconRanges_H 00030 00031 #include <mrpt/utils/CSerializable.h> 00032 #include <mrpt/slam/CObservation.h> 00033 #include <mrpt/poses/CPoint3D.h> 00034 #include <mrpt/poses/CPose2D.h> 00035 #include <mrpt/poses/CPose3D.h> 00036 00037 namespace mrpt 00038 { 00039 namespace slam 00040 { 00041 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationBeaconRanges, CObservation, OBS_IMPEXP ) 00042 00043 /** Declares a class derived from "CObservation" that represents one (or more) range measurements to labeled beacons. 00044 * \sa CObservation 00045 * \ingroup mrpt_obs_grp 00046 */ 00047 class OBS_IMPEXP CObservationBeaconRanges : public CObservation 00048 { 00049 // This must be added to any CSerializable derived class: 00050 DEFINE_SERIALIZABLE( CObservationBeaconRanges ) 00051 00052 public: 00053 /** Default constructor. 00054 */ 00055 CObservationBeaconRanges( ); 00056 00057 /** Information about the sensor: 00058 */ 00059 float minSensorDistance, maxSensorDistance; 00060 00061 /** The "sigma" of the sensor, assuming a zero-mean Gaussian noise model. 00062 */ 00063 float stdError; 00064 00065 /** Each one of the measurements: 00066 */ 00067 struct OBS_IMPEXP TMeasurement 00068 { 00069 TMeasurement() : sensorLocationOnRobot(), sensedDistance(0),beaconID(INVALID_BEACON_ID) 00070 {} 00071 00072 /** The position of the sensor on the robot. 00073 */ 00074 CPoint3D sensorLocationOnRobot; 00075 00076 /** The sensed range itself (in meters). 00077 */ 00078 float sensedDistance; 00079 00080 /** The ID of the sensed beacon (or INVALID_BEACON_ID) 00081 */ 00082 int32_t beaconID; 00083 }; 00084 00085 /** The list of observed ranges: 00086 */ 00087 std::deque<TMeasurement> sensedData; 00088 00089 /** The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming version 1) 00090 */ 00091 CPose2D auxEstimatePose; 00092 00093 00094 /** Prints out the contents of the object. 00095 */ 00096 void debugPrintOut(); 00097 00098 /** A general method to retrieve the sensor pose on the robot. 00099 * Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases. 00100 * \sa setSensorPose 00101 */ 00102 void getSensorPose( CPose3D &out_sensorPose ) const; 00103 00104 00105 /** A general method to change the sensor pose on the robot. 00106 * Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases. 00107 * \sa getSensorPose 00108 */ 00109 void setSensorPose( const CPose3D &newSensorPose ); 00110 00111 /** Easy look-up into the vector sensedData, returns the range for a given beacon, or 0 if the beacon is not observed. 00112 */ 00113 float getSensedRangeByBeaconID(int32_t beaconID); 00114 00115 }; // End of class def. 00116 00117 00118 } // End of namespace 00119 } // End of namespace 00120 00121 #endif
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |