Event Types & Labels

EventTypes may have optionally meta-information about “transition edge labels and transition node TagNames”for exampleduring the implementation of EvSucceded  we specify the following metainformation:
 – Default transition edge label: type of the action client, move_base::MoveBaseAction
– Default transition tagname: “SUCCESS”what this mean?the case of the transition edge label: at the current moment for any transition that is activated by this EvSucceded<ActionType> will be labeled the edge with that c++ name

the second line move_base_msgs::MoveBaseAction is that label, that is by default empty for any event——————-For the case of the transition nodes “transitionTagNames”:by default transition tagnames are named automatically: transition_1, transition_2, etc…you can specify manually and explicit y an alternative name, ie: “SUCCESS”, and that name will be show. Some of these names in the viewer have some specific style. In this case, SUCCESS is painted as greenBut there is an aditional funcionality to set the value of transitionTAgnames automaticallyAny event type can define the prefered “TransitionTagName”, overriding the convention “transition_1”, “transition_2”, etc.if you specify manually in the transition line some explicit transitionTagName, that will be used. for instance smacc::transition<EvSucceded<MoveBaseActionClient>, DstState, MYTRANSITION>MYTRANSITION will be shownbut if you do not specify MYTRANSITIONit will be shown SUCCESS, because the EvSucceded already defines that default/automatic transitionTagNameThis is an example of implementation of the EvSucceded event in c++template <typename TSource>
struct EvActionSucceded : sc::event<EvActionResult<TSource>>, IActionResult
{
  typename TSource::Result resultMessage;

  static std::string getEventLabel()
  {
    // show ros message type
    std::string label;
    EventLabel<TSource>(label);
    return label;
  }

  static std::string getDefaultTransitionTag()
  {
    return “SUCCESS”;
  }
};you can see how the event defines two static methods getEventLabel and getDefaultTransitionTagthe getEventLabel may be a bit complicated implementation, but essentially it extract from metaprograming the type of the ActionClient, on the other hand getDefaultTransitionTag is very easy to understandOther methods that also implement some of these two functions are EvSucceded, EvAborted, EvPreempt, EvRejected, EvTopicMessage