Go to the documentation of this file.00001
00009 #ifndef LANDMARKEUCLIDEANPOINT_HPP_
00010 #define LANDMARKEUCLIDEANPOINT_HPP_
00011
00012 #include "boost/shared_ptr.hpp"
00013 #include "rtslam/landmarkAbstract.hpp"
00014 #include "rtslam/quatTools.hpp"
00015
00016
00021 namespace jafar {
00022 namespace rtslam {
00023
00024 class LandmarkEuclideanPoint;
00025 typedef boost::shared_ptr<LandmarkEuclideanPoint> eucp_ptr_t;
00026
00027
00028
00033 class LandmarkEuclideanPoint: public LandmarkAbstract {
00034 public:
00035
00036
00040 LandmarkEuclideanPoint(const map_ptr_t & mapPtr);
00041
00045 LandmarkEuclideanPoint(const simulation_t dummy, const map_ptr_t & mapPtr);
00049 LandmarkEuclideanPoint(const map_ptr_t & _mapPtr, const landmark_ptr_t _prevLmk,jblas::ind_array & _icomp);
00050
00051 virtual ~LandmarkEuclideanPoint() {
00052
00053 }
00054
00055 virtual std::string typeName() const {
00056 return "Euclidean-point";
00057 }
00058
00059
00060 static size_t size(void) {
00061 return 3;
00062 }
00063
00064 virtual jblas::ind_array nobs() { return ublasExtra::ia_set(0,0); }
00065
00066 virtual size_t mySize() {return size();}
00067
00068 virtual size_t reparamSize() {return size();}
00069
00070 virtual jblas::vec3 center() { return ublas::subrange(state.x(), 0, 3); }
00071
00072 virtual double uncertainty()
00073 {
00074
00075 double max_uncert = 0.;
00076 for(int i = 0; i < 3; ++i)
00077 {
00078 double uncert = state.P()(i,i);
00079 if (uncert > max_uncert) max_uncert = uncert;
00080 }
00081 return 3 * sqrt(max_uncert);
00082 }
00083
00084 virtual vec reparametrize_func(const vec & lmk) const {
00085 return lmk;
00086 }
00087
00088 void reparametrize_func(const vec & lmk, vec & lnew, mat & LNEW_lmk) const {
00089 lnew = lmk;
00090 LNEW_lmk = identity_mat(size());
00091 }
00092
00093 virtual bool needToReparametrize(){
00094 return false;
00095 }
00096
00097 static unsigned ncreated;
00098
00099 };
00100 }
00101 }
00102
00103
00104 #endif