DefaultScoreContainer.hpp
Go to the documentation of this file.
1 
20 #ifndef DEFAULTSCORECONTAINER_HPP_
21 #define DEFAULTSCORECONTAINER_HPP_
22 
23 #include <map>
24 #include <vector>
25 #include <boost/make_shared.hpp>
27 
28 namespace next_best_view {
37  private:
38 
39  // The costs if the robot must drive around
41  // The costs to rotate the robot (change it orientation)
43  // Cost for move the PTU.
45  // The Cost for calculate a new recognition
47  // this is the UNnormalized utility, while the BaseScoreContainer contains the normalized utility
48  float mUtility;
49  // the utility for each object type
50  std::map<std::string, float> mObjectUtilities;
52 
53  public:
54 
59 
63  virtual ~DefaultScoreContainer();
64 
70  mMovementCostsBaseTranslation = value;
71  }
72 
79  }
80 
86  mMovementCostsBaseRotation = value;
87  }
88 
95  }
96 
102  mMovementCostsPTU = value;
103  }
104 
110  return mMovementCostsPTU;
111  }
112 
118  mRecognitionCosts = value;
119  }
120 
126  return mRecognitionCosts;
127  }
128 
134  mUtility = value;
135  }
136 
142  return mUtility;
143  }
144 
150  void setUnweightedUnnormalizedObjectUtilitiy(std::string objectType, float value) {
151  mObjectUtilities[objectType] = value;
152  }
153 
159  float getUnweightedUnnormalizedObjectUtility(std::string objectType) const {
160  if (mObjectUtilities.count(objectType) == 0) {
161  return 0;
162  }
163  return mObjectUtilities.at(objectType);
164  }
165 
170  void setUtilityNormalization(float value) {
171  mUtilityNormalization = value;
172  }
173 
178  float getUtilityNormalization() const {
179  return mUtilityNormalization;
180  }
181 
187  auto objectTypes = boost::make_shared<std::vector<boost::shared_ptr<std::string>>>();
188  if (mObjectUtilities.size() == 0)
189  return objectTypes;
190  for (auto object : mObjectUtilities) {
191  auto objectType = boost::shared_ptr<std::string>(new std::string(object.first));
192  objectTypes->push_back(objectType);
193  }
194  return objectTypes;
195  }
196  };
197 
202 
203  std::ostream& operator<<(std::ostream &strm, const next_best_view::DefaultScoreContainer &score);
204  std::ostream& operator<<(std::ostream &strm, const next_best_view::DefaultScoreContainerPtr &score);
205 }
206 
207 
208 #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
boost::shared_ptr< std::vector< boost::shared_ptr< std::string > > > getObjectTypes() const
getObjectTypes
void setUnweightedInverseMovementCostsPTU(float value)
sets the inverse costs for the PTU movement
void setUtilityNormalization(float value)
sets the utility normalization
BaseScore implements no such functionalities, but the corresponding RatingModule has to implement a B...
float getUnweightedUnnormalizedObjectUtility(std::string objectType) const
returns the utility for a given object type
float getUnweightedUnnormalizedUtility() const
returns the weighted unnormalized utility
float getUnweightedInverseMovementCostsBaseTranslation() const
returns the inverse movement costs for the base translation
float getUnweightedInverseMovementCostsBaseRotation() const
returns the inverse movement costs for the base rotation
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.
DefaultScoreContainer implements the BaseScoreContainer base class.
void setUnweightedUnnormalizedUtility(float value)
sets the weighted unnormalized utility
float getUtilityNormalization() const
returns the utility normalization
std::map< std::string, float > mObjectUtilities
float getUnweightedInverseMovementCostsPTU() const
returns the inverse costs for the PTU movement
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
std::ostream & operator<<(std::ostream &strm, const next_best_view::DefaultViewportPoint &p)


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 Mon Feb 28 2022 21:49:03