A class that uses the actionlib::ActionServer interface that moves the robot base to a goal location. More...
#include <move_base.h>
Public Member Functions | |
bool | executeCycle (geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &global_plan) |
Performs a control cycle. | |
MoveBase (std::string name, tf::TransformListener &tf) | |
Constructor for the actions. | |
virtual | ~MoveBase () |
Destructor - Cleans up. | |
Private Member Functions | |
void | clearCostmapWindows (double size_x, double size_y) |
Clears obstacles within a window around the robot. | |
bool | clearUnknownService (std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp) |
A service call that clears unknown space in the robot's immediate area. | |
void | executeCb (const move_base_msgs::MoveBaseGoalConstPtr &move_base_goal) |
void | goalCB (const geometry_msgs::PoseStamped::ConstPtr &goal) |
geometry_msgs::PoseStamped | goalToGlobalFrame (const geometry_msgs::PoseStamped &goal_pose_msg) |
bool | isQuaternionValid (const geometry_msgs::Quaternion &q) |
void | loadDefaultRecoveryBehaviors () |
Loads the default recovery behaviors for the navigation stack. | |
bool | loadRecoveryBehaviors (ros::NodeHandle node) |
Load the recovery behaviors for the navigation stack from the parameter server. | |
bool | makePlan (const geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &plan) |
Make a new global plan. | |
bool | planService (nav_msgs::GetPlan::Request &req, nav_msgs::GetPlan::Response &resp) |
A service call that can be made when the action is inactive that will return a plan. | |
void | planThread () |
void | publishZeroVelocity () |
Publishes a velocity command of zero to the base. | |
void | resetState () |
Reset the state of the move_base action and send a zero velocity command to the base. | |
Private Attributes | |
ros::Publisher | action_goal_pub_ |
MoveBaseActionServer * | as_ |
pluginlib::ClassLoader < nav_core::BaseGlobalPlanner > | bgp_loader_ |
pluginlib::ClassLoader < nav_core::BaseLocalPlanner > | blp_loader_ |
double | circumscribed_radius_ |
ros::ServiceServer | clear_unknown_srv_ |
double | clearing_radius_ |
bool | clearing_roatation_allowed_ |
ClearingState | clearing_state_ |
double | conservative_reset_dist_ |
bool | control_failure_recovery_ |
costmap_2d::Costmap2DROS * | controller_costmap_ros_ |
double | controller_frequency_ |
double | controller_patience_ |
std::vector < geometry_msgs::PoseStamped > * | controller_plan |
ros::Publisher | current_goal_pub_ |
std::string | global_frame_ |
tf::Stamped< tf::Pose > | global_pose_ |
ros::Subscriber | goal_sub_ |
double | inscribed_radius_ |
ros::Time | last_plan_swap_ |
ros::Time | last_valid_control_ |
ros::Time | last_valid_plan_ |
std::vector < geometry_msgs::PoseStamped > * | latest_plan |
ros::ServiceServer | make_plan_srv_ |
boost::mutex | plan_lock |
nav_core::BaseGlobalPlanner * | planner_ |
boost::condition_variable | planner_cond |
costmap_2d::Costmap2DROS * | planner_costmap_ros_ |
double | planner_frequency_ |
geometry_msgs::PoseStamped | planner_goal |
boost::unique_lock < boost::mutex > * | planner_lock |
boost::mutex | planner_mutex |
double | planner_patience_ |
std::vector < geometry_msgs::PoseStamped > * | planner_plan |
boost::thread * | planner_thread |
bool | recovery_behavior_enabled_ |
std::vector< boost::shared_ptr < nav_core::RecoveryBehavior > > | recovery_behaviors_ |
unsigned int | recovery_index_ |
pluginlib::ClassLoader < nav_core::RecoveryBehavior > | recovery_loader_ |
std::string | robot_base_frame_ |
bool | runPlanner |
bool | shutdown_costmaps_ |
MoveBaseState | state_ |
nav_core::BaseLocalPlanner * | tc_ |
tf::TransformListener & | tf_ |
ros::Publisher | vel_pub_ |
A class that uses the actionlib::ActionServer interface that moves the robot base to a goal location.
Definition at line 82 of file move_base.h.
move_base::MoveBase::MoveBase | ( | std::string | name, | |
tf::TransformListener & | tf | |||
) |
Constructor for the actions.
name | The name of the action | |
tf | A reference to a TransformListener |
Definition at line 41 of file move_base.cpp.
move_base::MoveBase::~MoveBase | ( | ) | [virtual] |
Destructor - Cleans up.
Definition at line 329 of file move_base.cpp.
void move_base::MoveBase::clearCostmapWindows | ( | double | size_x, | |
double | size_y | |||
) | [private] |
Clears obstacles within a window around the robot.
size_x | The x size of the window | |
size_y | The y size of the window |
Definition at line 208 of file move_base.cpp.
bool move_base::MoveBase::clearUnknownService | ( | std_srvs::Empty::Request & | req, | |
std_srvs::Empty::Response & | resp | |||
) | [private] |
A service call that clears unknown space in the robot's immediate area.
req | The service request | |
resp | The service response |
Definition at line 263 of file move_base.cpp.
void move_base::MoveBase::executeCb | ( | const move_base_msgs::MoveBaseGoalConstPtr & | move_base_goal | ) | [private] |
Definition at line 503 of file move_base.cpp.
bool move_base::MoveBase::executeCycle | ( | geometry_msgs::PoseStamped & | goal, | |
std::vector< geometry_msgs::PoseStamped > & | global_plan | |||
) |
Performs a control cycle.
goal | A reference to the goal to pursue | |
global_plan | A reference to the global plan being used |
Definition at line 604 of file move_base.cpp.
void move_base::MoveBase::goalCB | ( | const geometry_msgs::PoseStamped::ConstPtr & | goal | ) | [private] |
Definition at line 199 of file move_base.cpp.
geometry_msgs::PoseStamped move_base::MoveBase::goalToGlobalFrame | ( | const geometry_msgs::PoseStamped & | goal_pose_msg | ) | [private] |
Definition at line 419 of file move_base.cpp.
bool move_base::MoveBase::isQuaternionValid | ( | const geometry_msgs::Quaternion & | q | ) | [private] |
Definition at line 389 of file move_base.cpp.
void move_base::MoveBase::loadDefaultRecoveryBehaviors | ( | ) | [private] |
Loads the default recovery behaviors for the navigation stack.
Definition at line 848 of file move_base.cpp.
bool move_base::MoveBase::loadRecoveryBehaviors | ( | ros::NodeHandle | node | ) | [private] |
Load the recovery behaviors for the navigation stack from the parameter server.
node | The ros::NodeHandle to be used for loading parameters |
Definition at line 763 of file move_base.cpp.
bool move_base::MoveBase::makePlan | ( | const geometry_msgs::PoseStamped & | goal, | |
std::vector< geometry_msgs::PoseStamped > & | plan | |||
) | [private] |
Make a new global plan.
goal | The goal to plan to | |
plan | Will be filled in with the plan made by the planner |
Definition at line 355 of file move_base.cpp.
bool move_base::MoveBase::planService | ( | nav_msgs::GetPlan::Request & | req, | |
nav_msgs::GetPlan::Response & | resp | |||
) | [private] |
A service call that can be made when the action is inactive that will return a plan.
req | The goal request | |
resp | The plan request |
Definition at line 270 of file move_base.cpp.
void move_base::MoveBase::planThread | ( | ) | [private] |
Definition at line 443 of file move_base.cpp.
void move_base::MoveBase::publishZeroVelocity | ( | ) | [private] |
Publishes a velocity command of zero to the base.
Definition at line 380 of file move_base.cpp.
void move_base::MoveBase::resetState | ( | ) | [private] |
Reset the state of the move_base action and send a zero velocity command to the base.
Definition at line 886 of file move_base.cpp.
ros::Publisher move_base::MoveBase::action_goal_pub_ [private] |
Definition at line 186 of file move_base.h.
MoveBaseActionServer* move_base::MoveBase::as_ [private] |
Definition at line 170 of file move_base.h.
pluginlib::ClassLoader<nav_core::BaseGlobalPlanner> move_base::MoveBase::bgp_loader_ [private] |
Definition at line 196 of file move_base.h.
pluginlib::ClassLoader<nav_core::BaseLocalPlanner> move_base::MoveBase::blp_loader_ [private] |
Definition at line 197 of file move_base.h.
double move_base::MoveBase::circumscribed_radius_ [private] |
Definition at line 182 of file move_base.h.
ros::ServiceServer move_base::MoveBase::clear_unknown_srv_ [private] |
Definition at line 188 of file move_base.h.
double move_base::MoveBase::clearing_radius_ [private] |
Definition at line 185 of file move_base.h.
bool move_base::MoveBase::clearing_roatation_allowed_ [private] |
Definition at line 189 of file move_base.h.
Definition at line 193 of file move_base.h.
double move_base::MoveBase::conservative_reset_dist_ [private] |
Definition at line 185 of file move_base.h.
bool move_base::MoveBase::control_failure_recovery_ [private] |
Definition at line 190 of file move_base.h.
costmap_2d::Costmap2DROS * move_base::MoveBase::controller_costmap_ros_ [private] |
Definition at line 173 of file move_base.h.
double move_base::MoveBase::controller_frequency_ [private] |
Definition at line 182 of file move_base.h.
double move_base::MoveBase::controller_patience_ [private] |
Definition at line 184 of file move_base.h.
std::vector<geometry_msgs::PoseStamped>* move_base::MoveBase::controller_plan [private] |
Definition at line 204 of file move_base.h.
ros::Publisher move_base::MoveBase::current_goal_pub_ [private] |
Definition at line 186 of file move_base.h.
std::string move_base::MoveBase::global_frame_ [private] |
Definition at line 176 of file move_base.h.
tf::Stamped<tf::Pose> move_base::MoveBase::global_pose_ [private] |
Definition at line 181 of file move_base.h.
ros::Subscriber move_base::MoveBase::goal_sub_ [private] |
Definition at line 187 of file move_base.h.
double move_base::MoveBase::inscribed_radius_ [private] |
Definition at line 182 of file move_base.h.
ros::Time move_base::MoveBase::last_plan_swap_ [private] |
Definition at line 195 of file move_base.h.
ros::Time move_base::MoveBase::last_valid_control_ [private] |
Definition at line 195 of file move_base.h.
ros::Time move_base::MoveBase::last_valid_plan_ [private] |
Definition at line 195 of file move_base.h.
std::vector<geometry_msgs::PoseStamped>* move_base::MoveBase::latest_plan [private] |
Definition at line 203 of file move_base.h.
ros::ServiceServer move_base::MoveBase::make_plan_srv_ [private] |
Definition at line 188 of file move_base.h.
boost::mutex move_base::MoveBase::plan_lock [private] |
Definition at line 205 of file move_base.h.
nav_core::BaseGlobalPlanner* move_base::MoveBase::planner_ [private] |
Definition at line 175 of file move_base.h.
boost::condition_variable move_base::MoveBase::planner_cond [private] |
Definition at line 211 of file move_base.h.
costmap_2d::Costmap2DROS* move_base::MoveBase::planner_costmap_ros_ [private] |
Definition at line 173 of file move_base.h.
double move_base::MoveBase::planner_frequency_ [private] |
Definition at line 183 of file move_base.h.
geometry_msgs::PoseStamped move_base::MoveBase::planner_goal [private] |
Definition at line 212 of file move_base.h.
boost::unique_lock<boost::mutex>* move_base::MoveBase::planner_lock [private] |
Definition at line 210 of file move_base.h.
boost::mutex move_base::MoveBase::planner_mutex [private] |
Definition at line 209 of file move_base.h.
double move_base::MoveBase::planner_patience_ [private] |
Definition at line 184 of file move_base.h.
std::vector<geometry_msgs::PoseStamped>* move_base::MoveBase::planner_plan [private] |
Definition at line 202 of file move_base.h.
boost::thread* move_base::MoveBase::planner_thread [private] |
Definition at line 213 of file move_base.h.
bool move_base::MoveBase::recovery_behavior_enabled_ [private] |
Definition at line 189 of file move_base.h.
std::vector<boost::shared_ptr<nav_core::RecoveryBehavior> > move_base::MoveBase::recovery_behaviors_ [private] |
Definition at line 178 of file move_base.h.
unsigned int move_base::MoveBase::recovery_index_ [private] |
Definition at line 179 of file move_base.h.
pluginlib::ClassLoader<nav_core::RecoveryBehavior> move_base::MoveBase::recovery_loader_ [private] |
Definition at line 198 of file move_base.h.
std::string move_base::MoveBase::robot_base_frame_ [private] |
Definition at line 176 of file move_base.h.
bool move_base::MoveBase::runPlanner [private] |
Definition at line 208 of file move_base.h.
bool move_base::MoveBase::shutdown_costmaps_ [private] |
Definition at line 189 of file move_base.h.
MoveBaseState move_base::MoveBase::state_ [private] |
Definition at line 192 of file move_base.h.
nav_core::BaseLocalPlanner* move_base::MoveBase::tc_ [private] |
Definition at line 172 of file move_base.h.
tf::TransformListener& move_base::MoveBase::tf_ [private] |
Definition at line 168 of file move_base.h.
ros::Publisher move_base::MoveBase::vel_pub_ [private] |
Definition at line 186 of file move_base.h.