FeaturesDataBase.h
Go to the documentation of this file.
00001 /*
00002  * FeatureDataBase.h
00003  *
00004  *      Author: roberto
00005  *
00006  * This is a modified implementation of the method for online estimation of kinematic structures described in our paper
00007  * "Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors"
00008  * (Martín-Martín and Brock, 2014).
00009  * This implementation can be used to reproduce the results of the paper and to be applied to new research.
00010  * The implementation allows also to be extended to perceive different information/models or to use additional sources of information.
00011  * A detail explanation of the method and the system can be found in our paper.
00012  *
00013  * If you are using this implementation in your research, please consider citing our work:
00014  *
00015 @inproceedings{martinmartin_ip_iros_2014,
00016 Title = {Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors},
00017 Author = {Roberto {Mart\'in-Mart\'in} and Oliver Brock},
00018 Booktitle = {Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems},
00019 Pages = {2494-2501},
00020 Year = {2014},
00021 Location = {Chicago, Illinois, USA},
00022 Note = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
00023 Url = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
00024 Projectname = {Interactive Perception}
00025 }
00026  * If you have questions or suggestions, contact us:
00027  * roberto.martinmartin@tu-berlin.de
00028  *
00029  * Enjoy!
00030  */
00031 
00032 #ifndef NEWFEATUREDB_H_
00033 #define NEWFEATUREDB_H_
00034 
00035 #include "omip_common/Feature.h"
00036 #include <boost/unordered_map.hpp>
00037 
00038 namespace omip
00039 {
00040 
00041 class FeaturesDataBase
00042 {
00043 public:
00044 
00045   // Shared pointer to the Feature DataBase
00046   typedef boost::shared_ptr<FeaturesDataBase> Ptr;
00047 
00048   // Map of Feature Ids to Feature shared pointers
00049   typedef boost::unordered_map<Feature::Id, Feature::Ptr> MapOfFeatures;
00050 
00051   // Map of Feature Ids to Feature locations
00052   typedef boost::unordered_map<Feature::Id, Feature::Location> MapOfFeatureLocations;
00053 
00054   // Map of Feature Ids to pairs of Feature locations
00055   typedef boost::unordered_map<Feature::Id, Feature::LocationPair > MapOfFeatureLocationPairs;
00056 
00060   FeaturesDataBase();
00061 
00065   virtual ~FeaturesDataBase();
00066 
00074   bool addFeatureLocation(Feature::Id f_id, Feature::Location f_loc);
00075 
00082   Feature::Id addFeatureLocation(Feature::Location f_loc);
00083 
00090   void step();
00091 
00099   void clearListOfAliveFeatureIds();
00100 
00105   std::vector<Feature::Id> getListOfAliveFeatureIds() const;
00106 
00112   Feature::Ptr getFeatureClone(Feature::Id f_id) const;
00113 
00119   Feature::Ptr getFeature(Feature::Id f_id) const;
00120 
00126   Feature::Location getFeatureFirstLocation(Feature::Id f_id) const;
00127 
00133   Feature::Location getFeatureLastLocation(Feature::Id f_id) const;
00134 
00140   Feature::Location getFeatureNextToLastLocation(Feature::Id f_id) const;
00141 
00147   Feature::LocationPair getFeatureTwoLastLocations(Feature::Id f_id) const;
00148 
00155   Feature::Location getFeatureNToLastLocation(Feature::Id f_id, int frames_to_last) const;
00156 
00162   Feature::Trajectory getFeatureTrajectory(Feature::Id f_id) const;
00163 
00169   size_t getFeatureAge(Feature::Id f_id) const;
00170 
00176   bool isFeatureStored(Feature::Id f_id) const;
00177 
00183   double getFeatureLastX(Feature::Id f_id) const;
00184 
00190   double getFeatureLastY(Feature::Id f_id) const;
00191 
00197   double getFeatureLastZ(Feature::Id f_id) const;
00198 
00203   MapOfFeatureLocations getAllFeaturesLastLocation() const;
00204 
00209   MapOfFeatureLocations getAllFeaturesNextToLastLocation() const;
00210 
00215   MapOfFeatureLocationPairs getAllFeaturesTwoLastLocations() const;
00216 
00217 //  Feature::LocationPair getOneFeatureLastAndOtherLocations(Feature::Id f_id, int frames_to_last) const;
00218 
00223   MapOfFeatures getAllFeatures() const;
00224 
00229   int getTime() const;
00230 
00231 protected:
00232 
00233   MapOfFeatures _map_of_features;
00234 
00235   std::vector<Feature::Id> _alive_feat_ids;
00236 
00237   int _time;
00238 };
00239 
00240 }
00241 
00242 #endif /* NEWFEATUREDB_H_ */


omip_common
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:26:37