4 #include <std_msgs/String.h>
6 #include "common_system_handler_config.pb.h"
19 template <
class LogicStateMachineT,
class EventManagerT,
class RobotSystemT>
37 RobotSystemT &robot_system)
45 std::chrono::milliseconds(config.status_timer_duration())),
47 std::bind(&LogicStateMachineT::template process_event<
51 std::chrono::milliseconds(config.state_machine_timer_duration())) {}
Responsible for publishing system status message.
Definition: system_status_publisher.h:14
StateMachineGUIConnector< EventManagerT, LogicStateMachineT > state_machine_gui_connector_
Definition: common_system_handler.h:82
AsyncTimer status_timer_
Update uav status and state machine status.
Definition: common_system_handler.h:86
EventManagerT event_manager_
Event manager used by the state machine.
Definition: common_system_handler.h:80
void start()
Starts running the timer thread.
Definition: async_timer.cpp:16
void startTimers()
Start state machine internal event processing and status timer.
Definition: common_system_handler.h:70
Calls given function on a timer in its own thread.
Definition: async_timer.h:11
ros::NodeHandle nh_
Definition: common_system_handler.h:77
AsyncTimer logic_state_machine_timer_
Timer for running state machine.
Definition: common_system_handler.h:87
Provides logic common to different system handlers to reduce code duplication.
Definition: common_system_handler.h:20
LogicStateMachineT logic_state_machine_
State machine that gets run by the system.
Definition: common_system_handler.h:79
bool isConnected()
Checks if internal ROS topics are connected.
Definition: common_system_handler.h:62
The InternalTransitionEvent struct used to trigger action behaviors in states.
Definition: internal_transition_event.h:6
CommonSystemHandler(const CommonSystemHandlerConfig &config, RobotSystemT &robot_system)
Constructor.
Definition: common_system_handler.h:36
SystemStatusPublisher< LogicStateMachineT > system_status_pub_
publishes status messages
Definition: common_system_handler.h:85
Connects a logic state machine to the GUI over a ROS interface.
Definition: state_machine_gui_connector.h:20