SMACC2
|
#include <planner_switcher.hpp>
Public Member Functions | |
PlannerSwitcher () | |
void | onInitialize () override |
void | setDesiredGlobalPlanner (std::string) |
void | setDesiredController (std::string) |
void | commitPublish () |
void | setBackwardPlanner (bool commit=true) |
void | setUndoPathBackwardPlanner (bool commit=true) |
void | setForwardPlanner (bool commit=true) |
void | setPureSpinningPlanner (bool commit=true) |
void | setDefaultPlanners (bool commit=true) |
Public Member Functions inherited from smacc2::ISmaccComponent | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Private Attributes | |
std::string | desired_planner_ |
std::string | desired_controller_ |
bool | set_planners_mode_flag_ |
rclcpp::Publisher< std_msgs::msg::String >::SharedPtr | planner_selector_pub_ |
rclcpp::Publisher< std_msgs::msg::String >::SharedPtr | controller_selector_pub_ |
rclcpp::Publisher< std_msgs::msg::String >::SharedPtr | goal_checker_selector_pub_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
virtual void | onInitialize () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist=false) |
template<typename TComponent > | |
void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist=false) |
template<typename TClient > | |
void | requiresClient (TClient *&requiredClientStorage) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingNamedComponent (std::string name, TArgs... targs) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () const |
ISmaccStateMachine * | getStateMachine () |
Protected Attributes inherited from smacc2::ISmaccComponent | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Definition at line 31 of file planner_switcher.hpp.
cl_nav2z::PlannerSwitcher::PlannerSwitcher | ( | ) |
Definition at line 27 of file planner_switcher.cpp.
void cl_nav2z::PlannerSwitcher::commitPublish | ( | ) |
Definition at line 98 of file planner_switcher.cpp.
References controller_selector_pub_, desired_controller_, desired_planner_, and planner_selector_pub_.
Referenced by setBackwardPlanner(), setDefaultPlanners(), setForwardPlanner(), setPureSpinningPlanner(), and setUndoPathBackwardPlanner().
|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 29 of file planner_switcher.cpp.
References controller_selector_pub_, smacc2::ISmaccComponent::getNode(), and planner_selector_pub_.
void cl_nav2z::PlannerSwitcher::setBackwardPlanner | ( | bool | commit = true | ) |
Definition at line 60 of file planner_switcher.cpp.
References commitPublish(), desired_controller_, desired_planner_, and smacc2::ISmaccComponent::getLogger().
Referenced by cl_nav2z::CbNavigateBackwards::onEntry().
void cl_nav2z::PlannerSwitcher::setDefaultPlanners | ( | bool | commit = true | ) |
Definition at line 90 of file planner_switcher.cpp.
References commitPublish(), desired_controller_, and desired_planner_.
Referenced by cl_nav2z::WaypointNavigator::sendNextGoal().
void cl_nav2z::PlannerSwitcher::setDesiredController | ( | std::string | controllerName | ) |
Definition at line 45 of file planner_switcher.cpp.
References desired_controller_.
void cl_nav2z::PlannerSwitcher::setDesiredGlobalPlanner | ( | std::string | plannerName | ) |
Definition at line 40 of file planner_switcher.cpp.
References desired_planner_.
void cl_nav2z::PlannerSwitcher::setForwardPlanner | ( | bool | commit = true | ) |
Definition at line 70 of file planner_switcher.cpp.
References commitPublish(), desired_controller_, desired_planner_, and smacc2::ISmaccComponent::getLogger().
Referenced by cl_nav2z::CbNavigateForward::onEntry().
void cl_nav2z::PlannerSwitcher::setPureSpinningPlanner | ( | bool | commit = true | ) |
Definition at line 80 of file planner_switcher.cpp.
References commitPublish(), desired_controller_, desired_planner_, and smacc2::ISmaccComponent::getLogger().
Referenced by cl_nav2z::CbAbsoluteRotate::onEntry(), and cl_nav2z::CbRotate::onEntry().
void cl_nav2z::PlannerSwitcher::setUndoPathBackwardPlanner | ( | bool | commit = true | ) |
Definition at line 50 of file planner_switcher.cpp.
References commitPublish(), desired_controller_, desired_planner_, and smacc2::ISmaccComponent::getLogger().
|
private |
Definition at line 66 of file planner_switcher.hpp.
Referenced by commitPublish(), and onInitialize().
|
private |
Definition at line 60 of file planner_switcher.hpp.
Referenced by commitPublish(), setBackwardPlanner(), setDefaultPlanners(), setDesiredController(), setForwardPlanner(), setPureSpinningPlanner(), and setUndoPathBackwardPlanner().
|
private |
Definition at line 58 of file planner_switcher.hpp.
Referenced by commitPublish(), setBackwardPlanner(), setDefaultPlanners(), setDesiredGlobalPlanner(), setForwardPlanner(), setPureSpinningPlanner(), and setUndoPathBackwardPlanner().
|
private |
Definition at line 68 of file planner_switcher.hpp.
|
private |
Definition at line 64 of file planner_switcher.hpp.
Referenced by commitPublish(), and onInitialize().
|
private |
Definition at line 62 of file planner_switcher.hpp.