3 #include <boost/foreach.hpp> 36 feat_it->second->addLocation(f_loc);
47 return new_feature->getId();
83 "FeaturesDataBase.getFeatureClone",
84 "Feature with Id " << f_id <<
" is not stored in the database.");
97 ROS_ERROR_STREAM_NAMED(
"FeaturesDataBase.getFeature",
"Feature with Id " << f_id <<
" is not stored in the database.");
112 "FeaturesDataBase.getFeatureFirstLocation",
113 "Feature with Id " << f_id <<
" is not stored in the database.");
128 "FeaturesDataBase.getFeatureLastLocation",
129 "Feature with Id " << f_id <<
" is not stored in the database.");
144 "FeaturesDataBase.getFeatureNextToLastLocation",
145 "Feature with Id " << f_id <<
" is not stored in the database.");
160 "FeaturesDataBase.getFeatureTwoLastLocations",
161 "Feature with Id " << f_id <<
" is not stored in the database.");
176 "FeaturesDataBase.getFeatureNToLastLocation",
177 "Feature with Id " << f_id <<
" is not stored in the database.");
192 "FeaturesDataBase.getFeatureTrajectory",
193 "Feature with Id " << f_id <<
" is not stored in the database.");
207 "FeaturesDataBase.getFeatureAge",
208 "Feature with Id " << f_id <<
" is not stored in the database.");
234 "FeaturesDataBase.getFeatureX",
235 "Feature with Id " << f_id <<
" is not stored in the database.");
249 "FeaturesDataBase.getFeatureLastY",
250 "Feature with Id " << f_id <<
" is not stored in the database.");
264 "FeaturesDataBase.getFeatureLastZ",
265 "Feature with Id " << f_id <<
" is not stored in the database.");
277 BOOST_FOREACH(MapOfFeatures::value_type feat_id_feat, this->
_map_of_features)
279 ultimate_locations[feat_id_feat.first] = feat_id_feat.second
282 return ultimate_locations;
288 BOOST_FOREACH(MapOfFeatures::value_type feat_id_feat, this->
_map_of_features)
290 penultimate_locations[feat_id_feat.first] = feat_id_feat.second
291 ->getNextToLastLocation();
293 return penultimate_locations;
299 BOOST_FOREACH(MapOfFeatures::value_type feat_id_feat, this->
_map_of_features)
301 two_last_locations[feat_id_feat.first] = feat_id_feat.second
302 ->getTwoLastLocations();
304 return two_last_locations;
bool isFeatureStored(Feature::Id f_id) const
boost::shared_ptr< Feature > Ptr
boost::tuple< double, double, double > Location
#define ROS_ERROR_STREAM_NAMED(name, args)
MapOfFeatureLocations getAllFeaturesNextToLastLocation() const
bool addFeatureLocation(Feature::Id f_id, Feature::Location f_loc)
Minimal class that represents a Point of Interest by an ID and stores its successive locations $Autho...
Feature::Location getFeatureNextToLastLocation(Feature::Id f_id) const
void clearListOfAliveFeatureIds()
virtual ~FeaturesDataBase()
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
Feature::Location getFeatureNToLastLocation(Feature::Id f_id, int frames_to_last) const
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
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
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