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


nao_msgs
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Tue Oct 15 2013 10:05:22