Jafar
|
00001 /* $Id$ */ 00002 00003 #ifndef SLAM_FEATURE_HPP 00004 #define SLAM_FEATURE_HPP 00005 00006 #include <ostream> 00007 00008 #include "kernel/dataLog.hpp" 00009 00010 #include "jmath/jblas.hpp" 00011 #include "jmath/gaussianVector.hpp" 00012 00013 #include "filter/constraintModel.hpp" 00014 00015 #include "slam/observation.hpp" 00016 #include "slam/abstractMapObject.hpp" 00017 00018 namespace jafar { 00019 namespace filter { 00020 class JacobianBlockPredictModel; 00021 } 00022 namespace slam { 00023 00024 // forward declaration 00025 class FeatureModel; 00026 00031 class BaseFeature : public AbstractMapObject, 00032 public jafar::kernel::DataLoggable { 00033 00034 public: 00035 00036 Observation::ObservationType typeObs; 00037 bool atInfinity; 00038 00042 typedef std::list<unsigned int> FrameIndexesType; 00043 FrameIndexesType frameIndexes; 00044 00045 FeatureModel& model; 00046 00047 typedef std::list<jafar::filter::JacobianStrongConstraintModel*> ConstraintsListType; 00049 ConstraintsListType constraints; 00050 00054 jafar::jmath::GaussianVector zPred; 00055 00056 // FIXME sizeObs should not be necessary ! 00057 BaseFeature(unsigned int id, 00058 FeatureModel& model, std::size_t sizeObs, Observation::ObservationType typeObs_); 00059 virtual ~BaseFeature(); 00060 00061 std::size_t sizeState() const; 00062 00063 void addObservation(unsigned int frameIndex_); 00064 00068 jafar::filter::JacobianBlockPredictModel *featureConstraintModel; 00069 00070 // virtual void applyConstraints() {}; 00071 00072 protected: 00073 00074 virtual void writeLogHeader(jafar::kernel::DataLogger& log) const; 00075 virtual void addMembersToLog(jafar::kernel::DataLogger& log) const; 00076 virtual void writeLogData(jafar::kernel::DataLogger& log) const; 00077 00078 friend std::ostream& operator <<(std::ostream& s, const BaseFeature& f_); 00079 00080 private: 00081 00082 jblas::vec_range* m_x; 00083 jblas::sym_mat_range* m_P; 00084 00085 }; // class BaseFeature 00086 00087 std::ostream& operator <<(std::ostream& s, const BaseFeature& f_); 00088 00089 00090 } // namespace slam 00091 } // namespace jafar 00092 00093 00094 #endif // SLAM_FEATURE_HPP
Generated on Wed Oct 15 2014 00:37:21 for Jafar by doxygen 1.7.6.1 |