A class to control the interaction between ROS and the footstep planner. More...
#include <FootstepPlanner.h>
Public Member Functions | |
void | clearFootstepPathVis (unsigned num_footsteps=0) |
Clear the footstep path visualization from a previous planning task. More... | |
FootstepPlanner () | |
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 () |
void | goalPoseCallback (const geometry_msgs::PoseStampedConstPtr &goal_pose) |
Callback to set the goal pose as a robot pose centered between two feet. If the start pose has been set previously the planning is started. More... | |
void | mapCallback (const nav_msgs::OccupancyGridConstPtr &occupancy_map) |
Callback to set the map. More... | |
bool | pathExists () |
bool | plan (bool force_new_plan=true) |
Start a planning task from scratch (will delete information of previous planning tasks). Map and start, goal poses need to be set beforehand. More... | |
bool | plan (const geometry_msgs::PoseStampedConstPtr start, const geometry_msgs::PoseStampedConstPtr goal) |
Sets start, goal poses and calls FootstepPlanner::plan(). More... | |
bool | plan (float start_x, float start_y, float start_theta, float goal_x, float goal_y, float goal_theta) |
Sets start, goal poses and calls FootstepPlanner::plan(). More... | |
bool | planFeetService (humanoid_nav_msgs::PlanFootstepsBetweenFeet::Request &req, humanoid_nav_msgs::PlanFootstepsBetweenFeet::Response &resp) |
Service handle to plan footsteps. More... | |
bool | planService (humanoid_nav_msgs::PlanFootsteps::Request &req, humanoid_nav_msgs::PlanFootsteps::Response &resp) |
Service handle to plan footsteps. More... | |
bool | replan () |
Starts a planning task based on previous planning information (note that this method can also be used when no previous planning was performed). 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) |
Sets the goal pose as two feet (left / right) More... | |
bool | setGoal (const geometry_msgs::PoseStampedConstPtr goal_pose) |
Sets the goal pose as a robot pose centered between two feet. More... | |
bool | setGoal (float x, float y, float theta) |
Sets the goal pose as a robot pose centered between two feet. More... | |
void | setMarkerNamespace (const std::string &ns) |
void | setMaxSearchTime (int search_time) |
Set the maximal search time. More... | |
bool | setStart (const geometry_msgs::PoseStampedConstPtr start_pose) |
Sets the start pose as a robot pose centered between two feet. More... | |
bool | setStart (float x, float y, float theta) |
Sets the start pose as a robot pose centered between two feet. More... | |
bool | setStart (const State &left_foot, const State &right_foot) |
Sets the start pose as position of left and right footsteps. More... | |
void | startPoseCallback (const geometry_msgs::PoseWithCovarianceStampedConstPtr &start_pose) |
Callback to set the start pose as a robot pose centered between two feet. If the goal pose has been set previously the planning is started. More... | |
bool | updateMap (const gridmap_2d::GridMap2DPtr map) |
Updates the map in the planning environment. More... | |
virtual | ~FootstepPlanner () |
Public Attributes | |
environment_params | ivEnvironmentParams |
Planning parameters. More... | |
Protected Member Functions | |
void | broadcastExpandedNodesVis () |
void | broadcastFootstepPathVis () |
void | broadcastHeuristicPathVis () |
void | broadcastPathVis () |
void | broadcastRandomNodesVis () |
void | extractFootstepsSrv (std::vector< humanoid_nav_msgs::StepTarget > &footsteps) const |
helper to create service response 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... | |
void | footPoseToMarker (const State &footstep, visualization_msgs::Marker *marker) |
Generates a visualization msgs for a foot pose. More... | |
State | getFootPose (const State &robot, Leg side) |
Returns the foot pose of a leg for a given robot pose. More... | |
bool | pathIsNew (const std::vector< int > &new_path) |
bool | run () |
Starts the planning task in the underlying SBPL. More... | |
void | setPlanner () |
Sets the planning algorithm used by SBPL. More... | |
void | updateEnvironment (const gridmap_2d::GridMap2DPtr old_map) |
Updates the environment in case of a changed map. More... | |
A class to control the interaction between ROS and the footstep planner.
Definition at line 57 of file FootstepPlanner.h.
footstep_planner::FootstepPlanner::FootstepPlanner | ( | ) |
Definition at line 31 of file FootstepPlanner.cpp.
|
virtual |
Definition at line 270 of file FootstepPlanner.cpp.
|
protected |
Definition at line 982 of file FootstepPlanner.cpp.
|
protected |
Definition at line 1014 of file FootstepPlanner.cpp.
|
protected |
|
protected |
Definition at line 1100 of file FootstepPlanner.cpp.
|
protected |
Definition at line 1058 of file FootstepPlanner.cpp.
void footstep_planner::FootstepPlanner::clearFootstepPathVis | ( | unsigned | num_footsteps = 0 | ) |
Clear the footstep path visualization from a previous planning task.
Definition at line 956 of file FootstepPlanner.cpp.
|
protected |
helper to create service response
Definition at line 595 of file FootstepPlanner.cpp.
|
protected |
Extracts the path (list of foot poses) from a list of state IDs calculated by the SBPL.
Definition at line 410 of file FootstepPlanner.cpp.
|
protected |
Generates a visualization msgs for a foot pose.
Definition at line 1128 of file FootstepPlanner.cpp.
Returns the foot pose of a leg for a given robot pose.
Definition at line 925 of file FootstepPlanner.cpp.
|
inline |
Definition at line 198 of file FootstepPlanner.h.
|
inline |
Definition at line 204 of file FootstepPlanner.h.
|
inline |
Definition at line 206 of file FootstepPlanner.h.
|
inline |
Definition at line 195 of file FootstepPlanner.h.
|
inline |
Definition at line 207 of file FootstepPlanner.h.
|
inline |
Definition at line 210 of file FootstepPlanner.h.
|
inline |
Definition at line 212 of file FootstepPlanner.h.
|
inline |
Definition at line 213 of file FootstepPlanner.h.
void footstep_planner::FootstepPlanner::goalPoseCallback | ( | const geometry_msgs::PoseStampedConstPtr & | goal_pose | ) |
Callback to set the goal pose as a robot pose centered between two feet. If the start pose has been set previously the planning is started.
Subscribed to 'goal'.
Definition at line 622 of file FootstepPlanner.cpp.
void footstep_planner::FootstepPlanner::mapCallback | ( | const nav_msgs::OccupancyGridConstPtr & | occupancy_map | ) |
|
inline |
Definition at line 222 of file FootstepPlanner.h.
|
protected |
Definition at line 942 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::plan | ( | bool | force_new_plan = true | ) |
Start a planning task from scratch (will delete information of previous planning tasks). Map and start, goal poses need to be set beforehand.
Definition at line 492 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::plan | ( | const geometry_msgs::PoseStampedConstPtr | start, |
const geometry_msgs::PoseStampedConstPtr | goal | ||
) |
Sets start, goal poses and calls FootstepPlanner::plan().
Definition at line 524 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::plan | ( | float | start_x, |
float | start_y, | ||
float | start_theta, | ||
float | goal_x, | ||
float | goal_y, | ||
float | goal_theta | ||
) |
Sets start, goal poses and calls FootstepPlanner::plan().
Definition at line 535 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::planFeetService | ( | humanoid_nav_msgs::PlanFootstepsBetweenFeet::Request & | req, |
humanoid_nav_msgs::PlanFootstepsBetweenFeet::Response & | resp | ||
) |
Service handle to plan footsteps.
Definition at line 570 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::planService | ( | humanoid_nav_msgs::PlanFootsteps::Request & | req, |
humanoid_nav_msgs::PlanFootsteps::Response & | resp | ||
) |
Service handle to plan footsteps.
Definition at line 549 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::replan | ( | ) |
Starts a planning task based on previous planning information (note that this method can also be used when no previous planning was performed). Map and start, goal poses need to be set beforehand.
Definition at line 517 of file FootstepPlanner.cpp.
void footstep_planner::FootstepPlanner::reset | ( | ) |
Reset the previous planning information.
Definition at line 461 of file FootstepPlanner.cpp.
void footstep_planner::FootstepPlanner::resetTotally | ( | ) |
Reset and reinitialize the environment.
Definition at line 478 of file FootstepPlanner.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.
Definition at line 306 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setGoal | ( | const State & | left_foot, |
const State & | right_foot | ||
) |
Sets the goal pose as two feet (left / right)
Definition at line 709 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setGoal | ( | const geometry_msgs::PoseStampedConstPtr | goal_pose | ) |
Sets the goal pose as a robot pose centered between two feet.
Definition at line 671 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setGoal | ( | float | x, |
float | y, | ||
float | theta | ||
) |
Sets the goal pose as a robot pose centered between two feet.
Definition at line 680 of file FootstepPlanner.cpp.
|
inline |
Definition at line 147 of file FootstepPlanner.h.
|
inline |
Set the maximal search time.
Definition at line 153 of file FootstepPlanner.h.
|
protected |
Sets the planning algorithm used by SBPL.
Definition at line 275 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setStart | ( | const geometry_msgs::PoseStampedConstPtr | start_pose | ) |
Sets the start pose as a robot pose centered between two feet.
Definition at line 727 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setStart | ( | float | x, |
float | y, | ||
float | theta | ||
) |
Sets the start pose as a robot pose centered between two feet.
Definition at line 754 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::setStart | ( | const State & | left_foot, |
const State & | right_foot | ||
) |
Sets the start pose as position of left and right footsteps.
Definition at line 736 of file FootstepPlanner.cpp.
void footstep_planner::FootstepPlanner::startPoseCallback | ( | const geometry_msgs::PoseWithCovarianceStampedConstPtr & | start_pose | ) |
Callback to set the start pose as a robot pose centered between two feet. If the goal pose has been set previously the planning is started.
Subscribed to 'initialpose'.
Definition at line 638 of file FootstepPlanner.cpp.
|
protected |
Updates the environment in case of a changed map.
Definition at line 809 of file FootstepPlanner.cpp.
bool footstep_planner::FootstepPlanner::updateMap | ( | const gridmap_2d::GridMap2DPtr | map | ) |
Updates the map in the planning environment.
Definition at line 787 of file FootstepPlanner.cpp.
|
protected |
If limit of changed cells is reached the planner starts a new task from the scratch.
Definition at line 308 of file FootstepPlanner.h.
|
protected |
Definition at line 295 of file FootstepPlanner.h.
environment_params footstep_planner::FootstepPlanner::ivEnvironmentParams |
Planning parameters.
Definition at line 225 of file FootstepPlanner.h.
|
protected |
Definition at line 283 of file FootstepPlanner.h.
|
protected |
Definition at line 293 of file FootstepPlanner.h.
|
protected |
Definition at line 284 of file FootstepPlanner.h.
|
protected |
Definition at line 291 of file FootstepPlanner.h.
|
protected |
Definition at line 290 of file FootstepPlanner.h.
|
protected |
Definition at line 280 of file FootstepPlanner.h.
|
protected |
Definition at line 281 of file FootstepPlanner.h.
|
protected |
Definition at line 297 of file FootstepPlanner.h.
|
protected |
Definition at line 286 of file FootstepPlanner.h.
|
protected |
Definition at line 287 of file FootstepPlanner.h.
|
protected |
Definition at line 302 of file FootstepPlanner.h.
|
protected |
Definition at line 298 of file FootstepPlanner.h.
|
protected |
Definition at line 271 of file FootstepPlanner.h.
|
protected |
Definition at line 311 of file FootstepPlanner.h.
|
protected |
Definition at line 301 of file FootstepPlanner.h.
|
protected |
Definition at line 294 of file FootstepPlanner.h.
|
protected |
Definition at line 276 of file FootstepPlanner.h.
|
protected |
Definition at line 299 of file FootstepPlanner.h.
|
protected |
Definition at line 274 of file FootstepPlanner.h.
|
protected |
Definition at line 288 of file FootstepPlanner.h.
|
protected |
Definition at line 270 of file FootstepPlanner.h.
|
protected |
Definition at line 272 of file FootstepPlanner.h.
|
protected |
Definition at line 310 of file FootstepPlanner.h.
|
protected |
Definition at line 313 of file FootstepPlanner.h.
|
protected |
Definition at line 285 of file FootstepPlanner.h.
|
protected |
Definition at line 300 of file FootstepPlanner.h.
|
protected |
Definition at line 278 of file FootstepPlanner.h.
|
protected |
Definition at line 279 of file FootstepPlanner.h.
|
protected |
Definition at line 297 of file FootstepPlanner.h.
|
protected |
Definition at line 289 of file FootstepPlanner.h.