00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CObservationIMU_H
00029 #define CObservationIMU_H
00030
00031 #include <mrpt/utils/CSerializable.h>
00032 #include <mrpt/math/CMatrixD.h>
00033 #include <mrpt/slam/CObservation.h>
00034 #include <mrpt/poses/CPose3D.h>
00035 #include <mrpt/poses/CPose2D.h>
00036
00037 namespace mrpt
00038 {
00039 namespace slam
00040 {
00041
00042 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CObservationIMU , CObservation )
00043
00044
00046 enum TIMUDataIndex
00047 {
00048 IMU_X_ACC = 0,
00049 IMU_Y_ACC,
00050 IMU_Z_ACC,
00051 IMU_YAW_VEL,
00052 IMU_PITCH_VEL,
00053 IMU_ROLL_VEL,
00054 IMU_X_VEL,
00055 IMU_Y_VEL,
00056 IMU_Z_VEL,
00057 IMU_YAW,
00058 IMU_PITCH,
00059 IMU_ROLL,
00060 IMU_X,
00061 IMU_Y,
00062 IMU_Z
00063 };
00064
00090 class MRPTDLLIMPEXP CObservationIMU : public CObservation
00091 {
00092
00093 DEFINE_SERIALIZABLE( CObservationIMU )
00094
00095 public:
00098 CObservationIMU( ) :
00099 sensorPose(),
00100 dataIsPresent(15,false),
00101 rawMeasurements(15,0)
00102 { }
00103
00106 virtual ~CObservationIMU()
00107 { }
00108
00111 CPose3D sensorPose;
00112
00116 vector_bool dataIsPresent;
00117
00124 std::vector<double> rawMeasurements;
00125
00126
00137 float likelihoodWith( const CObservation *anotherObs, const CPosePDF *anotherObsPose = NULL ) const;
00138
00143 void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose = sensorPose; }
00144
00145
00150 void setSensorPose( const CPose3D &newSensorPose ) { sensorPose = newSensorPose; }
00151
00152
00153 };
00154
00155
00156 }
00157 }
00158
00159 #endif