Feature.h
Go to the documentation of this file.
1 /*
2  * Feature.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 FEATURE_H_
33 #define FEATURE_H_
34 
35 #include <utility>
36 #include <vector>
37 #include <boost/shared_ptr.hpp>
38 #include <boost/tuple/tuple.hpp>
39 
40 namespace omip
41 {
48 class Feature
49 {
50 public:
51 
52  // Shared pointer to Feature
54 
55  // Feature Id
56  typedef long Id;
57 
58  // Location of a Feature in 3D
59  typedef boost::tuple<double, double, double> Location;
60 
61  // Trajectory of a Feature in 3D
62  typedef std::vector<Location> Trajectory;
63 
64  // Pair of Feature Locations
65  typedef std::pair<Location, Location> LocationPair;
66 
70  Feature();
71 
77  Feature(int feature_birthday, Location first_fl_in);
78 
86  Feature(int feature_birthday, Location first_fl_in, Id f_id);
87 
92  Feature(const Feature &f);
93 
97  virtual ~Feature();
98 
103  Ptr clone() const;
104 
109  void addLocation(Location fl_in);
110 
115  Id getId() const;
116 
121  Location getFirstLocation() const;
122 
127  Location getLastLocation() const;
128 
133  Location getNextToLastLocation() const;
134 
139  LocationPair getTwoLastLocations() const;
140 
146  Location getNToLastLocation(int frames_to_last) const;
147 
152  const Trajectory& getTrajectory() const;
153 
158  size_t getFeatureAge() const;
159 
164  int getFeatureBirthday() const;
165 
170  double getLastX() const;
171 
176  double getLastY() const;
177 
182  double getLastZ() const;
183 
188  void setFeatureBirthday(int feature_birthday);
189 
190 protected:
191 
192  // Unique counter to generate Feature ids
194 
195  // Unique identifier for every Feature
196  Id _id;
197 
198  // Trajectory (sequence of Locations) of this Feature
199  Trajectory _trajectory;
200 
201  // First location of this Feature
202  Location _first_location;
203 
204  // Birthday (frame number) when this Feature was initially detected
206 
207  // Cloning function that uses the copy constructor
208  virtual Feature* doClone() const
209  {
210  return (new Feature(*this));
211  }
212 
213 };
214 
215 }
216 ;
217 
218 #endif /* FEATURE_H_ */
Location getFirstLocation() const
Definition: Feature.cpp:61
virtual Feature * doClone() const
Definition: Feature.h:208
boost::shared_ptr< Feature > Ptr
Definition: Feature.h:53
boost::tuple< double, double, double > Location
Definition: Feature.h:59
double getLastX() const
Definition: Feature.cpp:136
Location getNToLastLocation(int frames_to_last) const
Definition: Feature.cpp:101
void addLocation(Location fl_in)
Definition: Feature.cpp:47
static Id _feature_id_generator
Definition: Feature.h:193
Minimal class that represents a Point of Interest by an ID and stores its successive locations $Autho...
Definition: Feature.h:48
double getLastY() const
Definition: Feature.cpp:141
Location _first_location
Definition: Feature.h:202
std::pair< Location, Location > LocationPair
Definition: Feature.h:65
int _birthday
Definition: Feature.h:205
const Trajectory & getTrajectory() const
Definition: Feature.cpp:116
Ptr clone() const
Definition: Feature.cpp:42
Location getLastLocation() const
Definition: Feature.cpp:66
size_t getFeatureAge() const
Definition: Feature.cpp:126
Id getId() const
Definition: Feature.cpp:56
std::vector< Location > Trajectory
Definition: Feature.h:62
void setFeatureBirthday(int feature_birthday)
Definition: Feature.cpp:151
Location getNextToLastLocation() const
Definition: Feature.cpp:81
double getLastZ() const
Definition: Feature.cpp:146
Trajectory _trajectory
Definition: Feature.h:199
Definition: Feature.h:40
int getFeatureBirthday() const
Definition: Feature.cpp:131
virtual ~Feature()
Definition: Feature.cpp:37
LocationPair getTwoLastLocations() const
Definition: Feature.cpp:96


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