SMACC2
|
#include <component.hpp>
Public Member Functions | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Protected Member Functions | |
virtual void | onInitialize () |
template<typename TOrthogonal , typename TClient > | |
void | onComponentInitialization () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onStateOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist) |
template<typename TComponent > | |
void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist) |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
template<typename TComponent > | |
void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
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 | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Private Member Functions | |
void | initialize (ISmaccClient *owner) |
void | setStateMachine (ISmaccStateMachine *stateMachine) |
Friends | |
class | ISmaccOrthogonal |
class | ISmaccClient |
Definition at line 29 of file component.hpp.
smacc2::ISmaccComponent::ISmaccComponent | ( | ) |
Definition at line 27 of file smacc_component.cpp.
|
virtual |
Definition at line 25 of file smacc_component.cpp.
|
protected |
Definition at line 121 of file smacc_component_impl.hpp.
References smacc2::ISmaccClient::createComponent(), and owner_.
|
protected |
Definition at line 127 of file smacc_component_impl.hpp.
References smacc2::ISmaccClient::createNamedComponent(), and owner_.
|
protected |
Definition at line 44 of file smacc_component.cpp.
References smacc2::ISmaccClient::getLogger(), and owner_.
Referenced by smacc2::client_core_components::CpActionClient< ActionType >::cancelGoal(), cl_nav2z::components::CpNav2ActionInterface::cancelNavigation(), smacc2::client_core_components::CpRos2Timer::cancelTimer(), cl_nav2z::odom_tracker::CpOdomTracker::clearPath(), cl_moveit2z::CpGraspingComponent::createGraspableBox(), cl_nav2z::CpCostmapSwitch::disable(), cl_nav2z::CpCostmapSwitch::enable(), cl_moveit2z::CpTrajectoryHistory::getLastTrajectory(), cl_nav2z::CpWaypointNavigatorBase::loadWayPointsFromFile(), cl_nav2z::CpWaypointNavigatorBase::loadWayPointsFromFile2(), cl_nav2z::CpWaypointNavigatorBase::loadWaypointsFromYamlParameter(), cl_nav2z::odom_tracker::CpOdomTracker::logStateString(), cl_nav2z::CpWaypointNavigatorBase::notifyGoalReached(), cl_keyboard::components::CpKeyboardListener1::onComponentInitialization(), cl_nav2z::components::CpNav2ActionInterface::onComponentInitialization(), smacc2::client_core_components::CpActionClient< ActionType >::onComponentInitialization(), cl_nav2z::CpWaypointNavigator::onGoalReached(), cl_nav2z::components::CpNav2ActionInterface::onInitialize(), cl_nav2z::CpCostmapSwitch::onInitialize(), cl_nav2z::CpPose::onInitialize(), cl_nav2z::odom_tracker::CpOdomTracker::onInitialize(), cl_nav2z::Pose::onInitialize(), cl_ros2_timer::components::CpTimerListener1::onInitialize(), smacc2::client_core_components::CpActionClient< ActionType >::onInitialize(), smacc2::client_core_components::CpRos2Timer::onInitialize(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onInitialize(), cl_nav2z::components::CpNav2ActionInterface::onNavigationAbortedCallback(), cl_nav2z::components::CpNav2ActionInterface::onNavigationCancelledCallback(), cl_nav2z::components::CpNav2ActionInterface::onNavigationFeedbackCallback(), cl_nav2z::components::CpNav2ActionInterface::onNavigationSuccessCallback(), smacc2::client_core_components::CpActionClient< ActionType >::onResult(), cl_ros2_timer::components::CpTimerListener1::onStateOrthogonalAllocation(), cl_ros2_timer::components::CpTimerListener1::onTimerTickCallback(), cl_nav2z::odom_tracker::CpOdomTracker::parametersCallback(), cl_nav2z::odom_tracker::CpOdomTracker::popPath(), cl_keyboard::components::CpKeyboardListener1::postKeyEvent(), smacc2::client_core_components::CpActionClient< ActionType >::postResultEvent(), cl_nav2z::odom_tracker::CpOdomTracker::processNewPose(), cl_nav2z::odom_tracker::CpOdomTracker::pushPath(), cl_moveit2z::CpTrajectoryHistory::pushTrajectory(), cl_nav2z::CpCostmapSwitch::registerProxyFromDynamicReconfigureServer(), requiresComponent(), requiresComponent(), cl_nav2z::CpWaypointNavigatorBase::seekName(), cl_nav2z::components::CpNav2ActionInterface::sendGoal(), smacc2::client_core_components::CpActionClient< ActionType >::sendGoal(), cl_nav2z::components::CpNav2ActionInterface::sendNavigationGoal(), cl_nav2z::CpWaypointNavigator::sendNextGoal(), cl_nav2z::CpPlannerSwitcher::setBackwardPlanner(), cl_nav2z::odom_tracker::CpOdomTracker::setCurrentPathName(), cl_nav2z::CpPlannerSwitcher::setForwardPlanner(), cl_nav2z::CpGoalCheckerSwitcher::setGoalCheckerId(), cl_nav2z::CpPlannerSwitcher::setPureSpinningPlanner(), cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint(), cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint(), cl_nav2z::CpPlannerSwitcher::setUndoPathBackwardPlanner(), cl_nav2z::odom_tracker::CpOdomTracker::setWorkingMode(), smacc2::client_core_components::CpRos2Timer::startTimer(), smacc2::client_core_components::CpRos2Timer::stopTimer(), smacc2::client_core_components::CpRos2Timer::timerCallback(), cl_nav2z::CpPose::toPoseStampedMsg(), cl_nav2z::Pose::toPoseStampedMsg(), cl_nav2z::CpPose::update(), cl_nav2z::odom_tracker::CpOdomTracker::update(), cl_nav2z::Pose::update(), cl_nav2z::odom_tracker::CpOdomTracker::updateClearPath(), cl_nav2z::odom_tracker::CpOdomTracker::updateRecordPath(), smacc2::client_core_components::CpActionClient< ActionType >::waitForServer(), cl_nav2z::CpPose::waitTransformUpdate(), and cl_nav2z::Pose::waitTransformUpdate().
|
virtual |
Reimplemented in cl_nav2z::CpAmcl, and cl_nav2z::CpAmcl.
Definition at line 46 of file smacc_component.cpp.
References smacc2::introspection::demangleSymbol().
Referenced by smacc2::client_core_components::CpActionClient< ActionType >::cancelGoal(), smacc2::client_core_components::CpRos2Timer::cancelTimer(), cl_moveit2z::CpGraspingComponent::createGraspableBox(), cl_moveit2z::CpTrajectoryHistory::getLastTrajectory(), smacc2::client_core_components::CpActionClient< ActionType >::onComponentInitialization(), smacc2::client_core_components::CpActionClient< ActionType >::onInitialize(), smacc2::client_core_components::CpRos2Timer::onInitialize(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onInitialize(), smacc2::client_core_components::CpActionClient< ActionType >::onResult(), smacc2::client_core_components::CpActionClient< ActionType >::postResultEvent(), cl_moveit2z::CpTrajectoryHistory::pushTrajectory(), smacc2::client_core_components::CpActionClient< ActionType >::sendGoal(), cl_nav2z::CpWaypointNavigator::sendNextGoal(), smacc2::client_core_components::CpRos2Timer::startTimer(), smacc2::client_core_components::CpRos2Timer::stopTimer(), smacc2::client_core_components::CpRos2Timer::timerCallback(), and smacc2::client_core_components::CpActionClient< ActionType >::waitForServer().
|
protected |
Definition at line 42 of file smacc_component.cpp.
References smacc2::ISmaccClient::getNode(), and owner_.
Referenced by cl_nav2z::odom_tracker::CpOdomTracker::clearPath(), cl_nav2z::CpWaypointsVisualizer::createMarker(), cl_nav2z::CpWaypointsVisualizer::createMarkerLabel(), cl_nav2z::CpPose::freezeReferenceFrame(), cl_nav2z::Pose::freezeReferenceFrame(), cl_nav2z::CpWaypointNavigatorBase::loadWaypointsFromYamlParameter(), cl_nav2z::CpAmcl::onInitialize(), cl_nav2z::CpGoalCheckerSwitcher::onInitialize(), cl_nav2z::CpPlannerSwitcher::onInitialize(), cl_nav2z::CpPose::onInitialize(), cl_nav2z::CpWaypointsVisualizer::onInitialize(), cl_nav2z::odom_tracker::CpOdomTracker::onInitialize(), cl_nav2z::Pose::onInitialize(), smacc2::client_core_components::CpActionClient< ActionType >::onInitialize(), smacc2::client_core_components::CpRos2Timer::onInitialize(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onInitialize(), cl_nav2z::odom_tracker::CpOdomTracker::processNewPose(), cl_nav2z::CpCostmapSwitch::registerProxyFromDynamicReconfigureServer(), cl_nav2z::odom_tracker::CpOdomTracker::setOdomFrame(), cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint(), cl_nav2z::CpPose::update(), cl_nav2z::CpWaypointsVisualizer::update(), cl_nav2z::Pose::update(), cl_nav2z::odom_tracker::CpOdomTracker::updateConfiguration(), cl_nav2z::odom_tracker::CpOdomTracker::updateRecordPath(), cl_nav2z::CpPose::waitTransformUpdate(), and cl_nav2z::Pose::waitTransformUpdate().
|
protected |
Definition at line 52 of file smacc_component.cpp.
References stateMachine_.
Referenced by smacc2::client_core_components::CpActionClient< ActionType >::onAborted(), smacc2::client_core_components::CpActionClient< ActionType >::onCancelled(), smacc2::client_core_components::CpActionClient< ActionType >::onFeedback(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onFirstMessageReceived(), cl_keyboard::components::CpKeyboardListener1::OnKeyPress(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onMessageReceived(), cl_nav2z::components::CpNav2ActionInterface::onNavigationAborted(), cl_nav2z::components::CpNav2ActionInterface::onNavigationCancelled(), cl_nav2z::components::CpNav2ActionInterface::onNavigationFeedback(), cl_nav2z::components::CpNav2ActionInterface::onNavigationSucceeded(), smacc2::client_core_components::CpActionClient< ActionType >::onSucceeded(), cl_ros2_timer::components::CpTimerListener1::onTimerCompleted(), and smacc2::client_core_components::CpRos2Timer::onTimerTick().
|
private |
Definition at line 29 of file smacc_component.cpp.
References onInitialize(), and owner_.
|
protected |
Definition at line 134 of file smacc_component_impl.hpp.
|
protectedvirtual |
Reimplemented in cl_nav2z::components::CpNav2ActionInterface, cl_nav2z::CpAmcl, cl_nav2z::CpAmcl, cl_nav2z::CpCostmapSwitch, cl_nav2z::CpCostmapSwitch, cl_nav2z::CpGoalCheckerSwitcher, cl_nav2z::CpGoalCheckerSwitcher, cl_nav2z::CpPlannerSwitcher, cl_nav2z::CpPlannerSwitcher, cl_nav2z::CpPose, cl_nav2z::CpWaypointNavigator, cl_nav2z::CpWaypointNavigator, cl_nav2z::CpWaypointNavigatorBase, cl_nav2z::CpWaypointNavigatorBase, cl_nav2z::CpWaypointsVisualizer, cl_nav2z::CpWaypointsVisualizer, cl_nav2z::odom_tracker::CpOdomTracker, cl_nav2z::odom_tracker::CpOdomTracker, cl_nav2z::Pose, cl_ros2_timer::components::CpTimerListener1, smacc2::client_core_components::CpActionClient< ActionType >, smacc2::client_core_components::CpActionClient< ActionT >, smacc2::client_core_components::CpActionClient< nav2_msgs::action::NavigateToPose >, smacc2::client_core_components::CpRos2Timer, smacc2::client_core_components::CpTopicPublisher< MessageType >, and smacc2::client_core_components::CpTopicSubscriber< MessageType >.
Definition at line 35 of file smacc_component.cpp.
Referenced by initialize().
|
inlineprotected |
Definition at line 58 of file component.hpp.
|
inlineprotected |
Definition at line 64 of file component.hpp.
|
protected |
Definition at line 37 of file smacc_component_impl.hpp.
References smacc2::ISmaccStateMachine::postEvent(), and stateMachine_.
Referenced by cl_nav2z::CpWaypointNavigatorBase::notifyGoalReached(), cl_nav2z::components::CpNav2ActionInterface::onComponentInitialization(), smacc2::client_core_components::CpActionClient< ActionType >::onComponentInitialization(), cl_ros2_timer::components::CpTimerListener1::onStateOrthogonalAllocation(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onStateOrthogonalAllocation(), cl_keyboard::components::CpKeyboardListener1::postKeyEvent(), and smacc2::client_core_components::CpActionClient< ActionType >::postResultEvent().
|
protected |
Definition at line 31 of file smacc_component_impl.hpp.
References smacc2::ISmaccStateMachine::postEvent(), and stateMachine_.
|
protected |
Definition at line 115 of file smacc_component_impl.hpp.
References owner_, and smacc2::ISmaccClient::requiresClient().
|
protected |
Definition at line 53 of file smacc_component_impl.hpp.
References smacc2::HARD, requiresComponent(), and smacc2::SOFT.
|
protected |
Definition at line 88 of file smacc_component_impl.hpp.
References smacc2::introspection::demangleSymbol(), smacc2::ISmaccClient::getComponent(), smacc2::ISmaccClient::getComponents(), getLogger(), smacc2::HARD, and owner_.
|
protected |
Definition at line 44 of file smacc_component_impl.hpp.
References smacc2::HARD, requiresComponent(), and smacc2::SOFT.
Referenced by cl_keyboard::components::CpKeyboardListener1::onComponentInitialization(), cl_nav2z::components::CpNav2ActionInterface::onInitialize(), cl_nav2z::CpWaypointNavigator::onInitialize(), cl_nav2z::CpWaypointsVisualizer::onInitialize(), cl_nav2z::odom_tracker::CpOdomTracker::onInitialize(), cl_ros2_timer::components::CpTimerListener1::onInitialize(), cl_nav2z::CpWaypointNavigator::onStateOrthogonalAllocation(), requiresComponent(), requiresComponent(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
protected |
Definition at line 62 of file smacc_component_impl.hpp.
References smacc2::introspection::demangleSymbol(), smacc2::ISmaccClient::getComponent(), smacc2::ISmaccClient::getComponents(), getLogger(), smacc2::HARD, and owner_.
|
private |
Definition at line 37 of file smacc_component.cpp.
References stateMachine_.
|
friend |
Definition at line 123 of file component.hpp.
|
friend |
Definition at line 122 of file component.hpp.
|
protected |
Definition at line 112 of file component.hpp.
Referenced by createSiblingComponent(), createSiblingNamedComponent(), getLogger(), getNode(), initialize(), cl_nav2z::CpCostmapSwitch::onInitialize(), cl_nav2z::CpWaypointNavigator::onStateOrthogonalAllocation(), cl_nav2z::CpWaypointNavigatorBase::onStateOrthogonalAllocation(), requiresClient(), requiresComponent(), requiresComponent(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
protected |
Definition at line 110 of file component.hpp.
Referenced by getStateMachine(), postEvent(), postEvent(), and setStateMachine().