A class to control the interaction between ROS and the footstep planner. More...
#include <footstep_planner.h>
Public Types | |
typedef boost::shared_ptr< const FootstepPlanner > | ConstPtr |
typedef boost::function< void(msgs::PlanningFeedback)> | FeedbackCB |
typedef boost::function< void()> | PreemptCB |
typedef boost::shared_ptr< FootstepPlanner > | Ptr |
typedef boost::function< void(msgs::StepPlanRequestService::Response)> | ResultCB |
Public Member Functions | |
FootstepPlanner (ros::NodeHandle &nh) | |
bool | isPlanning () const |
void | preemptPlanning () |
stops thread running planning More... | |
bool | setParams (const vigir_generic_params::ParameterSet ¶ms) |
msgs::ErrorStatus | stepPlanRequest (msgs::StepPlanRequestService::Request &req, ResultCB result_cb=ResultCB(), FeedbackCB feedback_cb=FeedbackCB(), PreemptCB preempt_cb=PreemptCB()) |
bool | stepPlanRequestService (msgs::StepPlanRequestService::Request &req, msgs::StepPlanRequestService::Response &resp) |
Service handle to plan footsteps. More... | |
msgs::ErrorStatus | updateFeet (msgs::Feet &feet, uint8_t mode, bool transform=true) const |
msgs::ErrorStatus | updateFoot (msgs::Foot &foot, uint8_t mode, bool transform=true) const |
msgs::ErrorStatus | updateStepPlan (msgs::StepPlan &result, uint8_t mode, const std::string ¶m_set_name=std::string(), bool transform=true) const |
virtual | ~FootstepPlanner () |
Protected Member Functions | |
bool | checkRobotCollision (const State &left_foot, const State &right_foot, bool &left, bool &right) const |
void | doPlanning (msgs::StepPlanRequestService::Request &req) |
: method used in seperate thread More... | |
bool | extractPath (const std::vector< int > &state_ids) |
Extracts the path (list of foot poses) from a list of state IDs calculated by the SBPL. More... | |
msgs::ErrorStatus | finalizeAndAddStepToPlan (State &s, const msgs::PatternParameters &env_params, bool change_z=true) |
bool | finalizeStepPlan (msgs::StepPlanRequestService::Request &req, msgs::StepPlanRequestService::Response &resp, bool post_process) |
extracts step plan response from planning result More... | |
bool | findNearestValidState (State &s) const |
State | getFootPose (const State &robot, Leg leg, double dx, double dy, double dyaw) |
Returns the foot pose of a leg for a given robot pose. More... | |
State | getFootPose (const State &robot, Leg leg) |
size_t | getNumExpandedStates () const |
size_t | getNumFootPoses () const |
state_iter_t | getPathBegin () const |
double | getPathCosts () const |
state_iter_t | getPathEnd () const |
int | getPathSize () |
State | getStartFootLeft () |
State | getStartFootRight () |
bool | pathExists () |
bool | pathIsNew (const std::vector< int > &new_path) |
bool | plan (ReplanParams ¶ms) |
Starts the planning task in the underlying SBPL. More... | |
msgs::ErrorStatus | planPattern (msgs::StepPlanRequestService::Request &req) |
plans stepping More... | |
msgs::ErrorStatus | planSteps (msgs::StepPlanRequestService::Request &req) |
Start a planning task from scratch (will delete information of previous planning tasks). Map and start, goal poses need to be set beforehand. More... | |
void | reset () |
Reset the previous planning information. More... | |
void | resetTotally () |
Reset and reinitialize the environment. More... | |
bool | setGoal (const State &left_foot, const State &right_foot, bool ignore_collision=false) |
Sets the goal pose as position of left and right footsteps. More... | |
bool | setGoal (const msgs::StepPlanRequest &req, bool ignore_collision=false) |
Sets the goal pose. More... | |
void | setPlanner () |
Sets the planning algorithm used by SBPL. More... | |
bool | setStart (const State &left_foot, const State &right_foot, bool ignore_collision=false) |
Sets the start pose as position of left and right footsteps. More... | |
bool | setStart (const msgs::StepPlanRequest &req, bool ignore_collision=false) |
Sets the start pose. More... | |
void | startPlanning (msgs::StepPlanRequestService::Request &req) |
: starts planning in a new thread More... | |
Protected Attributes | |
EnvironmentParameters::Ptr | env_params |
FeedbackCB | feedback_cb |
FootPoseTransformer | foot_pose_transformer |
std::string | frame_id |
bool | goal_pose_set_up |
pcl::PointCloud< pcl::PointXYZI >::Ptr | ivCheckedFootContactSupport |
ros::Publisher | ivCheckedFootContactSupportPub |
State | ivGoalFootLeft |
State | ivGoalFootRight |
std::vector< State > | ivPath |
double | ivPathCost |
boost::shared_ptr< FootstepPlannerEnvironment > | ivPlannerEnvironmentPtr |
boost::shared_ptr< SBPLPlanner > | ivPlannerPtr |
std::vector< int > | ivPlanningStatesIds |
State | ivStartFootLeft |
State | ivStartFootRight |
double | max_number_steps |
double | max_path_length_ratio |
boost::recursive_mutex | planner_mutex |
boost::thread | planning_thread |
PreemptCB | preempt_cb |
ResultCB | result_cb |
unsigned int | start_foot_selection |
bool | start_pose_set_up |
unsigned int | step_plan_uid |
A class to control the interaction between ROS and the footstep planner.
Definition at line 92 of file footstep_planner.h.
Definition at line 119 of file footstep_planner.h.
typedef boost::function<void (msgs::PlanningFeedback)> vigir_footstep_planning::FootstepPlanner::FeedbackCB |
Definition at line 96 of file footstep_planner.h.
typedef boost::function<void ()> vigir_footstep_planning::FootstepPlanner::PreemptCB |
Definition at line 97 of file footstep_planner.h.
Definition at line 118 of file footstep_planner.h.
typedef boost::function<void (msgs::StepPlanRequestService::Response)> vigir_footstep_planning::FootstepPlanner::ResultCB |
Definition at line 95 of file footstep_planner.h.
vigir_footstep_planning::FootstepPlanner::FootstepPlanner | ( | ros::NodeHandle & | nh | ) |
Definition at line 5 of file footstep_planner.cpp.
|
virtual |
Definition at line 28 of file footstep_planner.cpp.
|
protected |
Definition at line 1209 of file footstep_planner.cpp.
|
protected |
: method used in seperate thread
Definition at line 1096 of file footstep_planner.cpp.
|
protected |
Extracts the path (list of foot poses) from a list of state IDs calculated by the SBPL.
Definition at line 184 of file footstep_planner.cpp.
|
protected |
Definition at line 843 of file footstep_planner.cpp.
|
protected |
extracts step plan response from planning result
Definition at line 865 of file footstep_planner.cpp.
|
protected |
Definition at line 1149 of file footstep_planner.cpp.
|
protected |
Returns the foot pose of a leg for a given robot pose.
Definition at line 1322 of file footstep_planner.cpp.
|
protected |
Definition at line 1346 of file footstep_planner.cpp.
|
inlineprotected |
Definition at line 179 of file footstep_planner.h.
|
inlineprotected |
Definition at line 185 of file footstep_planner.h.
|
inlineprotected |
Definition at line 187 of file footstep_planner.h.
|
inlineprotected |
Definition at line 176 of file footstep_planner.h.
|
inlineprotected |
Definition at line 188 of file footstep_planner.h.
|
inlineprotected |
Definition at line 191 of file footstep_planner.h.
|
inlineprotected |
Definition at line 193 of file footstep_planner.h.
|
inlineprotected |
Definition at line 194 of file footstep_planner.h.
bool vigir_footstep_planning::FootstepPlanner::isPlanning | ( | ) | const |
Definition at line 85 of file footstep_planner.cpp.
|
inlineprotected |
Definition at line 203 of file footstep_planner.h.
|
protected |
Definition at line 1351 of file footstep_planner.cpp.
|
protected |
Starts the planning task in the underlying SBPL.
NOTE: Never call this directly. Always use either plan() or replan() to invoke this method.
: updateGoal adds goal states to list so planner may use it independend from costs...
Definition at line 90 of file footstep_planner.cpp.
|
protected |
plans stepping
Definition at line 465 of file footstep_planner.cpp.
|
protected |
Start a planning task from scratch (will delete information of previous planning tasks). Map and start, goal poses need to be set beforehand.
: Hack to disable collision check for start pose
Definition at line 439 of file footstep_planner.cpp.
void vigir_footstep_planning::FootstepPlanner::preemptPlanning | ( | ) |
stops thread running planning
Definition at line 1136 of file footstep_planner.cpp.
|
protected |
Reset the previous planning information.
Definition at line 395 of file footstep_planner.cpp.
|
protected |
Reset and reinitialize the environment.
Definition at line 415 of file footstep_planner.cpp.
|
protected |
Sets the goal pose as position of left and right footsteps.
Definition at line 1269 of file footstep_planner.cpp.
|
protected |
Sets the goal pose.
Definition at line 1300 of file footstep_planner.cpp.
bool vigir_footstep_planning::FootstepPlanner::setParams | ( | const vigir_generic_params::ParameterSet & | params | ) |
Definition at line 208 of file footstep_planner.cpp.
|
protected |
Sets the planning algorithm used by SBPL.
Definition at line 36 of file footstep_planner.cpp.
|
protected |
Sets the start pose as position of left and right footsteps.
Definition at line 1223 of file footstep_planner.cpp.
|
protected |
Sets the start pose.
Definition at line 1254 of file footstep_planner.cpp.
|
protected |
: starts planning in a new thread
Definition at line 1090 of file footstep_planner.cpp.
msgs::ErrorStatus vigir_footstep_planning::FootstepPlanner::stepPlanRequest | ( | msgs::StepPlanRequestService::Request & | req, |
ResultCB | result_cb = ResultCB() , |
||
FeedbackCB | feedback_cb = FeedbackCB() , |
||
PreemptCB | preempt_cb = PreemptCB() |
||
) |
Definition at line 1021 of file footstep_planner.cpp.
bool vigir_footstep_planning::FootstepPlanner::stepPlanRequestService | ( | msgs::StepPlanRequestService::Request & | req, |
msgs::StepPlanRequestService::Response & | resp | ||
) |
Service handle to plan footsteps.
Definition at line 1073 of file footstep_planner.cpp.
msgs::ErrorStatus vigir_footstep_planning::FootstepPlanner::updateFeet | ( | msgs::Feet & | feet, |
uint8_t | mode, | ||
bool | transform = true |
||
) | const |
Definition at line 291 of file footstep_planner.cpp.
msgs::ErrorStatus vigir_footstep_planning::FootstepPlanner::updateFoot | ( | msgs::Foot & | foot, |
uint8_t | mode, | ||
bool | transform = true |
||
) | const |
Definition at line 255 of file footstep_planner.cpp.
msgs::ErrorStatus vigir_footstep_planning::FootstepPlanner::updateStepPlan | ( | msgs::StepPlan & | result, |
uint8_t | mode, | ||
const std::string & | param_set_name = std::string() , |
||
bool | transform = true |
||
) | const |
Definition at line 316 of file footstep_planner.cpp.
|
protected |
Definition at line 257 of file footstep_planner.h.
|
protected |
Definition at line 239 of file footstep_planner.h.
|
protected |
Definition at line 253 of file footstep_planner.h.
|
protected |
Definition at line 256 of file footstep_planner.h.
|
protected |
Definition at line 259 of file footstep_planner.h.
|
protected |
Definition at line 270 of file footstep_planner.h.
|
protected |
Definition at line 233 of file footstep_planner.h.
|
protected |
Definition at line 249 of file footstep_planner.h.
|
protected |
Definition at line 250 of file footstep_planner.h.
|
protected |
Definition at line 245 of file footstep_planner.h.
|
protected |
Definition at line 266 of file footstep_planner.h.
|
protected |
Definition at line 242 of file footstep_planner.h.
|
protected |
Definition at line 243 of file footstep_planner.h.
|
protected |
Definition at line 268 of file footstep_planner.h.
|
protected |
Definition at line 247 of file footstep_planner.h.
|
protected |
Definition at line 248 of file footstep_planner.h.
|
protected |
Definition at line 261 of file footstep_planner.h.
|
protected |
Definition at line 264 of file footstep_planner.h.
|
mutableprotected |
Definition at line 235 of file footstep_planner.h.
|
protected |
Definition at line 236 of file footstep_planner.h.
|
protected |
Definition at line 240 of file footstep_planner.h.
|
protected |
Definition at line 238 of file footstep_planner.h.
|
protected |
Definition at line 258 of file footstep_planner.h.
|
protected |
Definition at line 259 of file footstep_planner.h.
|
protected |
Definition at line 273 of file footstep_planner.h.