_ProbingSteps.py
Go to the documentation of this file.
00001 """autogenerated by genpy from zyonz_msgs/ProbingSteps.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 
00010 class ProbingSteps(genpy.Message):
00011   _md5sum = "211cf355760c3fa9c773e36110a45416"
00012   _type = "zyonz_msgs/ProbingSteps"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """geometry_msgs/PoseArray pre_probing
00015 geometry_msgs/PoseStamped probing
00016 geometry_msgs/PoseArray post_probing
00017 
00018 ================================================================================
00019 MSG: geometry_msgs/PoseArray
00020 # An array of poses with a header for global reference.
00021 
00022 Header header
00023 
00024 Pose[] poses
00025 
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data 
00030 # in a particular coordinate frame.
00031 # 
00032 # sequence ID: consecutively increasing ID 
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/Pose
00046 # A representation of pose in free space, composed of postion and orientation. 
00047 Point position
00048 Quaternion orientation
00049 
00050 ================================================================================
00051 MSG: geometry_msgs/Point
00052 # This contains the position of a point in free space
00053 float64 x
00054 float64 y
00055 float64 z
00056 
00057 ================================================================================
00058 MSG: geometry_msgs/Quaternion
00059 # This represents an orientation in free space in quaternion form.
00060 
00061 float64 x
00062 float64 y
00063 float64 z
00064 float64 w
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/PoseStamped
00068 # A Pose with reference coordinate frame and timestamp
00069 Header header
00070 Pose pose
00071 
00072 """
00073   __slots__ = ['pre_probing','probing','post_probing']
00074   _slot_types = ['geometry_msgs/PoseArray','geometry_msgs/PoseStamped','geometry_msgs/PoseArray']
00075 
00076   def __init__(self, *args, **kwds):
00077     """
00078     Constructor. Any message fields that are implicitly/explicitly
00079     set to None will be assigned a default value. The recommend
00080     use is keyword arguments as this is more robust to future message
00081     changes.  You cannot mix in-order arguments and keyword arguments.
00082 
00083     The available fields are:
00084        pre_probing,probing,post_probing
00085 
00086     :param args: complete set of field values, in .msg order
00087     :param kwds: use keyword arguments corresponding to message field names
00088     to set specific fields.
00089     """
00090     if args or kwds:
00091       super(ProbingSteps, self).__init__(*args, **kwds)
00092       #message fields cannot be None, assign default values for those that are
00093       if self.pre_probing is None:
00094         self.pre_probing = geometry_msgs.msg.PoseArray()
00095       if self.probing is None:
00096         self.probing = geometry_msgs.msg.PoseStamped()
00097       if self.post_probing is None:
00098         self.post_probing = geometry_msgs.msg.PoseArray()
00099     else:
00100       self.pre_probing = geometry_msgs.msg.PoseArray()
00101       self.probing = geometry_msgs.msg.PoseStamped()
00102       self.post_probing = geometry_msgs.msg.PoseArray()
00103 
00104   def _get_types(self):
00105     """
00106     internal API method
00107     """
00108     return self._slot_types
00109 
00110   def serialize(self, buff):
00111     """
00112     serialize message into buffer
00113     :param buff: buffer, ``StringIO``
00114     """
00115     try:
00116       _x = self
00117       buff.write(_struct_3I.pack(_x.pre_probing.header.seq, _x.pre_probing.header.stamp.secs, _x.pre_probing.header.stamp.nsecs))
00118       _x = self.pre_probing.header.frame_id
00119       length = len(_x)
00120       if python3 or type(_x) == unicode:
00121         _x = _x.encode('utf-8')
00122         length = len(_x)
00123       buff.write(struct.pack('<I%ss'%length, length, _x))
00124       length = len(self.pre_probing.poses)
00125       buff.write(_struct_I.pack(length))
00126       for val1 in self.pre_probing.poses:
00127         _v1 = val1.position
00128         _x = _v1
00129         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00130         _v2 = val1.orientation
00131         _x = _v2
00132         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00133       _x = self
00134       buff.write(_struct_3I.pack(_x.probing.header.seq, _x.probing.header.stamp.secs, _x.probing.header.stamp.nsecs))
00135       _x = self.probing.header.frame_id
00136       length = len(_x)
00137       if python3 or type(_x) == unicode:
00138         _x = _x.encode('utf-8')
00139         length = len(_x)
00140       buff.write(struct.pack('<I%ss'%length, length, _x))
00141       _x = self
00142       buff.write(_struct_7d3I.pack(_x.probing.pose.position.x, _x.probing.pose.position.y, _x.probing.pose.position.z, _x.probing.pose.orientation.x, _x.probing.pose.orientation.y, _x.probing.pose.orientation.z, _x.probing.pose.orientation.w, _x.post_probing.header.seq, _x.post_probing.header.stamp.secs, _x.post_probing.header.stamp.nsecs))
00143       _x = self.post_probing.header.frame_id
00144       length = len(_x)
00145       if python3 or type(_x) == unicode:
00146         _x = _x.encode('utf-8')
00147         length = len(_x)
00148       buff.write(struct.pack('<I%ss'%length, length, _x))
00149       length = len(self.post_probing.poses)
00150       buff.write(_struct_I.pack(length))
00151       for val1 in self.post_probing.poses:
00152         _v3 = val1.position
00153         _x = _v3
00154         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00155         _v4 = val1.orientation
00156         _x = _v4
00157         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00158     except struct.error as se: self._check_types(se)
00159     except TypeError as te: self._check_types(te)
00160 
00161   def deserialize(self, str):
00162     """
00163     unpack serialized message in str into this message instance
00164     :param str: byte array of serialized message, ``str``
00165     """
00166     try:
00167       if self.pre_probing is None:
00168         self.pre_probing = geometry_msgs.msg.PoseArray()
00169       if self.probing is None:
00170         self.probing = geometry_msgs.msg.PoseStamped()
00171       if self.post_probing is None:
00172         self.post_probing = geometry_msgs.msg.PoseArray()
00173       end = 0
00174       _x = self
00175       start = end
00176       end += 12
00177       (_x.pre_probing.header.seq, _x.pre_probing.header.stamp.secs, _x.pre_probing.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00178       start = end
00179       end += 4
00180       (length,) = _struct_I.unpack(str[start:end])
00181       start = end
00182       end += length
00183       if python3:
00184         self.pre_probing.header.frame_id = str[start:end].decode('utf-8')
00185       else:
00186         self.pre_probing.header.frame_id = str[start:end]
00187       start = end
00188       end += 4
00189       (length,) = _struct_I.unpack(str[start:end])
00190       self.pre_probing.poses = []
00191       for i in range(0, length):
00192         val1 = geometry_msgs.msg.Pose()
00193         _v5 = val1.position
00194         _x = _v5
00195         start = end
00196         end += 24
00197         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00198         _v6 = val1.orientation
00199         _x = _v6
00200         start = end
00201         end += 32
00202         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00203         self.pre_probing.poses.append(val1)
00204       _x = self
00205       start = end
00206       end += 12
00207       (_x.probing.header.seq, _x.probing.header.stamp.secs, _x.probing.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       if python3:
00214         self.probing.header.frame_id = str[start:end].decode('utf-8')
00215       else:
00216         self.probing.header.frame_id = str[start:end]
00217       _x = self
00218       start = end
00219       end += 68
00220       (_x.probing.pose.position.x, _x.probing.pose.position.y, _x.probing.pose.position.z, _x.probing.pose.orientation.x, _x.probing.pose.orientation.y, _x.probing.pose.orientation.z, _x.probing.pose.orientation.w, _x.post_probing.header.seq, _x.post_probing.header.stamp.secs, _x.post_probing.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00221       start = end
00222       end += 4
00223       (length,) = _struct_I.unpack(str[start:end])
00224       start = end
00225       end += length
00226       if python3:
00227         self.post_probing.header.frame_id = str[start:end].decode('utf-8')
00228       else:
00229         self.post_probing.header.frame_id = str[start:end]
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       self.post_probing.poses = []
00234       for i in range(0, length):
00235         val1 = geometry_msgs.msg.Pose()
00236         _v7 = val1.position
00237         _x = _v7
00238         start = end
00239         end += 24
00240         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00241         _v8 = val1.orientation
00242         _x = _v8
00243         start = end
00244         end += 32
00245         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00246         self.post_probing.poses.append(val1)
00247       return self
00248     except struct.error as e:
00249       raise genpy.DeserializationError(e) #most likely buffer underfill
00250 
00251 
00252   def serialize_numpy(self, buff, numpy):
00253     """
00254     serialize message with numpy array types into buffer
00255     :param buff: buffer, ``StringIO``
00256     :param numpy: numpy python module
00257     """
00258     try:
00259       _x = self
00260       buff.write(_struct_3I.pack(_x.pre_probing.header.seq, _x.pre_probing.header.stamp.secs, _x.pre_probing.header.stamp.nsecs))
00261       _x = self.pre_probing.header.frame_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       length = len(self.pre_probing.poses)
00268       buff.write(_struct_I.pack(length))
00269       for val1 in self.pre_probing.poses:
00270         _v9 = val1.position
00271         _x = _v9
00272         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00273         _v10 = val1.orientation
00274         _x = _v10
00275         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00276       _x = self
00277       buff.write(_struct_3I.pack(_x.probing.header.seq, _x.probing.header.stamp.secs, _x.probing.header.stamp.nsecs))
00278       _x = self.probing.header.frame_id
00279       length = len(_x)
00280       if python3 or type(_x) == unicode:
00281         _x = _x.encode('utf-8')
00282         length = len(_x)
00283       buff.write(struct.pack('<I%ss'%length, length, _x))
00284       _x = self
00285       buff.write(_struct_7d3I.pack(_x.probing.pose.position.x, _x.probing.pose.position.y, _x.probing.pose.position.z, _x.probing.pose.orientation.x, _x.probing.pose.orientation.y, _x.probing.pose.orientation.z, _x.probing.pose.orientation.w, _x.post_probing.header.seq, _x.post_probing.header.stamp.secs, _x.post_probing.header.stamp.nsecs))
00286       _x = self.post_probing.header.frame_id
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       length = len(self.post_probing.poses)
00293       buff.write(_struct_I.pack(length))
00294       for val1 in self.post_probing.poses:
00295         _v11 = val1.position
00296         _x = _v11
00297         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00298         _v12 = val1.orientation
00299         _x = _v12
00300         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00301     except struct.error as se: self._check_types(se)
00302     except TypeError as te: self._check_types(te)
00303 
00304   def deserialize_numpy(self, str, numpy):
00305     """
00306     unpack serialized message in str into this message instance using numpy for array types
00307     :param str: byte array of serialized message, ``str``
00308     :param numpy: numpy python module
00309     """
00310     try:
00311       if self.pre_probing is None:
00312         self.pre_probing = geometry_msgs.msg.PoseArray()
00313       if self.probing is None:
00314         self.probing = geometry_msgs.msg.PoseStamped()
00315       if self.post_probing is None:
00316         self.post_probing = geometry_msgs.msg.PoseArray()
00317       end = 0
00318       _x = self
00319       start = end
00320       end += 12
00321       (_x.pre_probing.header.seq, _x.pre_probing.header.stamp.secs, _x.pre_probing.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       start = end
00326       end += length
00327       if python3:
00328         self.pre_probing.header.frame_id = str[start:end].decode('utf-8')
00329       else:
00330         self.pre_probing.header.frame_id = str[start:end]
00331       start = end
00332       end += 4
00333       (length,) = _struct_I.unpack(str[start:end])
00334       self.pre_probing.poses = []
00335       for i in range(0, length):
00336         val1 = geometry_msgs.msg.Pose()
00337         _v13 = val1.position
00338         _x = _v13
00339         start = end
00340         end += 24
00341         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00342         _v14 = val1.orientation
00343         _x = _v14
00344         start = end
00345         end += 32
00346         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00347         self.pre_probing.poses.append(val1)
00348       _x = self
00349       start = end
00350       end += 12
00351       (_x.probing.header.seq, _x.probing.header.stamp.secs, _x.probing.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00352       start = end
00353       end += 4
00354       (length,) = _struct_I.unpack(str[start:end])
00355       start = end
00356       end += length
00357       if python3:
00358         self.probing.header.frame_id = str[start:end].decode('utf-8')
00359       else:
00360         self.probing.header.frame_id = str[start:end]
00361       _x = self
00362       start = end
00363       end += 68
00364       (_x.probing.pose.position.x, _x.probing.pose.position.y, _x.probing.pose.position.z, _x.probing.pose.orientation.x, _x.probing.pose.orientation.y, _x.probing.pose.orientation.z, _x.probing.pose.orientation.w, _x.post_probing.header.seq, _x.post_probing.header.stamp.secs, _x.post_probing.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00365       start = end
00366       end += 4
00367       (length,) = _struct_I.unpack(str[start:end])
00368       start = end
00369       end += length
00370       if python3:
00371         self.post_probing.header.frame_id = str[start:end].decode('utf-8')
00372       else:
00373         self.post_probing.header.frame_id = str[start:end]
00374       start = end
00375       end += 4
00376       (length,) = _struct_I.unpack(str[start:end])
00377       self.post_probing.poses = []
00378       for i in range(0, length):
00379         val1 = geometry_msgs.msg.Pose()
00380         _v15 = val1.position
00381         _x = _v15
00382         start = end
00383         end += 24
00384         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00385         _v16 = val1.orientation
00386         _x = _v16
00387         start = end
00388         end += 32
00389         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00390         self.post_probing.poses.append(val1)
00391       return self
00392     except struct.error as e:
00393       raise genpy.DeserializationError(e) #most likely buffer underfill
00394 
00395 _struct_I = genpy.struct_I
00396 _struct_7d3I = struct.Struct("<7d3I")
00397 _struct_3I = struct.Struct("<3I")
00398 _struct_4d = struct.Struct("<4d")
00399 _struct_3d = struct.Struct("<3d")


zyonz_msgs
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 19:56:18