const_step_cost_estimator.cpp
Go to the documentation of this file.
2 
3 
4 
6 {
8  : StepCostEstimatorPlugin("const_step_cost_estimator")
9 {
10 }
11 
12 bool ConstStepCostEstimator::loadParams(const vigir_generic_params::ParameterSet& params)
13 {
14  if (!StepCostEstimatorPlugin::loadParams(params))
15  return false;
16 
17  params.getParam("const_step_cost_estimator/step_cost", const_step_cost, 0.1);
18  return true;
19 }
20 
21 bool ConstStepCostEstimator::getCost(const State& /*left_foot*/, const State& /*right_foot*/, const State& /*swing_foot*/, double& cost, double& cost_multiplier, double& risk, double& risk_multiplier) const
22 {
23  cost = const_step_cost;
24  cost_multiplier = 1.0;
25  risk = 0.0;
26  risk_multiplier = 1.0;
27  return true;
28 }
29 }
30 
31 #include <pluginlib/class_list_macros.h>
32 PLUGINLIB_EXPORT_CLASS(vigir_footstep_planning::ConstStepCostEstimator, vigir_footstep_planning::StepCostEstimatorPlugin)
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
bool loadParams(const vigir_generic_params::ParameterSet &params=vigir_generic_params::ParameterSet()) override


vigir_footstep_planning_default_plugins
Author(s): Alexander Stumpf
autogenerated on Sun Nov 17 2019 03:30:01