DefaultScoreContainer.hpp
Go to the documentation of this file.
1 
20 #ifndef DEFAULTSCORECONTAINER_HPP_
21 #define DEFAULTSCORECONTAINER_HPP_
22 
23 #include <map>
24 #include <boost/make_shared.hpp>
26 
27 namespace next_best_view {
36  private:
37 
38  // The costs if the robot must drive around
40  // The costs to rotate the robot (change it orientation)
42  // Cost for move the PTU.
44  // The Cost for calculate a new recognition
46  // this is the UNnormalized utility, while the BaseScoreContainer contains the normalized utility
47  float mUtility;
48  // the utility for each object type
49  std::map<std::string, float> mObjectUtilities;
51 
52  public:
53 
58 
62  virtual ~DefaultScoreContainer();
63 
69  mMovementCostsBaseTranslation = value;
70  }
71 
78  }
79 
85  mMovementCostsBaseRotation = value;
86  }
87 
94  }
95 
101  mMovementCostsPTU = value;
102  }
103 
109  return mMovementCostsPTU;
110  }
111 
117  mRecognitionCosts = value;
118  }
119 
125  return mRecognitionCosts;
126  }
127 
133  mUtility = value;
134  }
135 
141  return mUtility;
142  }
143 
149  void setUnweightedUnnormalizedObjectUtilitiy(std::string objectType, float value) {
150  mObjectUtilities[objectType] = value;
151  }
152 
158  float getUnweightedUnnormalizedObjectUtility(std::string objectType) const {
159  if (mObjectUtilities.count(objectType) == 0) {
160  return 0;
161  }
162  return mObjectUtilities.at(objectType);
163  }
164 
169  void setUtilityNormalization(float value) {
170  mUtilityNormalization = value;
171  }
172 
177  float getUtilityNormalization() const {
178  return mUtilityNormalization;
179  }
180 
186  auto objectTypes = boost::make_shared<std::vector<boost::shared_ptr<std::string>>>();
187  if (mObjectUtilities.size() == 0)
188  return objectTypes;
189  for (auto object : mObjectUtilities) {
190  auto objectType = boost::shared_ptr<std::string>(new std::string(object.first));
191  objectTypes->push_back(objectType);
192  }
193  return objectTypes;
194  }
195  };
196 
201 
202  std::ostream& operator<<(std::ostream &strm, const next_best_view::DefaultScoreContainer &score);
203  std::ostream& operator<<(std::ostream &strm, const next_best_view::DefaultScoreContainerPtr &score);
204 }
205 
206 
207 #endif /* DEFAULTSCORECONTAINER_HPP_ */
void setUnweightedInverseMovementCostsBaseTranslation(float value)
sets the inverse movement costs for the base translation
DefaultScoreContainer()
constructor of the DefaultRating object.
void setUnweightedInverseMovementCostsBaseRotation(float value)
sets the inverse movement costs for the base rotation
float getUnweightedUnnormalizedUtility() const
returns the weighted unnormalized utility
void setUnweightedInverseMovementCostsPTU(float value)
sets the inverse costs for the PTU movement
float getUnweightedInverseMovementCostsPTU() const
returns the inverse costs for the PTU movement
float getUtilityNormalization() const
returns the utility normalization
void setUtilityNormalization(float value)
sets the utility normalization
BaseScore implements no such functionalities, but the corresponding RatingModule has to implement a B...
boost::shared_ptr< DefaultScoreContainer > DefaultScoreContainerPtr
Definition for the shared pointer type of the class.
void setUnweightedUnnormalizedObjectUtilitiy(std::string objectType, float value)
sets the utilitiy for an object type
this namespace contains all generally usable classes.
virtual ~DefaultScoreContainer()
destructor of the DefaultRating object.
float getUnweightedInverseMovementCostsBaseRotation() const
returns the inverse movement costs for the base rotation
DefaultScoreContainer implements the BaseScoreContainer base class.
void setUnweightedUnnormalizedUtility(float value)
sets the weighted unnormalized utility
std::map< std::string, float > mObjectUtilities
float getUnweightedInverseMovementCostsBaseTranslation() const
returns the inverse movement costs for the base translation
float getUnweightedInverseRecognitionCosts() const
returns the inverse costs for the recognition of the objects
void setUnweightedInverseRecognitionCosts(float value)
sets the inverse costs for the recognition of the objects
boost::shared_ptr< std::vector< boost::shared_ptr< std::string > > > getObjectTypes() const
getObjectTypes
std::ostream & operator<<(std::ostream &strm, const next_best_view::DefaultViewportPoint &p)
float getUnweightedUnnormalizedObjectUtility(std::string objectType) const
returns the utility for a given object type


asr_next_best_view
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Thu Jan 9 2020 07:20:18