23 #include <boost/foreach.hpp> 30 #include <robot_model_services/robot_model/RobotModel.hpp> 116 DefaultRatingModule(
double fovV,
double fovH,
double fcp,
double ncp,
bool useTargetRobotState,
117 const robot_model_services::RobotModelPtr &robotModelPtr = robot_model_services::RobotModelPtr(),
225 void setOmegaParameters(
double omegaUtility,
double omegaPan,
double omegaTilt,
double omegaRot,
double omegaBase,
double omegaRecognition);
231 void setUtilityParameters(
bool useOrientationUtility =
true,
bool useProximityUtility =
true,
bool useSideUtility =
true);
240 void setRobotState(robot_model_services::RobotStatePtr robotState);
void setUnweightedUnnormalizedObjectUtilities(const ViewportPoint &candidateViewport, std::string objectType)
sets the mObjectUtilities member.
void setFrustumParameters(double fovV, double fovH, double fcp, double ncp)
double getNormalAngleThreshold()
float getRating(const BaseScoreContainerPtr &a)
returns the weighted rating of a rating object.
float getFrustumPositionUtility(const ViewportPoint &viewport, ObjectPoint &objectPoint)
returns the utility of the position of an object in the frustum of a given camera viewport...
float getOrientationUtility(const ViewportPoint &viewport, ObjectPoint &objectPoint)
returns the orientation utility of an object point for a given camera viewport. The orientation utili...
bool getBestViewport(ViewportPointCloudPtr &viewports, ViewportPoint &bestViewport)
Sets the best viewport from the given viewports cloud.
Precision mUnweightedInverseMovementCostsPTU
void setRatingNormalization()
sets the mRatingNormalization member
Precision mUnweightedInverseMovementCostsBaseRotation
bool mUseProximityUtility
MapHelperPtr mMapHelperPtr
double mWeightedInverseMovementCosts
ViewportPointCloud::Ptr ViewportPointCloudPtr
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
void setInputCloud(const ObjectPointCloudPtr &pointCloudPtr)
setting the input cloud.
bool mUseOrientationUtility
void setMaxRecognitionCosts()
sets the mMaxRecognitionCosts member. Must be called before calling getNormalizedRecognitionCosts eve...
double mRatingNormalization
float getNormalizedRating(float deviation, float threshold)
returns the normalized rating for a given deviation from the optimum and a threshold for the deviatio...
double mNormalAngleThreshold
CameraModelFilterPtr mCameraModelFilterPtr
bool setBestScoreContainer(const ViewportPoint ¤tViewport, ViewportPoint &candidateViewport)
Sets the best score for the given candidate camera viewport by choosing the best combination of objec...
BaseScoreContainerPtr getScoreContainerInstance()
float getSideUtility(const ViewportPoint &viewport, const ObjectPoint &objectPoint)
returns the side utility of a given object point for a given camera viewport. The side utility is alw...
virtual ~DefaultRatingModule()
bool compareScoreContainer(const BaseScoreContainerPtr &a, const BaseScoreContainerPtr &b)
compares two ratings.
this namespace contains all generally usable classes.
void setRobotState(robot_model_services::RobotStatePtr robotState)
setRobotState sets mRobotModelPtr's state.
void setUtilityParameters(bool useOrientationUtility=true, bool useProximityUtility=true, bool useSideUtility=true)
DebugHelperPtr mDebugHelperPtr
robot_model_services::RobotModelPtr mRobotModelPtr
void resetCache()
resets the cached data for a call of setBestScoreContainer
bool compareViewports(const ViewportPoint &a, const ViewportPoint &b)
compares two viewports
std::map< std::string, float > mUnweightedUnnormalizedObjectUtilities
double mMaxRecognitionCosts
void setUseTargetRobotState(bool useTargetRobotState)
double mUnweightedInverseRecognitionCosts
void setWeightedInverseMovementCosts()
sets the mMovementCosts member. Must be called before calling setRatingNormalization.
ObjectPointCloud::Ptr ObjectPointCloudPtr
boost::shared_ptr< CameraModelFilter > CameraModelFilterPtr
Definition for the shared pointer type of the class.
double getUnweightedInverseRecognitionCosts(const ViewportPoint &targetViewport)
returns the inverse recognition costs for the objects in the target viewport
double getUnweightedUnnormalizedUtility(const ViewportPoint &candidateViewport)
returns the utility for the given candidate camera viewport.
float getProximityUtility(const ViewportPoint &viewport, const ObjectPoint &objectPoint)
returns the proximity utility of a given object point for a given camera viewport. The proximizy utility is always between 0.0 and 1.0. Depends on the distance between the object and the camera.
float getNormalizedAngleUtility(const SimpleVector3 v1, const SimpleVector3 v2, double angleThreshold)
returns a rating for the difference between the two given normals.
RatingModule is a generalization for the rating of the point cloud objects and viewports.
double getWeightedInverseCosts(const ViewportPoint &sourceViewport, const ViewportPoint &targetViewport)
returns the inverse costs for the movement from the source to the target viewport and the recognition...
robot_model_services::RobotStatePtr mTargetState
void setNormalAngleThreshold(double angle)
sets the threshold for the angle between the orientation of an object and the camera orientation...
DefaultRatingModule implements the functionlities offered by RatingModule.
bool setSingleScoreContainer(const ViewportPoint ¤tViewport, ViewportPoint &candidateViewport)
sets the score container for one filtered camera viewport Before calling this method, the method resetCache() should be called.
bool mUseTargetRobotState
Precision mUnweightedInverseMovementCostsBaseTranslation
boost::shared_ptr< MapHelper > MapHelperPtr
boost::shared_ptr< DefaultRatingModule > DefaultRatingModulePtr
Definition for the shared pointer type of the class.
float getNormalUtility(const ViewportPoint &viewport, const SimpleVector3 &objectNormalVector, const SimpleVector3 &objectPosition)
returns the utility of one object normal for a given camera viewport. The normal utility is always be...
void setOmegaParameters(double omegaUtility, double omegaPan, double omegaTilt, double omegaRot, double omegaBase, double omegaRecognition)
Set the weights of the movements of each component.