29template <
typename DerivedStateMachine,
typename InitialStateType>
33 DerivedStateMachine, InitialStateType, SmaccFifoScheduler, SmaccAllocator>
38 rclcpp::NodeOptions node_options = rclcpp::NodeOptions())
41 sc::asynchronous_state_machine<
77 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Introspecting state machine via typeWalker");
80 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] initiate_impl");
85 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Initializing ROS communication mechanisms");
89 auto transitionInfo = std::make_shared<SmaccTransitionInfo>();
90 transitionInfo->destinyState = this->
stateMachineInfo_->getState<InitialStateType>();
93 RCLCPP_INFO(
getLogger(),
"[SmaccStateMachine] Initializing state machine");
94 sc::state_machine<DerivedStateMachine, InitialStateType, SmaccAllocator>::initiate();
void publishTransition(const SmaccTransitionInfo &transitionInfo)
rclcpp::Node::SharedPtr getNode()
virtual void onInitialize()
this function should be implemented by the user to create the orthogonals
void buildStateMachineInfo()
rclcpp::Logger getLogger()
void initializeROS(std::string smshortname)
std::shared_ptr< SmaccStateMachineInfo > stateMachineInfo_
boost::statechart::processor_container< boost::statechart::fifo_scheduler<>, boost::function0< void >, std::allocator< boost::statechart::none > >::processor_context my_context
rclcpp::Node::SharedPtr globalNh_
std::allocator< boost::statechart::none > SmaccAllocator
std::string cleanShortTypeName()
void run(ExecutionModel executionModel=ExecutionModel::SINGLE_THREAD_SPINNER)
boost::statechart::fifo_scheduler< SmaccFifoWorker, SmaccAllocator > SmaccFifoScheduler
virtual ~SmaccStateMachineBase()
SmaccStateMachineBase(my_context ctx, SignalDetector *signalDetector, rclcpp::NodeOptions node_options=rclcpp::NodeOptions())
void initiate_impl() override