#include <step_controller_plugin.h>
Public Types | |
typedef boost::shared_ptr < const StepControllerPlugin > | ConstPtr |
typedef boost::shared_ptr < StepControllerPlugin > | Ptr |
Public Member Functions | |
virtual bool | executeStep (const msgs::Step &step)=0 |
This method will be called when the next step should be added to execution pipeline. The call of this function should be triggered by the process(...) method when next_step_index_needed_ has been changed. | |
const msgs::ExecuteStepPlanFeedback & | getFeedbackState () const |
Returns current feedback information provided by the plugin. | |
int | getLastStepIndexSent () const |
Returns last step index which has been sent to walking engine. | |
int | getNextStepIndexNeeded () const |
Returns next step index needed by the walking engine. | |
StepControllerState | getState () const |
Get current state of execution. | |
virtual void | initWalk ()=0 |
This method is called when new step plan has been enqueued and previously the walk controller state was READY. This method must be override and set state to ACTIVE when everything has been set up successfully. | |
virtual void | postProcess (const ros::TimerEvent &) |
PostProcess Method is called after processing step, in purpose of sum up current status and cleanups for instance. | |
virtual void | preProcess (const ros::TimerEvent &event) |
PreProcess Method is called before processing walk controller, e.g. for precompute/update data or check walking engine status. For keeping the default behavior running, following variables has to be properly updated here: | |
virtual void | process (const ros::TimerEvent &event) |
Overwrite to handle robot specific behavior. The default behavior behaves as followed: | |
virtual void | setStepPlanMsgPlugin (vigir_footstep_planning::StepPlanMsgPlugin::Ptr plugin) |
Sets the StepPlanMsgPlugin to be used. | |
StepControllerPlugin () | |
virtual void | stop () |
Will be called when (soft) stop is requested and resets plugin. | |
void | updateQueueFeedback () |
Updates feedback information with internal state data. | |
virtual bool | updateStepPlan (const msgs::StepPlan &step_plan) |
Merges given step plan to the current step queue of steps. Hereby, two cases have to considered: 1. In case of an empty step queue (robot is standing) the step plan has to begin with step index 0. 2. In case of an non-empty step queue (robot is walking) the first step of the step plan has to be identical with the corresponding step (=same step index) in the step queue. Be aware that already performed steps have been popped from step queue and therefore are not exisiting anymore. The default implementation resets the plugin previously when in FINISHED or FAILED state. | |
virtual | ~StepControllerPlugin () |
Protected Member Functions | |
virtual void | reset () |
Resets the plugin (called during construction and by stop()). The default implementation raises the READY flag. Overwrite this method if another behavior is desired. | |
void | setFeedbackState (const msgs::ExecuteStepPlanFeedback &feedback) |
void | setLastStepIndexSent (int index) |
void | setNextStepIndexNeeded (int index) |
void | setState (StepControllerState state) |
Protected Attributes | |
boost::shared_mutex | plugin_mutex_ |
vigir_footstep_planning::StepPlanMsgPlugin::Ptr | step_plan_msg_plugin_ |
StepQueue::Ptr | step_queue_ |
Private Attributes | |
msgs::ExecuteStepPlanFeedback | feedback_state_ |
int | last_step_index_sent_ |
int | next_step_index_needed_ |
StepControllerState | state_ |
Definition at line 58 of file step_controller_plugin.h.
typedef boost::shared_ptr<const StepControllerPlugin> vigir_step_control::StepControllerPlugin::ConstPtr |
Reimplemented in vigir_step_control::StepControllerTestPlugin.
Definition at line 64 of file step_controller_plugin.h.
typedef boost::shared_ptr<StepControllerPlugin> vigir_step_control::StepControllerPlugin::Ptr |
Reimplemented in vigir_step_control::StepControllerTestPlugin.
Definition at line 63 of file step_controller_plugin.h.
Definition at line 21 of file step_controller_plugin.cpp.
Definition at line 30 of file step_controller_plugin.cpp.
virtual bool vigir_step_control::StepControllerPlugin::executeStep | ( | const msgs::Step & | step | ) | [pure virtual] |
This method will be called when the next step should be added to execution pipeline. The call of this function should be triggered by the process(...) method when next_step_index_needed_ has been changed.
step | Step to be executed now |
Implemented in vigir_step_control::StepControllerTestPlugin.
const msgs::ExecuteStepPlanFeedback & vigir_step_control::StepControllerPlugin::getFeedbackState | ( | ) | const |
Returns current feedback information provided by the plugin.
Definition at line 62 of file step_controller_plugin.cpp.
Returns last step index which has been sent to walking engine.
Definition at line 56 of file step_controller_plugin.cpp.
Returns next step index needed by the walking engine.
Definition at line 50 of file step_controller_plugin.cpp.
Get current state of execution.
Definition at line 44 of file step_controller_plugin.cpp.
virtual void vigir_step_control::StepControllerPlugin::initWalk | ( | ) | [pure virtual] |
This method is called when new step plan has been enqueued and previously the walk controller state was READY. This method must be override and set state to ACTIVE when everything has been set up successfully.
Implemented in vigir_step_control::StepControllerTestPlugin.
virtual void vigir_step_control::StepControllerPlugin::postProcess | ( | const ros::TimerEvent & | ) | [inline, virtual] |
PostProcess Method is called after processing step, in purpose of sum up current status and cleanups for instance.
Definition at line 145 of file step_controller_plugin.h.
void vigir_step_control::StepControllerPlugin::preProcess | ( | const ros::TimerEvent & | event | ) | [virtual] |
PreProcess Method is called before processing walk controller, e.g. for precompute/update data or check walking engine status. For keeping the default behavior running, following variables has to be properly updated here:
Reimplemented in vigir_step_control::StepControllerTestPlugin.
Definition at line 152 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::process | ( | const ros::TimerEvent & | event | ) | [virtual] |
Overwrite to handle robot specific behavior. The default behavior behaves as followed:
Definition at line 170 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::reset | ( | ) | [protected, virtual] |
Resets the plugin (called during construction and by stop()). The default implementation raises the READY flag. Overwrite this method if another behavior is desired.
Definition at line 68 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::setFeedbackState | ( | const msgs::ExecuteStepPlanFeedback & | feedback | ) | [protected] |
Definition at line 104 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::setLastStepIndexSent | ( | int | index | ) | [protected] |
Definition at line 98 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::setNextStepIndexNeeded | ( | int | index | ) | [protected] |
Definition at line 92 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::setState | ( | StepControllerState | state | ) | [protected] |
Definition at line 84 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::setStepPlanMsgPlugin | ( | vigir_footstep_planning::StepPlanMsgPlugin::Ptr | plugin | ) | [virtual] |
Sets the StepPlanMsgPlugin to be used.
plugin | Plugin of type StepPlanMsgPlugin |
Definition at line 34 of file step_controller_plugin.cpp.
void vigir_step_control::StepControllerPlugin::stop | ( | ) | [virtual] |
Will be called when (soft) stop is requested and resets plugin.
Definition at line 221 of file step_controller_plugin.cpp.
Updates feedback information with internal state data.
Definition at line 110 of file step_controller_plugin.cpp.
bool vigir_step_control::StepControllerPlugin::updateStepPlan | ( | const msgs::StepPlan & | step_plan | ) | [virtual] |
Merges given step plan to the current step queue of steps. Hereby, two cases have to considered: 1. In case of an empty step queue (robot is standing) the step plan has to begin with step index 0. 2. In case of an non-empty step queue (robot is walking) the first step of the step plan has to be identical with the corresponding step (=same step index) in the step queue. Be aware that already performed steps have been popped from step queue and therefore are not exisiting anymore. The default implementation resets the plugin previously when in FINISHED or FAILED state.
step_plan | Step plan to be merged into step queue. |
Definition at line 118 of file step_controller_plugin.cpp.
msgs::ExecuteStepPlanFeedback vigir_step_control::StepControllerPlugin::feedback_state_ [private] |
Definition at line 192 of file step_controller_plugin.h.
Definition at line 189 of file step_controller_plugin.h.
Definition at line 186 of file step_controller_plugin.h.
boost::shared_mutex vigir_step_control::StepControllerPlugin::plugin_mutex_ [mutable, protected] |
Definition at line 179 of file step_controller_plugin.h.
Definition at line 183 of file step_controller_plugin.h.
vigir_footstep_planning::StepPlanMsgPlugin::Ptr vigir_step_control::StepControllerPlugin::step_plan_msg_plugin_ [protected] |
Definition at line 176 of file step_controller_plugin.h.
Definition at line 174 of file step_controller_plugin.h.