Main Page
Namespaces
Classes
Files
File List
File Members
src
step_cost_estimators
euclidean_step_cost_estimator.cpp
Go to the documentation of this file.
1
#include <
vigir_footstep_planning_default_plugins/step_cost_estimators/euclidean_step_cost_estimator.h
>
2
3
4
5
namespace
vigir_footstep_planning
6
{
7
EuclideanStepCostEstimator::EuclideanStepCostEstimator
()
8
: StepCostEstimatorPlugin(
"euclidean_step_cost_estimator"
)
9
{
10
}
11
12
bool
EuclideanStepCostEstimator::getCost
(
const
State& left_foot,
const
State& right_foot,
const
State& swing_foot,
double
& cost,
double
& cost_multiplier,
double
& risk,
double
& risk_multiplier)
const
13
{
14
cost = 0.0;
15
cost_multiplier = 1.0;
16
risk = 0.0;
17
risk_multiplier = 1.0;
18
19
if
(swing_foot == left_foot || swing_foot == right_foot)
20
return
true
;
21
22
const
State& swing_foot_before = swing_foot.getLeg() == LEFT ? left_foot : right_foot;
23
cost = 0.5*euclidean_distance(swing_foot_before.getX(), swing_foot_before.getY(), swing_foot.getX(), swing_foot.getY());
24
25
return
true
;
26
}
27
}
28
29
#include <pluginlib/class_list_macros.h>
30
PLUGINLIB_EXPORT_CLASS(
vigir_footstep_planning::EuclideanStepCostEstimator
, vigir_footstep_planning::StepCostEstimatorPlugin)
euclidean_step_cost_estimator.h
vigir_footstep_planning::EuclideanStepCostEstimator
Definition:
euclidean_step_cost_estimator.h:38
vigir_footstep_planning
Definition:
dynamics_heuristic.h:39
vigir_footstep_planning::EuclideanStepCostEstimator::EuclideanStepCostEstimator
EuclideanStepCostEstimator()
Definition:
euclidean_step_cost_estimator.cpp:7
vigir_footstep_planning::EuclideanStepCostEstimator::getCost
bool getCost(const State &left_foot, const State &right_foot, const State &swing_foot, double &cost, double &cost_multiplier, double &risk, double &risk_multiplier) const override
Definition:
euclidean_step_cost_estimator.cpp:12
vigir_footstep_planning_default_plugins
Author(s): Alexander Stumpf
autogenerated on Sun Nov 17 2019 03:30:01