FeaturesDataBase.h
Go to the documentation of this file.
1 /*
2  * FeatureDataBase.h
3  *
4  * Author: roberto
5  *
6  * This is a modified implementation of the method for online estimation of kinematic structures described in our paper
7  * "Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors"
8  * (Martín-Martín and Brock, 2014).
9  * This implementation can be used to reproduce the results of the paper and to be applied to new research.
10  * The implementation allows also to be extended to perceive different information/models or to use additional sources of information.
11  * A detail explanation of the method and the system can be found in our paper.
12  *
13  * If you are using this implementation in your research, please consider citing our work:
14  *
15 @inproceedings{martinmartin_ip_iros_2014,
16 Title = {Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors},
17 Author = {Roberto {Mart\'in-Mart\'in} and Oliver Brock},
18 Booktitle = {Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems},
19 Pages = {2494-2501},
20 Year = {2014},
21 Location = {Chicago, Illinois, USA},
22 Note = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
23 Url = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
24 Projectname = {Interactive Perception}
25 }
26  * If you have questions or suggestions, contact us:
27  * roberto.martinmartin@tu-berlin.de
28  *
29  * Enjoy!
30  */
31 
32 #ifndef NEWFEATUREDB_H_
33 #define NEWFEATUREDB_H_
34 
35 #include "omip_common/Feature.h"
36 #include <boost/unordered_map.hpp>
37 
38 namespace omip
39 {
40 
42 {
43 public:
44 
45  // Shared pointer to the Feature DataBase
47 
48  // Map of Feature Ids to Feature shared pointers
49  typedef boost::unordered_map<Feature::Id, Feature::Ptr> MapOfFeatures;
50 
51  // Map of Feature Ids to Feature locations
52  typedef boost::unordered_map<Feature::Id, Feature::Location> MapOfFeatureLocations;
53 
54  // Map of Feature Ids to pairs of Feature locations
55  typedef boost::unordered_map<Feature::Id, Feature::LocationPair > MapOfFeatureLocationPairs;
56 
61 
65  virtual ~FeaturesDataBase();
66 
75 
83 
90  void step();
91 
100 
105  std::vector<Feature::Id> getListOfAliveFeatureIds() const;
106 
113 
119  Feature::Ptr getFeature(Feature::Id f_id) const;
120 
127 
134 
141 
148 
155  Feature::Location getFeatureNToLastLocation(Feature::Id f_id, int frames_to_last) const;
156 
163 
169  size_t getFeatureAge(Feature::Id f_id) const;
170 
176  bool isFeatureStored(Feature::Id f_id) const;
177 
183  double getFeatureLastX(Feature::Id f_id) const;
184 
190  double getFeatureLastY(Feature::Id f_id) const;
191 
197  double getFeatureLastZ(Feature::Id f_id) const;
198 
203  MapOfFeatureLocations getAllFeaturesLastLocation() const;
204 
209  MapOfFeatureLocations getAllFeaturesNextToLastLocation() const;
210 
215  MapOfFeatureLocationPairs getAllFeaturesTwoLastLocations() const;
216 
217 // Feature::LocationPair getOneFeatureLastAndOtherLocations(Feature::Id f_id, int frames_to_last) const;
218 
223  MapOfFeatures getAllFeatures() const;
224 
229  int getTime() const;
230 
231 protected:
232 
233  MapOfFeatures _map_of_features;
234 
235  std::vector<Feature::Id> _alive_feat_ids;
236 
237  int _time;
238 };
239 
240 }
241 
242 #endif /* NEWFEATUREDB_H_ */
bool isFeatureStored(Feature::Id f_id) const
boost::tuple< double, double, double > Location
Definition: Feature.h:59
MapOfFeatureLocations getAllFeaturesNextToLastLocation() const
bool addFeatureLocation(Feature::Id f_id, Feature::Location f_loc)
Feature::Location getFeatureNextToLastLocation(Feature::Id f_id) const
double getFeatureLastX(Feature::Id f_id) const
MapOfFeatures getAllFeatures() const
size_t getFeatureAge(Feature::Id f_id) const
Feature::LocationPair getFeatureTwoLastLocations(Feature::Id f_id) const
Feature::Location getFeatureFirstLocation(Feature::Id f_id) const
std::pair< Location, Location > LocationPair
Definition: Feature.h:65
Feature::Location getFeatureNToLastLocation(Feature::Id f_id, int frames_to_last) const
boost::shared_ptr< FeaturesDataBase > Ptr
std::vector< Feature::Id > _alive_feat_ids
double getFeatureLastY(Feature::Id f_id) const
MapOfFeatureLocations getAllFeaturesLastLocation() const
Feature::Trajectory getFeatureTrajectory(Feature::Id f_id) const
boost::unordered_map< Feature::Id, Feature::LocationPair > MapOfFeatureLocationPairs
std::vector< Location > Trajectory
Definition: Feature.h:62
std::vector< Feature::Id > getListOfAliveFeatureIds() const
double getFeatureLastZ(Feature::Id f_id) const
MapOfFeatures _map_of_features
boost::unordered_map< Feature::Id, Feature::Location > MapOfFeatureLocations
Definition: Feature.h:40
MapOfFeatureLocationPairs getAllFeaturesTwoLastLocations() const
Feature::Ptr getFeature(Feature::Id f_id) const
boost::unordered_map< Feature::Id, Feature::Ptr > MapOfFeatures
Feature::Ptr getFeatureClone(Feature::Id f_id) const
Feature::Location getFeatureLastLocation(Feature::Id f_id) const


omip_common
Author(s): Roberto Martín-Martín
autogenerated on Mon Jun 10 2019 14:06:05