Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ll-nick authored and orzechow committed Oct 4, 2024
1 parent af8f16d commit 0058060
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions demo/include/demo/cost_estimator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace demo {

/**
* @brief The CostEstimator estimates a cost quantity for a given command to be used as a decision heuristic.
*/
struct CostEstimator : public arbitration_graphs::CostEstimator<Command> {
struct Parameters {
/// @brief The radius of the neighborhood around the end of the path that is checked for dots.
Expand All @@ -22,6 +25,13 @@ struct CostEstimator : public arbitration_graphs::CostEstimator<Command> {
: environmentModel_{std::move(environmentModel)}, parameters_{paramters} {
}

/**
* @brief Estimate the cost of a command.
*
* The cost is estimated using two metrics: The steps per dot along the path and the dot density at around the end
* of the path. This is done to balance the short-term gain by following a path with many dots and the long-term
* gain by moving towards a promising area.
*/
double estimateCost(const Command& command, bool /*isActive*/) override;

private:
Expand Down

0 comments on commit 0058060

Please sign in to comment.