parameters: (self, state)
docstring: Set the state of the robot and call according callback functions.
docstring_summary: Set the state of the robot and call according callback functions.
docstring_tokens: Set the state of the robot and call according callback functions .
function: def set_state(self, state):
          """Set the state of the robot and call according callback functions."""
          if state == self.state:
              return
          self.state = state
          if self.state == ActionState.ERROR \
          or self.state == ActionState.INITIALIZED \
          or self.state == ActionState.PENDING \
          or self.state == ActionState.ACTIVE \
          or self.state == ActionState.IDLE:
              if self.feedback_callback:
                  self.feedback_callback()
          elif self.state == ActionState.DONE:
              if self.done_callback:
                  self.done_callback()
function_tokens: def set_state ( self , state ) : if state == self . state : return self . state = state if self . state == ActionState . ERROR or self . state == ActionState . INITIALIZED or self . state == ActionState . PENDING or self . state == ActionState . ACTIVE or self . state == ActionState . IDLE : if self . feedback_callback : self . feedback_callback ( ) elif self . state == ActionState . DONE : if self . done_callback : self . done_callback ( )