SMACC2
|
#include <smacc_client_behavior_base.hpp>
Public Member Functions | |
ISmaccClientBehavior () | |
virtual | ~ISmaccClientBehavior () |
ISmaccStateMachine * | getStateMachine () |
std::string | getName () const |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
template<typename SmaccComponentType > | |
void | requiresComponent (SmaccComponentType *&storage, bool throwExceptionIfNotExist=false) |
virtual void | onEntry () |
virtual void | onExit () |
virtual void | executeOnEntry () |
virtual void | executeOnExit () |
Protected Member Functions | |
virtual void | runtimeConfigure () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
ISmaccState * | getCurrentState () |
virtual void | dispose () |
virtual rclcpp::Node::SharedPtr | getNode () const |
virtual rclcpp::Logger | getLogger () const |
Private Member Functions | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
Private Attributes | |
ISmaccStateMachine * | stateMachine_ |
ISmaccState * | currentState |
smacc2::ISmaccOrthogonal * | currentOrthogonal |
Friends | |
class | ISmaccState |
class | ISmaccOrthogonal |
class | ISmaccAsynchronousClientBehavior |
Definition at line 29 of file smacc_client_behavior_base.hpp.
smacc2::ISmaccClientBehavior::ISmaccClientBehavior | ( | ) |
Definition at line 25 of file smacc_client_behavior_base.cpp.
References currentState, and stateMachine_.
|
virtual |
Definition at line 31 of file smacc_client_behavior_base.cpp.
References getLogger(), and getName().
|
protectedvirtual |
Reimplemented in smacc2::SmaccAsyncClientBehavior.
Definition at line 77 of file smacc_client_behavior_base.cpp.
|
virtual |
Reimplemented in smacc2::SmaccAsyncClientBehavior.
Definition at line 63 of file smacc_client_behavior_base.cpp.
References getLogger(), getName(), and onEntry().
|
virtual |
Reimplemented in smacc2::SmaccAsyncClientBehavior.
Definition at line 70 of file smacc_client_behavior_base.cpp.
References getLogger(), getName(), and onExit().
|
inlineprotected |
Definition at line 64 of file smacc_client_behavior_impl.hpp.
References currentState.
Referenced by cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbRotate::onEntry(), and smacc2::client_behaviors::CbSequence::then().
|
protectedvirtual |
Definition at line 43 of file smacc_client_behavior_base.cpp.
References getNode().
Referenced by cl_nav2z::CbNavigateBackwards::CbNavigateBackwards(), cl_move_group_interface::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), cl_move_group_interface::CbMoveEndEffectorTrajectory::computeJointSpaceTrajectory(), smacc2::SmaccAsyncClientBehavior::dispose(), cl_nav2z::CbNavigateGlobalPosition::execute(), cl_move_group_interface::CbMoveEndEffectorTrajectory::executeJointSpaceTrajectory(), executeOnEntry(), smacc2::SmaccAsyncClientBehavior::executeOnEntry(), executeOnExit(), smacc2::SmaccAsyncClientBehavior::executeOnExit(), cl_move_group_interface::CbCircularPivotMotion::generateTrajectory(), cl_move_group_interface::CbMoveCartesianRelative2::generateTrajectory(), cl_move_group_interface::CbCircularPouringMotion::generateTrajectory(), cl_move_group_interface::CbMoveEndEffectorTrajectory::initializeROS(), cl_nav2z::CbNav2ZClientBehaviorBase::isOwnActionResponse(), cl_move_group_interface::CbMoveKnownState::loadJointStatesFromFile(), cl_move_group_interface::CbMoveJoints::moveJoints(), cl_move_group_interface::CbMoveEndEffectorRelative::moveRelative(), cl_move_group_interface::CbMoveCartesianRelative::moveRelativeCartesian(), cl_move_group_interface::CbMoveEndEffector::moveToAbsolutePose(), smacc2::client_behaviors::CbServiceCall< ServiceType >::onEntry(), smacc2::client_behaviors::CbRosLaunch::onEntry(), smacc2::client_behaviors::CbSequence::onEntry(), smacc2::client_behaviors::CbWaitActionServer::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::onEntry(), smacc2::SmaccClientBehavior::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_move_group_interface::CbEndEffectorRotate::onEntry(), cl_move_group_interface::CbMoveEndEffector::onEntry(), cl_move_group_interface::CbMoveEndEffectorRelative::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry(), cl_move_group_interface::CbMoveLastTrajectoryInitialState::onEntry(), cl_move_group_interface::CbUndoLastTrajectory::onEntry(), cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onEntry(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbNavigateNextWaypoint::onEntry(), cl_nav2z::CbPauseSlam::onEntry(), cl_nav2z::CbResumeSlam::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbUndoPathBackwards::onEntry(), cl_nav2z::CbWaitNav2Nodes::onEntry(), cl_nav2z::CbWaitPose::onEntry(), cl_nav2z::CbWaitTransform::onEntry(), smacc2::SmaccClientBehavior::onExit(), cl_nav2z::CbNavigateGlobalPosition::onExit(), cl_nav2z::CbUndoPathBackwards::onExit(), cl_nav2z::CbWaitNav2Nodes::onMessageReceived(), smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::onMessageReceived(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationActionAbort(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationActionSuccess(), cl_nav2z::CbNavigateNextWaypointUntilReached::onNavigationActionSuccess(), cl_lifecyclenode::CbConfigure::onOrthogonalAllocation(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onOrthogonalAllocation(), cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onOrthogonalAllocation(), smacc2::client_behaviors::CbServiceCall< ServiceType >::onServiceResponse(), smacc2::client_behaviors::CbSequence::onSubNodeAbort(), smacc2::client_behaviors::CbSequence::onSubNodeSuccess(), postEvent(), cl_keyboard::CbDefaultKeyboardBehavior::postKeyEvent(), smacc2::client_behaviors::CbSequence::recursiveConsumeNext(), smacc2::SmaccAsyncClientBehavior::requestForceFinish(), requiresComponent(), runtimeConfigure(), cl_nav2z::CbNav2ZClientBehaviorBase::sendGoal(), cl_nav2z::CbNavigateForward::setForwardDistance(), smacc2::client_behaviors::CbSequence::then(), cl_nav2z::CbAbsoluteRotate::updateTemporalBehaviorParameters(), smacc2::SmaccAsyncClientBehavior::waitFutureIfNotFinished(), and ~ISmaccClientBehavior().
std::string smacc2::ISmaccClientBehavior::getName | ( | ) | const |
Definition at line 36 of file smacc_client_behavior_base.cpp.
References smacc2::introspection::demangleSymbol().
Referenced by cl_move_group_interface::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), cl_move_group_interface::CbMoveEndEffectorTrajectory::computeJointSpaceTrajectory(), smacc2::SmaccAsyncClientBehavior::dispose(), cl_move_group_interface::CbMoveEndEffectorTrajectory::executeJointSpaceTrajectory(), executeOnEntry(), smacc2::SmaccAsyncClientBehavior::executeOnEntry(), executeOnExit(), smacc2::SmaccAsyncClientBehavior::executeOnExit(), cl_move_group_interface::CbCircularPivotMotion::generateTrajectory(), cl_move_group_interface::CbMoveCartesianRelative2::generateTrajectory(), cl_move_group_interface::CbCircularPouringMotion::generateTrajectory(), cl_move_group_interface::CbMoveEndEffectorTrajectory::initializeROS(), cl_nav2z::CbNav2ZClientBehaviorBase::isOwnActionResponse(), cl_move_group_interface::CbMoveKnownState::loadJointStatesFromFile(), cl_move_group_interface::CbMoveJoints::moveJoints(), smacc2::client_behaviors::CbServiceCall< ServiceType >::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), smacc2::SmaccClientBehavior::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_move_group_interface::CbEndEffectorRotate::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry(), cl_move_group_interface::CbMoveLastTrajectoryInitialState::onEntry(), cl_move_group_interface::CbUndoLastTrajectory::onEntry(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbUndoPathBackwards::onEntry(), smacc2::SmaccClientBehavior::onExit(), cl_nav2z::CbUndoPathBackwards::onExit(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationActionAbort(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationActionSuccess(), cl_nav2z::CbNavigateNextWaypointUntilReached::onNavigationActionSuccess(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onOrthogonalAllocation(), smacc2::client_behaviors::CbServiceCall< ServiceType >::onServiceResponse(), smacc2::SmaccAsyncClientBehavior::requestForceFinish(), runtimeConfigure(), cl_nav2z::CbNav2ZClientBehaviorBase::sendGoal(), cl_nav2z::CbNavigateForward::setForwardDistance(), cl_nav2z::CbAbsoluteRotate::updateTemporalBehaviorParameters(), smacc2::SmaccAsyncClientBehavior::waitFutureIfNotFinished(), and ~ISmaccClientBehavior().
|
protectedvirtual |
Definition at line 38 of file smacc_client_behavior_base.cpp.
References smacc2::ISmaccStateMachine::getNode(), and stateMachine_.
Referenced by cl_move_group_interface::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), cl_move_group_interface::CbMoveEndEffectorTrajectory::createMarkers(), cl_move_group_interface::CbCircularPivotMotion::createMarkers(), cl_move_group_interface::CbCircularPouringMotion::createMarkers(), cl_move_group_interface::CbMoveCartesianRelative2::generateTrajectory(), cl_move_group_interface::CbCircularPouringMotion::generateTrajectory(), cl_move_group_interface::CbMoveEndEffectorTrajectory::getCurrentEndEffectorPose(), getLogger(), cl_move_group_interface::CbMoveEndEffectorTrajectory::initializeROS(), smacc2::client_behaviors::CbServiceCall< ServiceType >::onEntry(), smacc2::client_behaviors::CbSequence::onEntry(), smacc2::client_behaviors::CbWaitNode::onEntry(), smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbEndEffectorRotate::onEntry(), cl_move_group_interface::CbMoveCartesianRelative::onEntry(), cl_move_group_interface::CbMoveEndEffector::onEntry(), cl_move_group_interface::CbMoveEndEffectorRelative::onEntry(), cl_move_group_interface::CbMoveJoints::onEntry(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbUndoPathBackwards::onEntry(), cl_nav2z::CbWaitNav2Nodes::onEntry(), cl_nav2z::CbWaitTransform::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onExit(), smacc2::SmaccAsyncClientBehavior::requestForceFinish(), cl_nav2z::CbAbsoluteRotate::updateTemporalBehaviorParameters(), and smacc2::SmaccAsyncClientBehavior::waitFutureIfNotFinished().
|
inline |
Definition at line 61 of file smacc_client_behavior_impl.hpp.
References stateMachine_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry(), smacc2::SmaccAsyncClientBehavior::onFailure(), smacc2::SmaccAsyncClientBehavior::onFinished(), smacc2::SmaccAsyncClientBehavior::onSuccess(), cl_ros_timer::CbTimerCountdownLoop::onTimerTick(), cl_ros_timer::CbTimerCountdownOnce::onTimerTick(), and cl_nav2z::CbNav2ZClientBehaviorBase::sendGoal().
|
inlinevirtual |
Reimplemented in cl_keyboard::CbDefaultKeyboardBehavior, smacc2::client_behaviors::CbServiceCall< ServiceType >, smacc2::client_behaviors::CbServiceCall< slam_toolbox::srv::Pause >, smacc2::client_behaviors::CbRosLaunch, smacc2::client_behaviors::CbSequence, smacc2::CbServiceServerCallbackBase< TService >, smacc2::client_behaviors::CbSubscriptionCallbackBase< TMsg >, smacc2::client_behaviors::CbWaitActionServer, smacc2::client_behaviors::CbWaitNode, smacc2::client_behaviors::CbWaitTopicMessage< TMessage >, smacc2::SmaccClientBehavior, cl_lifecyclenode::CbActivate, cl_lifecyclenode::CbCleanup, cl_lifecyclenode::CbConfigure, cl_lifecyclenode::CbDeactivate, cl_lifecyclenode::CbDestroy, cl_lifecyclenode::CbShutdown, cl_move_group_interface::CbAttachObject, cl_move_group_interface::CbDetachObject, cl_move_group_interface::CbEndEffectorRotate, cl_move_group_interface::CbExecuteLastTrajectory, cl_move_group_interface::CbMoveCartesianRelative, cl_move_group_interface::CbMoveEndEffector, cl_move_group_interface::CbMoveEndEffectorRelative, cl_move_group_interface::CbMoveEndEffectorTrajectory, cl_move_group_interface::CbMoveJoints, cl_move_group_interface::CbMoveKnownState, cl_move_group_interface::CbMoveLastTrajectoryInitialState, cl_move_group_interface::CbMoveNamedTarget, cl_move_group_interface::CbUndoLastTrajectory, cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >, cl_nav2z::CbAbortNavigation, cl_nav2z::CbAbsoluteRotate, cl_nav2z::CbNavigateBackwards, cl_nav2z::CbNavigateForward, cl_nav2z::CbNavigateGlobalPosition, cl_nav2z::CbNavigateNamedWaypoint, cl_nav2z::CbNavigateNextWaypoint, cl_nav2z::CbNavigateNextWaypointUntilReached, cl_nav2z::CbPauseSlam, cl_nav2z::CbResumeSlam, cl_nav2z::CbRotate, cl_nav2z::CbRotateLookAt, cl_nav2z::CbSeekWaypoint, cl_nav2z::CbStopNavigation, cl_nav2z::CbUndoPathBackwards, cl_nav2z::CbWaitNav2Nodes, cl_nav2z::CbWaitPose, cl_nav2z::CbWaitTransform, cl_ros_publisher::CbDefaultPublishLoop, cl_ros_publisher::CbMutedBehavior< RosMsgType >, cl_ros_publisher::CbPublishOnce< RosMsgType >, cl_ros_timer::CbTimer, cl_ros_timer::CbTimer, cl_ros_timer::CbTimerCountdownLoop, cl_ros_timer::CbTimerCountdownLoop, cl_ros_timer::CbTimerCountdownOnce, cl_ros_timer::CbTimerCountdownOnce, cl_ros_timer::CbTimer, cl_ros_timer::CbTimerCountdownLoop, and cl_ros_timer::CbTimerCountdownOnce.
Definition at line 46 of file smacc_client_behavior_base.hpp.
Referenced by executeOnEntry(), smacc2::SmaccAsyncClientBehavior::executeOnEntry(), and cl_move_group_interface::CbEndEffectorRotate::onEntry().
|
inlinevirtual |
Reimplemented in cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >, smacc2::client_behaviors::CbSequence, smacc2::SmaccClientBehavior, cl_move_group_interface::CbAttachObject, cl_move_group_interface::CbDetachObject, cl_move_group_interface::CbMoveCartesianRelative, cl_move_group_interface::CbMoveEndEffectorRelative, cl_move_group_interface::CbMoveEndEffectorTrajectory, cl_move_group_interface::CbMoveJoints, cl_move_group_interface::CbMoveNamedTarget, cl_nav2z::CbAbortNavigation, cl_nav2z::CbAbsoluteRotate, cl_nav2z::CbNavigateBackwards, cl_nav2z::CbNavigateForward, cl_nav2z::CbNavigateGlobalPosition, cl_nav2z::CbNavigateNamedWaypoint, cl_nav2z::CbNavigateNextWaypoint, cl_nav2z::CbNavigateNextWaypointUntilReached, cl_nav2z::CbSeekWaypoint, cl_nav2z::CbStopNavigation, cl_nav2z::CbUndoPathBackwards, cl_ros_publisher::CbDefaultPublishLoop, cl_ros_publisher::CbMutedBehavior< RosMsgType >, cl_ros_publisher::CbPublishOnce< RosMsgType >, cl_ros_timer::CbTimer, cl_ros_timer::CbTimerCountdownLoop, and cl_ros_timer::CbTimerCountdownOnce.
Definition at line 48 of file smacc_client_behavior_base.hpp.
Referenced by executeOnExit(), and smacc2::SmaccAsyncClientBehavior::executeOnExit().
|
private |
Definition at line 90 of file smacc_client_behavior_impl.hpp.
|
protected |
Definition at line 45 of file smacc_client_behavior_impl.hpp.
References smacc2::CURRENT_STATE, getLogger(), and stateMachine_.
Referenced by cl_move_group_interface::CbMoveEndEffectorTrajectory::onOrthogonalAllocation(), and cl_keyboard::CbDefaultKeyboardBehavior::postKeyEvent().
|
protected |
Definition at line 29 of file smacc_client_behavior_impl.hpp.
References smacc2::CURRENT_STATE, getLogger(), smacc2::ISmaccStateMachine::postEvent(), and stateMachine_.
void smacc2::ISmaccClientBehavior::requiresClient | ( | SmaccClientType *& | storage | ) |
Definition at line 67 of file smacc_client_behavior_impl.hpp.
References currentOrthogonal, and smacc2::ISmaccOrthogonal::requiresClient().
Referenced by cl_keyboard::CbDefaultKeyboardBehavior::onEntry(), smacc2::client_behaviors::CbRosLaunch::onEntry(), smacc2::CbServiceServerCallbackBase< TService >::onEntry(), smacc2::client_behaviors::CbSubscriptionCallbackBase< TMsg >::onEntry(), cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_move_group_interface::CbEndEffectorRotate::onEntry(), cl_move_group_interface::CbExecuteLastTrajectory::onEntry(), cl_move_group_interface::CbMoveCartesianRelative::onEntry(), cl_move_group_interface::CbMoveEndEffector::onEntry(), cl_move_group_interface::CbMoveEndEffectorRelative::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry(), cl_move_group_interface::CbMoveJoints::onEntry(), cl_move_group_interface::CbMoveNamedTarget::onEntry(), cl_move_group_interface::CbUndoLastTrajectory::onEntry(), cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbSeekWaypoint::onEntry(), cl_ros_publisher::CbDefaultPublishLoop::onEntry(), cl_ros_publisher::CbPublishOnce< RosMsgType >::onEntry(), cl_ros_timer::CbTimer::onEntry(), cl_ros_timer::CbTimerCountdownLoop::onEntry(), cl_ros_timer::CbTimerCountdownOnce::onEntry(), smacc2::client_behaviors::CbWaitActionServer::onOrthogonalAllocation(), cl_lifecyclenode::CbActivate::onOrthogonalAllocation(), cl_lifecyclenode::CbCleanup::onOrthogonalAllocation(), cl_lifecyclenode::CbConfigure::onOrthogonalAllocation(), cl_lifecyclenode::CbDeactivate::onOrthogonalAllocation(), cl_lifecyclenode::CbDestroy::onOrthogonalAllocation(), cl_lifecyclenode::CbShutdown::onOrthogonalAllocation(), cl_nav2z::CbAbortNavigation::onOrthogonalAllocation(), cl_nav2z::CbNav2ZClientBehaviorBase::onOrthogonalAllocation(), cl_nav2z::CbNavigateNextWaypointUntilReached::onOrthogonalAllocation(), and cl_nav2z::CbWaitPose::onOrthogonalAllocation().
void smacc2::ISmaccClientBehavior::requiresComponent | ( | SmaccComponentType *& | storage, |
bool | throwExceptionIfNotExist = false |
||
) |
Definition at line 73 of file smacc_client_behavior_impl.hpp.
References getLogger(), smacc2::ISmaccStateMachine::requiresComponent(), and stateMachine_.
Referenced by cl_move_group_interface::CbAttachObject::onEntry(), cl_move_group_interface::CbDetachObject::onEntry(), cl_move_group_interface::CbExecuteLastTrajectory::onEntry(), cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry(), cl_move_group_interface::CbMoveLastTrajectoryInitialState::onEntry(), cl_move_group_interface::CbUndoLastTrajectory::onEntry(), cl_nav2z::CbPauseSlam::onEntry(), cl_nav2z::CbResumeSlam::onEntry(), cl_nav2z::CbRotateLookAt::onEntry(), and cl_nav2z::CbStopNavigation::onEntry().
|
protectedvirtual |
Definition at line 56 of file smacc_client_behavior_base.cpp.
References getLogger(), and getName().
|
friend |
Definition at line 86 of file smacc_client_behavior_base.hpp.
|
friend |
Definition at line 85 of file smacc_client_behavior_base.hpp.
|
friend |
Definition at line 84 of file smacc_client_behavior_base.hpp.
|
private |
Definition at line 82 of file smacc_client_behavior_base.hpp.
Referenced by requiresClient().
|
private |
Definition at line 81 of file smacc_client_behavior_base.hpp.
Referenced by cl_move_group_interface::CbMoveEndEffectorTrajectory::computeJointSpaceTrajectory(), getCurrentState(), ISmaccClientBehavior(), cl_nav2z::CbPauseSlam::onEntry(), and cl_nav2z::CbResumeSlam::onEntry().
|
private |
Definition at line 78 of file smacc_client_behavior_base.hpp.
Referenced by getNode(), getStateMachine(), ISmaccClientBehavior(), postEvent(), and requiresComponent().