30 #ifndef FOOTSTEP_PLANNER_H__ 31 #define FOOTSTEP_PLANNER_H__ 39 #include <boost/thread.hpp> 40 #include <boost/thread/mutex.hpp> 41 #include <boost/function.hpp> 48 #include <geometry_msgs/Pose.h> 49 #include <geometry_msgs/PoseStamped.h> 50 #include <geometry_msgs/PoseWithCovarianceStamped.h> 51 #include <nav_msgs/Path.h> 52 #include <nav_msgs/OccupancyGrid.h> 53 #include <sensor_msgs/PointCloud.h> 54 #include <sensor_msgs/PointCloud2.h> 55 #include <visualization_msgs/Marker.h> 56 #include <visualization_msgs/MarkerArray.h> 58 #include <vigir_generic_params/generic_params_msgs.h> 59 #include <vigir_generic_params/parameter_manager.h> 61 #include <vigir_pluginlib/plugin_manager.h> 63 #include <vigir_footstep_planning_msgs/footstep_planning_msgs.h> 65 #include <vigir_footstep_planning_lib/math.h> 66 #include <vigir_footstep_planning_lib/modeling/footstep.h> 67 #include <vigir_footstep_planning_lib/modeling/state.h> 69 #include <vigir_footstep_planning_plugins/plugin_aggregators/step_cost_estimator.h> 70 #include <vigir_footstep_planning_plugins/plugin_aggregators/heuristic.h> 71 #include <vigir_footstep_planning_plugins/plugin_aggregators/post_processor.h> 72 #include <vigir_footstep_planning_plugins/plugin_aggregators/robot_model.h> 73 #include <vigir_footstep_planning_plugins/plugin_aggregators/state_generator.h> 74 #include <vigir_footstep_planning_plugins/plugin_aggregators/world_model.h> 75 #include <vigir_footstep_planning_plugins/plugins/step_plan_msg_plugin.h> 95 typedef boost::function<void (msgs::StepPlanRequestService::Response)>
ResultCB;
96 typedef boost::function<void (msgs::PlanningFeedback)>
FeedbackCB;
104 bool setParams(
const vigir_generic_params::ParameterSet& params);
106 msgs::ErrorStatus
updateFoot(msgs::Foot& foot, uint8_t mode,
bool transform =
true)
const;
107 msgs::ErrorStatus
updateFeet(msgs::Feet& feet, uint8_t mode,
bool transform =
true)
const;
108 msgs::ErrorStatus
updateStepPlan(msgs::StepPlan& result, uint8_t mode,
const std::string& param_set_name = std::string(),
bool transform =
true)
const;
129 msgs::ErrorStatus
planSteps(msgs::StepPlanRequestService::Request& req);
132 msgs::ErrorStatus
planPattern(msgs::StepPlanRequestService::Request& req);
136 bool finalizeStepPlan(msgs::StepPlanRequestService::Request& req, msgs::StepPlanRequestService::Response&
resp,
bool post_process);
139 void startPlanning(msgs::StepPlanRequestService::Request& req);
141 void doPlanning(msgs::StepPlanRequestService::Request& req);
145 bool checkRobotCollision(
const State& left_foot,
const State& right_foot,
bool& left,
bool& right)
const;
152 bool setStart(
const State& left_foot,
const State& right_foot,
bool ignore_collision =
false);
159 bool setStart(
const msgs::StepPlanRequest& req,
bool ignore_collision =
false);
166 bool setGoal(
const State& left_foot,
const State& right_foot,
bool ignore_collision =
false);
173 bool setGoal(
const msgs::StepPlanRequest& req,
bool ignore_collision =
false);
209 bool pathIsNew(
const std::vector<int>& new_path);
215 bool extractPath(
const std::vector<int>& state_ids);
223 bool plan(ReplanParams& params);
226 State
getFootPose(
const State& robot, Leg leg,
double dx,
double dy,
double dyaw);