26 state_buf_ = boost::circular_buffer<std::string>(2);
45 rostate_machine::Event msg = *
event.getMessage();
51 std::string publisher_name =
event.getPublisherName();
52 ROS_INFO_STREAM(
"from : " << publisher_name <<
", failed to transition, current state : "<< info.
current_state <<
", event_name : " << msg.trigger_event_name);
56 std::string publisher_name =
event.getPublisherName();
57 ROS_INFO_STREAM(
"from : " << publisher_name <<
", succeed to transition, current state : "<< info.
current_state <<
", event_name : " << msg.trigger_event_name);
86 rostate_machine::State state_msg;
94 std_msgs::String dot_string_msg;
void run()
Run State Machine (Enable Transitions)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void eventCallback(const ros::MessageEvent< rostate_machine::Event const > &event)
Callback Function for Trigger Event Topic.
void publishCurrentState()
Publish Current State Topic.
ROSCPP_DECL const std::string & getName()
boost::circular_buffer< std::string > state_buf_
const std::vector< std::string > possibe_transition_states
Possibe Transition States from the Current State.
~RostateMachine()
Destroy the Rostate Machine:: Rostate Machine object.
std::shared_ptr< StateMachine > state_machine_ptr_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
ros::Publisher dot_string_pub_
ROS Wrapper for the State Machine Class.
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Subscriber trigger_event_sub_
std::string state_machine_name_
ros::Publisher current_state_pub_
const std::vector< std::string > possibe_transitions
Possibe Transitions from the Current State.
std::string dot_filepath_
RostateMachine(ros::NodeHandle nh, ros::NodeHandle pnh)
Construct a new Rostate Machine:: Rostate Machine object.
Struct for State Infomation.
#define ROS_INFO_STREAM(args)
const std::string current_state
Current State.