00001
00002
00003 #ifndef SLAM_POINT_INF_FEATURE_HPP
00004 #define SLAM_POINT_INF_FEATURE_HPP
00005
00006 #include "jmath/jblas.hpp"
00007
00008 #include "camera/cameraBarreto.hpp"
00009
00010 #include "slam/feature.hpp"
00011 #include "slam/featureModel.hpp"
00012 #include "slam/bearingOnlyFeature.hpp"
00013
00014 namespace jafar {
00015 namespace slam {
00016
00021 class PointInfFeatureModel : public FeatureModel {
00022
00023 public:
00024
00025 PointInfFeatureModel();
00026 ~PointInfFeatureModel();
00027
00028 void toFrame(jblas::vec const& frame_, jblas::vec const& x_, jblas::vec& xRes);
00029
00030 void toFrameJac(const jblas::vec& frame_, const jblas::vec& x_);
00031
00032 void fromFrame(jblas::vec const& frame_, jblas::vec const& x_, jblas::vec& xRes);
00033 void fromFrame(jblas::vec const& frame_, jblas::vec const& x_, jblas::vec_range& xRes);
00034
00035 void fromFrameJac(const jblas::vec& frame_, const jblas::vec& x_);
00036 void computeMergeState( const jblas::vec& x_, jblas::vec& mergeX_, jblas::mat& jac );
00037
00038 };
00039
00044 class BearingPointInfFeatureObserveModel : public InfFeatureObserveModel {
00045
00046 protected:
00047
00048 jblas::vec const& predictObservationInSensorFrame(const jblas::vec& feature_);
00049
00050 void predictObservationInSensorFrameJac(const jblas::vec& feature_);
00051
00052
00053
00054
00055
00056 jblas::vec inverseObservationInSensorFrame(Observation const& obs_);
00057
00058 void inverseObservationInSensorFrameJac(Observation const& obs_);
00059
00060 double computeBaselineInSensorFrame(jblas::vec_range const& deltaPose, Observation const& obsRef) const;
00061
00062 public:
00063
00064 BearingPointInfFeatureObserveModel(PointInfFeatureModel& featureModel_);
00065 ~BearingPointInfFeatureObserveModel();
00066
00067 Observation::ObservationType typeObs() const {return Observation::POINT_BEARING;}
00068
00069 jblas::vec const& computeInnovation(jblas::vec const& z_,
00070 jblas::vec const& zPred_);
00071
00072 };
00073
00078 class OmniImagePointInfFeatureObserveModel : public InfFeatureObserveModel {
00079
00080 protected:
00081
00082 jafar::camera::CameraParabolicBarreto camera;
00083
00084 jblas::vec const& predictObservationInSensorFrame(const jblas::vec& feature_);
00085
00086 void predictObservationInSensorFrameJac(const jblas::vec& feature_);
00087
00088
00089
00090
00091
00092 jblas::vec inverseObservationInSensorFrame(Observation const& obs_);
00093
00094 void inverseObservationInSensorFrameJac(Observation const& obs_);
00095
00096 double computeBaselineInSensorFrame(jblas::vec_range const& deltaPose, Observation const& obsRef) const;
00097
00098 public:
00099
00100 OmniImagePointInfFeatureObserveModel(PointInfFeatureModel& featureModel_,
00101 jafar::camera::CameraParabolicBarreto const& camera_);
00102 ~OmniImagePointInfFeatureObserveModel();
00103
00104 Observation::ObservationType typeObs() const {return Observation::POINT_OMNIIMAGE;}
00105
00106 };
00107
00108 }
00109 }
00110
00111 #endif // SLAM_POINT_INF_FEATURE_HPP