_ActionMsgMapperAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_actions/ActionMsgMapperAction.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import std_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import turtlebot_actions.msg
00011 
00012 class ActionMsgMapperAction(genpy.Message):
00013   _md5sum = "67cd690e758365b02dd8c07f07f28ae8"
00014   _type = "turtlebot_actions/ActionMsgMapperAction"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 ActionMsgMapperActionGoal action_goal
00019 ActionMsgMapperActionResult action_result
00020 ActionMsgMapperActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: turtlebot_actions/ActionMsgMapperActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 ActionMsgMapperGoal goal
00029 
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data 
00034 # in a particular coordinate frame.
00035 # 
00036 # sequence ID: consecutively increasing ID 
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047 
00048 ================================================================================
00049 MSG: actionlib_msgs/GoalID
00050 # The stamp should store the time at which this goal was requested.
00051 # It is used by an action server when it tries to preempt all
00052 # goals that were requested before a certain time
00053 time stamp
00054 
00055 # The id provides a way to associate feedback and
00056 # result message with specific goal requests. The id
00057 # specified must be unique.
00058 string id
00059 
00060 
00061 ================================================================================
00062 MSG: turtlebot_actions/ActionMsgMapperGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065 string    input_topic      
00066 string    output_topic      
00067 string    input_type      
00068 string    output_type      
00069 string[]   input_list
00070 string[]   output_list
00071 
00072 
00073 
00074 ================================================================================
00075 MSG: turtlebot_actions/ActionMsgMapperActionResult
00076 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00077 
00078 Header header
00079 actionlib_msgs/GoalStatus status
00080 ActionMsgMapperResult result
00081 
00082 ================================================================================
00083 MSG: actionlib_msgs/GoalStatus
00084 GoalID goal_id
00085 uint8 status
00086 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00087 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00088 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00089                             #   and has since completed its execution (Terminal State)
00090 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00091 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00092                             #    to some failure (Terminal State)
00093 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00094                             #    because the goal was unattainable or invalid (Terminal State)
00095 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00096                             #    and has not yet completed execution
00097 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00098                             #    but the action server has not yet confirmed that the goal is canceled
00099 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00100                             #    and was successfully cancelled (Terminal State)
00101 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00102                             #    sent over the wire by an action server
00103 
00104 #Allow for the user to associate a string with GoalStatus for debugging
00105 string text
00106 
00107 
00108 ================================================================================
00109 MSG: turtlebot_actions/ActionMsgMapperResult
00110 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00111 #result definition
00112 
00113 ================================================================================
00114 MSG: turtlebot_actions/ActionMsgMapperActionFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116 
00117 Header header
00118 actionlib_msgs/GoalStatus status
00119 ActionMsgMapperFeedback feedback
00120 
00121 ================================================================================
00122 MSG: turtlebot_actions/ActionMsgMapperFeedback
00123 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00124 #feedback
00125 
00126 
00127 
00128 """
00129   __slots__ = ['action_goal','action_result','action_feedback']
00130   _slot_types = ['turtlebot_actions/ActionMsgMapperActionGoal','turtlebot_actions/ActionMsgMapperActionResult','turtlebot_actions/ActionMsgMapperActionFeedback']
00131 
00132   def __init__(self, *args, **kwds):
00133     """
00134     Constructor. Any message fields that are implicitly/explicitly
00135     set to None will be assigned a default value. The recommend
00136     use is keyword arguments as this is more robust to future message
00137     changes.  You cannot mix in-order arguments and keyword arguments.
00138 
00139     The available fields are:
00140        action_goal,action_result,action_feedback
00141 
00142     :param args: complete set of field values, in .msg order
00143     :param kwds: use keyword arguments corresponding to message field names
00144     to set specific fields.
00145     """
00146     if args or kwds:
00147       super(ActionMsgMapperAction, self).__init__(*args, **kwds)
00148       #message fields cannot be None, assign default values for those that are
00149       if self.action_goal is None:
00150         self.action_goal = turtlebot_actions.msg.ActionMsgMapperActionGoal()
00151       if self.action_result is None:
00152         self.action_result = turtlebot_actions.msg.ActionMsgMapperActionResult()
00153       if self.action_feedback is None:
00154         self.action_feedback = turtlebot_actions.msg.ActionMsgMapperActionFeedback()
00155     else:
00156       self.action_goal = turtlebot_actions.msg.ActionMsgMapperActionGoal()
00157       self.action_result = turtlebot_actions.msg.ActionMsgMapperActionResult()
00158       self.action_feedback = turtlebot_actions.msg.ActionMsgMapperActionFeedback()
00159 
00160   def _get_types(self):
00161     """
00162     internal API method
00163     """
00164     return self._slot_types
00165 
00166   def serialize(self, buff):
00167     """
00168     serialize message into buffer
00169     :param buff: buffer, ``StringIO``
00170     """
00171     try:
00172       _x = self
00173       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00174       _x = self.action_goal.header.frame_id
00175       length = len(_x)
00176       if python3 or type(_x) == unicode:
00177         _x = _x.encode('utf-8')
00178         length = len(_x)
00179       buff.write(struct.pack('<I%ss'%length, length, _x))
00180       _x = self
00181       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00182       _x = self.action_goal.goal_id.id
00183       length = len(_x)
00184       if python3 or type(_x) == unicode:
00185         _x = _x.encode('utf-8')
00186         length = len(_x)
00187       buff.write(struct.pack('<I%ss'%length, length, _x))
00188       _x = self.action_goal.goal.input_topic
00189       length = len(_x)
00190       if python3 or type(_x) == unicode:
00191         _x = _x.encode('utf-8')
00192         length = len(_x)
00193       buff.write(struct.pack('<I%ss'%length, length, _x))
00194       _x = self.action_goal.goal.output_topic
00195       length = len(_x)
00196       if python3 or type(_x) == unicode:
00197         _x = _x.encode('utf-8')
00198         length = len(_x)
00199       buff.write(struct.pack('<I%ss'%length, length, _x))
00200       _x = self.action_goal.goal.input_type
00201       length = len(_x)
00202       if python3 or type(_x) == unicode:
00203         _x = _x.encode('utf-8')
00204         length = len(_x)
00205       buff.write(struct.pack('<I%ss'%length, length, _x))
00206       _x = self.action_goal.goal.output_type
00207       length = len(_x)
00208       if python3 or type(_x) == unicode:
00209         _x = _x.encode('utf-8')
00210         length = len(_x)
00211       buff.write(struct.pack('<I%ss'%length, length, _x))
00212       length = len(self.action_goal.goal.input_list)
00213       buff.write(_struct_I.pack(length))
00214       for val1 in self.action_goal.goal.input_list:
00215         length = len(val1)
00216         if python3 or type(val1) == unicode:
00217           val1 = val1.encode('utf-8')
00218           length = len(val1)
00219         buff.write(struct.pack('<I%ss'%length, length, val1))
00220       length = len(self.action_goal.goal.output_list)
00221       buff.write(_struct_I.pack(length))
00222       for val1 in self.action_goal.goal.output_list:
00223         length = len(val1)
00224         if python3 or type(val1) == unicode:
00225           val1 = val1.encode('utf-8')
00226           length = len(val1)
00227         buff.write(struct.pack('<I%ss'%length, length, val1))
00228       _x = self
00229       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00230       _x = self.action_result.header.frame_id
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236       _x = self
00237       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00238       _x = self.action_result.status.goal_id.id
00239       length = len(_x)
00240       if python3 or type(_x) == unicode:
00241         _x = _x.encode('utf-8')
00242         length = len(_x)
00243       buff.write(struct.pack('<I%ss'%length, length, _x))
00244       buff.write(_struct_B.pack(self.action_result.status.status))
00245       _x = self.action_result.status.text
00246       length = len(_x)
00247       if python3 or type(_x) == unicode:
00248         _x = _x.encode('utf-8')
00249         length = len(_x)
00250       buff.write(struct.pack('<I%ss'%length, length, _x))
00251       _x = self
00252       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00253       _x = self.action_feedback.header.frame_id
00254       length = len(_x)
00255       if python3 or type(_x) == unicode:
00256         _x = _x.encode('utf-8')
00257         length = len(_x)
00258       buff.write(struct.pack('<I%ss'%length, length, _x))
00259       _x = self
00260       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00261       _x = self.action_feedback.status.goal_id.id
00262       length = len(_x)
00263       if python3 or type(_x) == unicode:
00264         _x = _x.encode('utf-8')
00265         length = len(_x)
00266       buff.write(struct.pack('<I%ss'%length, length, _x))
00267       buff.write(_struct_B.pack(self.action_feedback.status.status))
00268       _x = self.action_feedback.status.text
00269       length = len(_x)
00270       if python3 or type(_x) == unicode:
00271         _x = _x.encode('utf-8')
00272         length = len(_x)
00273       buff.write(struct.pack('<I%ss'%length, length, _x))
00274     except struct.error as se: self._check_types(se)
00275     except TypeError as te: self._check_types(te)
00276 
00277   def deserialize(self, str):
00278     """
00279     unpack serialized message in str into this message instance
00280     :param str: byte array of serialized message, ``str``
00281     """
00282     try:
00283       if self.action_goal is None:
00284         self.action_goal = turtlebot_actions.msg.ActionMsgMapperActionGoal()
00285       if self.action_result is None:
00286         self.action_result = turtlebot_actions.msg.ActionMsgMapperActionResult()
00287       if self.action_feedback is None:
00288         self.action_feedback = turtlebot_actions.msg.ActionMsgMapperActionFeedback()
00289       end = 0
00290       _x = self
00291       start = end
00292       end += 12
00293       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00294       start = end
00295       end += 4
00296       (length,) = _struct_I.unpack(str[start:end])
00297       start = end
00298       end += length
00299       if python3:
00300         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00301       else:
00302         self.action_goal.header.frame_id = str[start:end]
00303       _x = self
00304       start = end
00305       end += 8
00306       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00307       start = end
00308       end += 4
00309       (length,) = _struct_I.unpack(str[start:end])
00310       start = end
00311       end += length
00312       if python3:
00313         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00314       else:
00315         self.action_goal.goal_id.id = str[start:end]
00316       start = end
00317       end += 4
00318       (length,) = _struct_I.unpack(str[start:end])
00319       start = end
00320       end += length
00321       if python3:
00322         self.action_goal.goal.input_topic = str[start:end].decode('utf-8')
00323       else:
00324         self.action_goal.goal.input_topic = str[start:end]
00325       start = end
00326       end += 4
00327       (length,) = _struct_I.unpack(str[start:end])
00328       start = end
00329       end += length
00330       if python3:
00331         self.action_goal.goal.output_topic = str[start:end].decode('utf-8')
00332       else:
00333         self.action_goal.goal.output_topic = str[start:end]
00334       start = end
00335       end += 4
00336       (length,) = _struct_I.unpack(str[start:end])
00337       start = end
00338       end += length
00339       if python3:
00340         self.action_goal.goal.input_type = str[start:end].decode('utf-8')
00341       else:
00342         self.action_goal.goal.input_type = str[start:end]
00343       start = end
00344       end += 4
00345       (length,) = _struct_I.unpack(str[start:end])
00346       start = end
00347       end += length
00348       if python3:
00349         self.action_goal.goal.output_type = str[start:end].decode('utf-8')
00350       else:
00351         self.action_goal.goal.output_type = str[start:end]
00352       start = end
00353       end += 4
00354       (length,) = _struct_I.unpack(str[start:end])
00355       self.action_goal.goal.input_list = []
00356       for i in range(0, length):
00357         start = end
00358         end += 4
00359         (length,) = _struct_I.unpack(str[start:end])
00360         start = end
00361         end += length
00362         if python3:
00363           val1 = str[start:end].decode('utf-8')
00364         else:
00365           val1 = str[start:end]
00366         self.action_goal.goal.input_list.append(val1)
00367       start = end
00368       end += 4
00369       (length,) = _struct_I.unpack(str[start:end])
00370       self.action_goal.goal.output_list = []
00371       for i in range(0, length):
00372         start = end
00373         end += 4
00374         (length,) = _struct_I.unpack(str[start:end])
00375         start = end
00376         end += length
00377         if python3:
00378           val1 = str[start:end].decode('utf-8')
00379         else:
00380           val1 = str[start:end]
00381         self.action_goal.goal.output_list.append(val1)
00382       _x = self
00383       start = end
00384       end += 12
00385       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00386       start = end
00387       end += 4
00388       (length,) = _struct_I.unpack(str[start:end])
00389       start = end
00390       end += length
00391       if python3:
00392         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00393       else:
00394         self.action_result.header.frame_id = str[start:end]
00395       _x = self
00396       start = end
00397       end += 8
00398       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00399       start = end
00400       end += 4
00401       (length,) = _struct_I.unpack(str[start:end])
00402       start = end
00403       end += length
00404       if python3:
00405         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00406       else:
00407         self.action_result.status.goal_id.id = str[start:end]
00408       start = end
00409       end += 1
00410       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00411       start = end
00412       end += 4
00413       (length,) = _struct_I.unpack(str[start:end])
00414       start = end
00415       end += length
00416       if python3:
00417         self.action_result.status.text = str[start:end].decode('utf-8')
00418       else:
00419         self.action_result.status.text = str[start:end]
00420       _x = self
00421       start = end
00422       end += 12
00423       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00424       start = end
00425       end += 4
00426       (length,) = _struct_I.unpack(str[start:end])
00427       start = end
00428       end += length
00429       if python3:
00430         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00431       else:
00432         self.action_feedback.header.frame_id = str[start:end]
00433       _x = self
00434       start = end
00435       end += 8
00436       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00437       start = end
00438       end += 4
00439       (length,) = _struct_I.unpack(str[start:end])
00440       start = end
00441       end += length
00442       if python3:
00443         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00444       else:
00445         self.action_feedback.status.goal_id.id = str[start:end]
00446       start = end
00447       end += 1
00448       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00449       start = end
00450       end += 4
00451       (length,) = _struct_I.unpack(str[start:end])
00452       start = end
00453       end += length
00454       if python3:
00455         self.action_feedback.status.text = str[start:end].decode('utf-8')
00456       else:
00457         self.action_feedback.status.text = str[start:end]
00458       return self
00459     except struct.error as e:
00460       raise genpy.DeserializationError(e) #most likely buffer underfill
00461 
00462 
00463   def serialize_numpy(self, buff, numpy):
00464     """
00465     serialize message with numpy array types into buffer
00466     :param buff: buffer, ``StringIO``
00467     :param numpy: numpy python module
00468     """
00469     try:
00470       _x = self
00471       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00472       _x = self.action_goal.header.frame_id
00473       length = len(_x)
00474       if python3 or type(_x) == unicode:
00475         _x = _x.encode('utf-8')
00476         length = len(_x)
00477       buff.write(struct.pack('<I%ss'%length, length, _x))
00478       _x = self
00479       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00480       _x = self.action_goal.goal_id.id
00481       length = len(_x)
00482       if python3 or type(_x) == unicode:
00483         _x = _x.encode('utf-8')
00484         length = len(_x)
00485       buff.write(struct.pack('<I%ss'%length, length, _x))
00486       _x = self.action_goal.goal.input_topic
00487       length = len(_x)
00488       if python3 or type(_x) == unicode:
00489         _x = _x.encode('utf-8')
00490         length = len(_x)
00491       buff.write(struct.pack('<I%ss'%length, length, _x))
00492       _x = self.action_goal.goal.output_topic
00493       length = len(_x)
00494       if python3 or type(_x) == unicode:
00495         _x = _x.encode('utf-8')
00496         length = len(_x)
00497       buff.write(struct.pack('<I%ss'%length, length, _x))
00498       _x = self.action_goal.goal.input_type
00499       length = len(_x)
00500       if python3 or type(_x) == unicode:
00501         _x = _x.encode('utf-8')
00502         length = len(_x)
00503       buff.write(struct.pack('<I%ss'%length, length, _x))
00504       _x = self.action_goal.goal.output_type
00505       length = len(_x)
00506       if python3 or type(_x) == unicode:
00507         _x = _x.encode('utf-8')
00508         length = len(_x)
00509       buff.write(struct.pack('<I%ss'%length, length, _x))
00510       length = len(self.action_goal.goal.input_list)
00511       buff.write(_struct_I.pack(length))
00512       for val1 in self.action_goal.goal.input_list:
00513         length = len(val1)
00514         if python3 or type(val1) == unicode:
00515           val1 = val1.encode('utf-8')
00516           length = len(val1)
00517         buff.write(struct.pack('<I%ss'%length, length, val1))
00518       length = len(self.action_goal.goal.output_list)
00519       buff.write(_struct_I.pack(length))
00520       for val1 in self.action_goal.goal.output_list:
00521         length = len(val1)
00522         if python3 or type(val1) == unicode:
00523           val1 = val1.encode('utf-8')
00524           length = len(val1)
00525         buff.write(struct.pack('<I%ss'%length, length, val1))
00526       _x = self
00527       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00528       _x = self.action_result.header.frame_id
00529       length = len(_x)
00530       if python3 or type(_x) == unicode:
00531         _x = _x.encode('utf-8')
00532         length = len(_x)
00533       buff.write(struct.pack('<I%ss'%length, length, _x))
00534       _x = self
00535       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00536       _x = self.action_result.status.goal_id.id
00537       length = len(_x)
00538       if python3 or type(_x) == unicode:
00539         _x = _x.encode('utf-8')
00540         length = len(_x)
00541       buff.write(struct.pack('<I%ss'%length, length, _x))
00542       buff.write(_struct_B.pack(self.action_result.status.status))
00543       _x = self.action_result.status.text
00544       length = len(_x)
00545       if python3 or type(_x) == unicode:
00546         _x = _x.encode('utf-8')
00547         length = len(_x)
00548       buff.write(struct.pack('<I%ss'%length, length, _x))
00549       _x = self
00550       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00551       _x = self.action_feedback.header.frame_id
00552       length = len(_x)
00553       if python3 or type(_x) == unicode:
00554         _x = _x.encode('utf-8')
00555         length = len(_x)
00556       buff.write(struct.pack('<I%ss'%length, length, _x))
00557       _x = self
00558       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00559       _x = self.action_feedback.status.goal_id.id
00560       length = len(_x)
00561       if python3 or type(_x) == unicode:
00562         _x = _x.encode('utf-8')
00563         length = len(_x)
00564       buff.write(struct.pack('<I%ss'%length, length, _x))
00565       buff.write(_struct_B.pack(self.action_feedback.status.status))
00566       _x = self.action_feedback.status.text
00567       length = len(_x)
00568       if python3 or type(_x) == unicode:
00569         _x = _x.encode('utf-8')
00570         length = len(_x)
00571       buff.write(struct.pack('<I%ss'%length, length, _x))
00572     except struct.error as se: self._check_types(se)
00573     except TypeError as te: self._check_types(te)
00574 
00575   def deserialize_numpy(self, str, numpy):
00576     """
00577     unpack serialized message in str into this message instance using numpy for array types
00578     :param str: byte array of serialized message, ``str``
00579     :param numpy: numpy python module
00580     """
00581     try:
00582       if self.action_goal is None:
00583         self.action_goal = turtlebot_actions.msg.ActionMsgMapperActionGoal()
00584       if self.action_result is None:
00585         self.action_result = turtlebot_actions.msg.ActionMsgMapperActionResult()
00586       if self.action_feedback is None:
00587         self.action_feedback = turtlebot_actions.msg.ActionMsgMapperActionFeedback()
00588       end = 0
00589       _x = self
00590       start = end
00591       end += 12
00592       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00593       start = end
00594       end += 4
00595       (length,) = _struct_I.unpack(str[start:end])
00596       start = end
00597       end += length
00598       if python3:
00599         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00600       else:
00601         self.action_goal.header.frame_id = str[start:end]
00602       _x = self
00603       start = end
00604       end += 8
00605       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00606       start = end
00607       end += 4
00608       (length,) = _struct_I.unpack(str[start:end])
00609       start = end
00610       end += length
00611       if python3:
00612         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00613       else:
00614         self.action_goal.goal_id.id = str[start:end]
00615       start = end
00616       end += 4
00617       (length,) = _struct_I.unpack(str[start:end])
00618       start = end
00619       end += length
00620       if python3:
00621         self.action_goal.goal.input_topic = str[start:end].decode('utf-8')
00622       else:
00623         self.action_goal.goal.input_topic = str[start:end]
00624       start = end
00625       end += 4
00626       (length,) = _struct_I.unpack(str[start:end])
00627       start = end
00628       end += length
00629       if python3:
00630         self.action_goal.goal.output_topic = str[start:end].decode('utf-8')
00631       else:
00632         self.action_goal.goal.output_topic = str[start:end]
00633       start = end
00634       end += 4
00635       (length,) = _struct_I.unpack(str[start:end])
00636       start = end
00637       end += length
00638       if python3:
00639         self.action_goal.goal.input_type = str[start:end].decode('utf-8')
00640       else:
00641         self.action_goal.goal.input_type = str[start:end]
00642       start = end
00643       end += 4
00644       (length,) = _struct_I.unpack(str[start:end])
00645       start = end
00646       end += length
00647       if python3:
00648         self.action_goal.goal.output_type = str[start:end].decode('utf-8')
00649       else:
00650         self.action_goal.goal.output_type = str[start:end]
00651       start = end
00652       end += 4
00653       (length,) = _struct_I.unpack(str[start:end])
00654       self.action_goal.goal.input_list = []
00655       for i in range(0, length):
00656         start = end
00657         end += 4
00658         (length,) = _struct_I.unpack(str[start:end])
00659         start = end
00660         end += length
00661         if python3:
00662           val1 = str[start:end].decode('utf-8')
00663         else:
00664           val1 = str[start:end]
00665         self.action_goal.goal.input_list.append(val1)
00666       start = end
00667       end += 4
00668       (length,) = _struct_I.unpack(str[start:end])
00669       self.action_goal.goal.output_list = []
00670       for i in range(0, length):
00671         start = end
00672         end += 4
00673         (length,) = _struct_I.unpack(str[start:end])
00674         start = end
00675         end += length
00676         if python3:
00677           val1 = str[start:end].decode('utf-8')
00678         else:
00679           val1 = str[start:end]
00680         self.action_goal.goal.output_list.append(val1)
00681       _x = self
00682       start = end
00683       end += 12
00684       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00685       start = end
00686       end += 4
00687       (length,) = _struct_I.unpack(str[start:end])
00688       start = end
00689       end += length
00690       if python3:
00691         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00692       else:
00693         self.action_result.header.frame_id = str[start:end]
00694       _x = self
00695       start = end
00696       end += 8
00697       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00698       start = end
00699       end += 4
00700       (length,) = _struct_I.unpack(str[start:end])
00701       start = end
00702       end += length
00703       if python3:
00704         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00705       else:
00706         self.action_result.status.goal_id.id = str[start:end]
00707       start = end
00708       end += 1
00709       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00710       start = end
00711       end += 4
00712       (length,) = _struct_I.unpack(str[start:end])
00713       start = end
00714       end += length
00715       if python3:
00716         self.action_result.status.text = str[start:end].decode('utf-8')
00717       else:
00718         self.action_result.status.text = str[start:end]
00719       _x = self
00720       start = end
00721       end += 12
00722       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00723       start = end
00724       end += 4
00725       (length,) = _struct_I.unpack(str[start:end])
00726       start = end
00727       end += length
00728       if python3:
00729         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00730       else:
00731         self.action_feedback.header.frame_id = str[start:end]
00732       _x = self
00733       start = end
00734       end += 8
00735       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00736       start = end
00737       end += 4
00738       (length,) = _struct_I.unpack(str[start:end])
00739       start = end
00740       end += length
00741       if python3:
00742         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00743       else:
00744         self.action_feedback.status.goal_id.id = str[start:end]
00745       start = end
00746       end += 1
00747       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00748       start = end
00749       end += 4
00750       (length,) = _struct_I.unpack(str[start:end])
00751       start = end
00752       end += length
00753       if python3:
00754         self.action_feedback.status.text = str[start:end].decode('utf-8')
00755       else:
00756         self.action_feedback.status.text = str[start:end]
00757       return self
00758     except struct.error as e:
00759       raise genpy.DeserializationError(e) #most likely buffer underfill
00760 
00761 _struct_I = genpy.struct_I
00762 _struct_3I = struct.Struct("<3I")
00763 _struct_B = struct.Struct("<B")
00764 _struct_2I = struct.Struct("<2I")


turtlebot_actions
Author(s): Helen Oleynikova, Melonee Wise
autogenerated on Fri Dec 6 2013 20:51:35