post_process_plugin.cpp
Go to the documentation of this file.
2 
3 
4 
6 {
7 PostProcessPlugin::PostProcessPlugin(const std::string& name)
8  : Plugin(name)
9 {
10 }
11 
13 {
14  return false;
15 }
16 
17 void PostProcessPlugin::postProcessStepForward(const State& /*left_foot*/, const State& /*right_foot*/, State& /*swing_foot*/) const
18 {
19 }
20 
21 void PostProcessPlugin::postProcessStepBackward(const State& /*left_foot*/, const State& /*right_foot*/, State& /*swing_foot*/) const
22 {
23 }
24 
25 void PostProcessPlugin::postProcessStep(const msgs::Step& /*left_foot*/, const msgs::Step& /*right_foot*/, msgs::Step& /*swing_foot*/, msgs::StepPlan& /*step_plan*/) const
26 {
27 }
28 
29 void PostProcessPlugin::postProcess(msgs::StepPlan step_plan) const
30 {
31  if (step_plan.steps.empty())
32  return;
33 
34  std::vector<msgs::Step>::iterator itr = step_plan.steps.begin();
35 
36  // determine start configuration
37  msgs::Step left_foot, right_foot = *itr;
38 
39  if (left_foot.foot.foot_index != msgs::Foot::LEFT)
40  left_foot.foot = step_plan.start.left;
41 
42  if (right_foot.foot.foot_index != msgs::Foot::RIGHT)
43  right_foot.foot = step_plan.start.right;
44 
45  // iterate step plan
46  for (; itr != step_plan.steps.end(); itr++)
47  {
48  msgs::Step& swing_foot = *itr;
49 
50  postProcessStep(left_foot, right_foot, swing_foot, step_plan);
51 
52  if (swing_foot.foot.foot_index == msgs::Foot::LEFT)
53  left_foot = swing_foot;
54  else
55  right_foot = swing_foot;
56  }
57 }
58 }
virtual void postProcessStep(const msgs::Step &left, const msgs::Step &right, msgs::Step &swing, msgs::StepPlan &step_plan) const
Post-Processing after footstep planning was done.
virtual void postProcessStepBackward(const State &left, const State &right, State &swing) const
virtual void postProcess(msgs::StepPlan step_plan) const
virtual void postProcessStepForward(const State &left, const State &right, State &swing) const
Post-Processing directly after state generation.


vigir_footstep_planning_plugins
Author(s): Alexander Stumpf
autogenerated on Mon Jun 10 2019 15:47:39