Public Member Functions | |
void | SetUp () |
Public Member Functions inherited from ComputeRobotPoseFixture | |
void | SetUp () |
Public Member Functions inherited from AbstractControllerExecutionFixture | |
AbstractControllerExecutionFixture () | |
void | TearDown () override |
Public Member Functions inherited from mbf_abstract_nav::AbstractControllerExecution | |
AbstractControllerExecution (const std::string &name, const mbf_abstract_core::AbstractController::Ptr &controller_ptr, const ros::Publisher &vel_pub, const ros::Publisher &goal_pub, const TFPtr &tf_listener_ptr, const MoveBaseFlexConfig &config) | |
Constructor. More... | |
virtual bool | cancel () |
Cancel the controller execution. Normally called upon aborting the navigation. This calls the cancel method of the controller plugin. If the plugins returns true, it becomes responsible of stopping, and we will keep requesting velocity commands until it returns CANCELED. If it returns false (meaning cancel is not implemented, or that the controller defers handling it), MBF will set the cancel_ flag to true, and wait for the control loop to stop. More... | |
ros::Time | getLastPluginCallTime () const |
Returns the time of the last plugin call. More... | |
ControllerState | getState () const |
Return the current state of the controller execution. Thread communication safe. More... | |
geometry_msgs::TwistStamped | getVelocityCmd () const |
Returns the last velocity command calculated by the plugin. Set by setVelocityCmd method. Note that it doesn't need to be a valid command sent to the robot, as we report also failed calls to the plugin on controller action feedback. More... | |
bool | isMoving () const |
Returns whether the robot should normally move or not. True if the controller seems to work properly. More... | |
bool | isPatienceExceeded () const |
Checks whether the patience duration time has been exceeded, ot not. More... | |
void | reconfigure (const MoveBaseFlexConfig &config) |
Is called by the server thread to reconfigure the controller execution, if a user uses dynamic reconfigure to reconfigure the current state. More... | |
bool | setControllerFrequency (double frequency) |
Sets the controller frequency. More... | |
void | setNewPlan (const std::vector< geometry_msgs::PoseStamped > &plan, bool tolerance_from_action=false, double action_dist_tolerance=1.0, double action_angle_tolerance=3.1415) |
Sets a new plan to the controller execution. More... | |
virtual bool | start () |
Starts the controller, a valid plan should be given in advance. More... | |
virtual | ~AbstractControllerExecution () |
Destructor. More... | |
Public Member Functions inherited from mbf_abstract_nav::AbstractExecutionBase | |
AbstractExecutionBase (const std::string &name) | |
const std::string & | getMessage () const |
Gets the current plugin execution message. More... | |
const std::string & | getName () const |
Returns the name of the corresponding plugin. More... | |
uint32_t | getOutcome () const |
Gets the current plugin execution outcome. More... | |
void | join () |
virtual void | postRun () |
Optional implementation-specific cleanup function, called right after execution. More... | |
virtual void | preRun () |
Optional implementation-specific setup function, called right before execution. More... | |
virtual void | reconfigure (MoveBaseFlexConfig &_cfg) |
Optional implementaiton-specific configuration function. More... | |
virtual void | stop () |
boost::cv_status | waitForStateUpdate (boost::chrono::microseconds const &duration) |
virtual | ~AbstractExecutionBase () |
Additional Inherited Members | |
Public Types inherited from mbf_abstract_nav::AbstractControllerExecution | |
enum | ControllerState { INITIALIZED, STARTED, PLANNING, NO_PLAN, MAX_RETRIES, PAT_EXCEEDED, EMPTY_PLAN, INVALID_PLAN, NO_LOCAL_CMD, GOT_LOCAL_CMD, ARRIVED_GOAL, CANCELED, STOPPED, INTERNAL_ERROR } |
Internal states. More... | |
typedef boost::shared_ptr< AbstractControllerExecution > | Ptr |
Static Public Attributes inherited from mbf_abstract_nav::AbstractControllerExecution | |
static const double | DEFAULT_CONTROLLER_FREQUENCY = 100.0 |
Protected Member Functions inherited from mbf_abstract_nav::AbstractControllerExecution | |
virtual uint32_t | computeVelocityCmd (const geometry_msgs::PoseStamped &pose, const geometry_msgs::TwistStamped &velocity, geometry_msgs::TwistStamped &vel_cmd, std::string &message) |
Request plugin for a new velocity command, given the current position, orientation, and velocity of the robot. We use this virtual method to give concrete implementations as move_base the chance to override it and do additional stuff, for example locking the costmap. More... | |
virtual void | run () |
The main run method, a thread will execute this method. It contains the main controller execution loop. More... | |
virtual bool | safetyCheck () |
Check if its safe to drive. This method gets called at every controller cycle, stopping the robot if its not. When overridden by child class, gives a chance to the specific execution implementation to stop the robot if it detects something wrong on the underlying map. More... | |
void | setVelocityCmd (const geometry_msgs::TwistStamped &vel_cmd_stamped) |
Sets the velocity command, to make it available for another thread. More... | |
Protected Attributes inherited from mbf_abstract_nav::AbstractControllerExecution | |
mbf_abstract_core::AbstractController::Ptr | controller_ |
the local planer to calculate the velocity command More... | |
std::string | global_frame_ |
the global frame the robot is controlling in. More... | |
ros::Time | last_call_time_ |
The current cycle start time of the last cycle run. Will by updated each cycle. More... | |
ros::Time | last_valid_cmd_time_ |
The time the controller responded with a success output (output < 10). More... | |
int | max_retries_ |
The maximum number of retries. More... | |
ros::Duration | patience_ |
The time / duration of patience, before changing the state. More... | |
std::string | plugin_name_ |
the name of the loaded plugin More... | |
std::string | robot_frame_ |
the frame of the robot, which will be used to determine its position. More... | |
ros::Time | start_time_ |
The time the controller has been started. More... | |
const TFPtr & | tf_listener_ptr |
shared pointer to the shared tf listener More... | |
Protected Attributes inherited from mbf_abstract_nav::AbstractExecutionBase | |
bool | cancel_ |
flag for canceling controlling More... | |
boost::condition_variable | condition_ |
condition variable to wake up control thread More... | |
std::string | message_ |
the last received plugin execution message More... | |
std::string | name_ |
the plugin name; not the plugin type! More... | |
uint32_t | outcome_ |
the last received plugin execution outcome More... | |
boost::thread | thread_ |
the controlling thread object More... | |
Definition at line 221 of file test/abstract_controller_execution.cpp.
|
inline |
Definition at line 223 of file test/abstract_controller_execution.cpp.