Feature.h
Go to the documentation of this file.
00001 /*
00002  * Feature.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 FEATURE_H_
00033 #define FEATURE_H_
00034 
00035 #include <utility>
00036 #include <vector>
00037 #include <boost/shared_ptr.hpp>
00038 #include <boost/tuple/tuple.hpp>
00039 
00040 namespace omip
00041 {
00048 class Feature
00049 {
00050 public:
00051 
00052   // Shared pointer to Feature
00053   typedef boost::shared_ptr<Feature> Ptr;
00054 
00055   // Feature Id
00056   typedef long Id;
00057 
00058   // Location of a Feature in 3D
00059   typedef boost::tuple<double, double, double> Location;
00060 
00061   // Trajectory of a Feature in 3D
00062   typedef std::vector<Location> Trajectory;
00063 
00064   // Pair of Feature Locations
00065   typedef std::pair<Location, Location> LocationPair;
00066 
00070   Feature();
00071 
00077   Feature(int feature_birthday, Location first_fl_in);
00078 
00086   Feature(int feature_birthday, Location first_fl_in, Id f_id);
00087 
00092   Feature(const Feature &f);
00093 
00097   virtual ~Feature();
00098 
00103   Ptr clone() const;
00104 
00109   void addLocation(Location fl_in);
00110 
00115   Id getId() const;
00116 
00121   Location getFirstLocation() const;
00122 
00127   Location getLastLocation() const;
00128 
00133   Location getNextToLastLocation() const;
00134 
00139   LocationPair getTwoLastLocations() const;
00140 
00146   Location getNToLastLocation(int frames_to_last) const;
00147 
00152   const Trajectory& getTrajectory() const;
00153 
00158   size_t getFeatureAge() const;
00159 
00164   int getFeatureBirthday() const;
00165 
00170   double getLastX() const;
00171 
00176   double getLastY() const;
00177 
00182   double getLastZ() const;
00183 
00188   void setFeatureBirthday(int feature_birthday);
00189 
00190 protected:
00191 
00192   // Unique counter to generate Feature ids
00193   static Id _feature_id_generator;
00194 
00195   // Unique identifier for every Feature
00196   Id _id;
00197 
00198   // Trajectory (sequence of Locations) of this Feature
00199   Trajectory _trajectory;
00200 
00201   // First location of this Feature
00202   Location _first_location;
00203 
00204   // Birthday (frame number) when this Feature was initially detected
00205   int _birthday;
00206 
00207   // Cloning function that uses the copy constructor
00208   virtual Feature* doClone() const
00209   {
00210     return (new Feature(*this));
00211   }
00212 
00213 };
00214 
00215 }
00216 ;
00217 
00218 #endif /* FEATURE_H_ */


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