_ObjectPoseList.py
Go to the documentation of this file.
00001 """autogenerated by genpy from blort_ros/ObjectPoseList.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 genpy
00008 import geometry_msgs.msg
00009 import blort_ros.msg
00010 import std_msgs.msg
00011 
00012 class ObjectPoseList(genpy.Message):
00013   _md5sum = "418ab919a68374930e8c523eaea185d2"
00014   _type = "blort_ros/ObjectPoseList"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """Header header
00017 
00018 ObjectPose[] object_list
00019 
00020 time originalTimeStamp
00021 
00022 time requestTimeStamp
00023 
00024 
00025 ================================================================================
00026 MSG: std_msgs/Header
00027 # Standard metadata for higher-level stamped data types.
00028 # This is generally used to communicate timestamped data 
00029 # in a particular coordinate frame.
00030 # 
00031 # sequence ID: consecutively increasing ID 
00032 uint32 seq
00033 #Two-integer timestamp that is expressed as:
00034 # * stamp.secs: seconds (stamp_secs) since epoch
00035 # * stamp.nsecs: nanoseconds since stamp_secs
00036 # time-handling sugar is provided by the client library
00037 time stamp
00038 #Frame this data is associated with
00039 # 0: no frame
00040 # 1: global frame
00041 string frame_id
00042 
00043 ================================================================================
00044 MSG: blort_ros/ObjectPose
00045 string name
00046 
00047 geometry_msgs/Pose pose
00048 geometry_msgs/Point32 pose2D
00049 
00050 int16[] convex_hull_x
00051 int16[] convex_hull_y
00052 
00053 float32 mean_quality
00054 int16 used_points
00055 
00056 NameTypeValue[] properties
00057 
00058 geometry_msgs/Pose[] pose_uncertainty_list
00059 
00060 ================================================================================
00061 MSG: geometry_msgs/Pose
00062 # A representation of pose in free space, composed of postion and orientation. 
00063 Point position
00064 Quaternion orientation
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/Point
00068 # This contains the position of a point in free space
00069 float64 x
00070 float64 y
00071 float64 z
00072 
00073 ================================================================================
00074 MSG: geometry_msgs/Quaternion
00075 # This represents an orientation in free space in quaternion form.
00076 
00077 float64 x
00078 float64 y
00079 float64 z
00080 float64 w
00081 
00082 ================================================================================
00083 MSG: geometry_msgs/Point32
00084 # This contains the position of a point in free space(with 32 bits of precision).
00085 # It is recommeded to use Point wherever possible instead of Point32.  
00086 # 
00087 # This recommendation is to promote interoperability.  
00088 #
00089 # This message is designed to take up less space when sending
00090 # lots of points at once, as in the case of a PointCloud.  
00091 
00092 float32 x
00093 float32 y
00094 float32 z
00095 ================================================================================
00096 MSG: blort_ros/NameTypeValue
00097 string name
00098 string type
00099 string value
00100 
00101 """
00102   __slots__ = ['header','object_list','originalTimeStamp','requestTimeStamp']
00103   _slot_types = ['std_msgs/Header','blort_ros/ObjectPose[]','time','time']
00104 
00105   def __init__(self, *args, **kwds):
00106     """
00107     Constructor. Any message fields that are implicitly/explicitly
00108     set to None will be assigned a default value. The recommend
00109     use is keyword arguments as this is more robust to future message
00110     changes.  You cannot mix in-order arguments and keyword arguments.
00111 
00112     The available fields are:
00113        header,object_list,originalTimeStamp,requestTimeStamp
00114 
00115     :param args: complete set of field values, in .msg order
00116     :param kwds: use keyword arguments corresponding to message field names
00117     to set specific fields.
00118     """
00119     if args or kwds:
00120       super(ObjectPoseList, self).__init__(*args, **kwds)
00121       #message fields cannot be None, assign default values for those that are
00122       if self.header is None:
00123         self.header = std_msgs.msg.Header()
00124       if self.object_list is None:
00125         self.object_list = []
00126       if self.originalTimeStamp is None:
00127         self.originalTimeStamp = genpy.Time()
00128       if self.requestTimeStamp is None:
00129         self.requestTimeStamp = genpy.Time()
00130     else:
00131       self.header = std_msgs.msg.Header()
00132       self.object_list = []
00133       self.originalTimeStamp = genpy.Time()
00134       self.requestTimeStamp = genpy.Time()
00135 
00136   def _get_types(self):
00137     """
00138     internal API method
00139     """
00140     return self._slot_types
00141 
00142   def serialize(self, buff):
00143     """
00144     serialize message into buffer
00145     :param buff: buffer, ``StringIO``
00146     """
00147     try:
00148       _x = self
00149       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00150       _x = self.header.frame_id
00151       length = len(_x)
00152       if python3 or type(_x) == unicode:
00153         _x = _x.encode('utf-8')
00154         length = len(_x)
00155       buff.write(struct.pack('<I%ss'%length, length, _x))
00156       length = len(self.object_list)
00157       buff.write(_struct_I.pack(length))
00158       for val1 in self.object_list:
00159         _x = val1.name
00160         length = len(_x)
00161         if python3 or type(_x) == unicode:
00162           _x = _x.encode('utf-8')
00163           length = len(_x)
00164         buff.write(struct.pack('<I%ss'%length, length, _x))
00165         _v1 = val1.pose
00166         _v2 = _v1.position
00167         _x = _v2
00168         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00169         _v3 = _v1.orientation
00170         _x = _v3
00171         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00172         _v4 = val1.pose2D
00173         _x = _v4
00174         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00175         length = len(val1.convex_hull_x)
00176         buff.write(_struct_I.pack(length))
00177         pattern = '<%sh'%length
00178         buff.write(struct.pack(pattern, *val1.convex_hull_x))
00179         length = len(val1.convex_hull_y)
00180         buff.write(_struct_I.pack(length))
00181         pattern = '<%sh'%length
00182         buff.write(struct.pack(pattern, *val1.convex_hull_y))
00183         _x = val1
00184         buff.write(_struct_fh.pack(_x.mean_quality, _x.used_points))
00185         length = len(val1.properties)
00186         buff.write(_struct_I.pack(length))
00187         for val2 in val1.properties:
00188           _x = val2.name
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 = val2.type
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 = val2.value
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         length = len(val1.pose_uncertainty_list)
00207         buff.write(_struct_I.pack(length))
00208         for val2 in val1.pose_uncertainty_list:
00209           _v5 = val2.position
00210           _x = _v5
00211           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00212           _v6 = val2.orientation
00213           _x = _v6
00214           buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00215       _x = self
00216       buff.write(_struct_4I.pack(_x.originalTimeStamp.secs, _x.originalTimeStamp.nsecs, _x.requestTimeStamp.secs, _x.requestTimeStamp.nsecs))
00217     except struct.error as se: self._check_types(se)
00218     except TypeError as te: self._check_types(te)
00219 
00220   def deserialize(self, str):
00221     """
00222     unpack serialized message in str into this message instance
00223     :param str: byte array of serialized message, ``str``
00224     """
00225     try:
00226       if self.header is None:
00227         self.header = std_msgs.msg.Header()
00228       if self.object_list is None:
00229         self.object_list = None
00230       if self.originalTimeStamp is None:
00231         self.originalTimeStamp = genpy.Time()
00232       if self.requestTimeStamp is None:
00233         self.requestTimeStamp = genpy.Time()
00234       end = 0
00235       _x = self
00236       start = end
00237       end += 12
00238       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00239       start = end
00240       end += 4
00241       (length,) = _struct_I.unpack(str[start:end])
00242       start = end
00243       end += length
00244       if python3:
00245         self.header.frame_id = str[start:end].decode('utf-8')
00246       else:
00247         self.header.frame_id = str[start:end]
00248       start = end
00249       end += 4
00250       (length,) = _struct_I.unpack(str[start:end])
00251       self.object_list = []
00252       for i in range(0, length):
00253         val1 = blort_ros.msg.ObjectPose()
00254         start = end
00255         end += 4
00256         (length,) = _struct_I.unpack(str[start:end])
00257         start = end
00258         end += length
00259         if python3:
00260           val1.name = str[start:end].decode('utf-8')
00261         else:
00262           val1.name = str[start:end]
00263         _v7 = val1.pose
00264         _v8 = _v7.position
00265         _x = _v8
00266         start = end
00267         end += 24
00268         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00269         _v9 = _v7.orientation
00270         _x = _v9
00271         start = end
00272         end += 32
00273         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00274         _v10 = val1.pose2D
00275         _x = _v10
00276         start = end
00277         end += 12
00278         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00279         start = end
00280         end += 4
00281         (length,) = _struct_I.unpack(str[start:end])
00282         pattern = '<%sh'%length
00283         start = end
00284         end += struct.calcsize(pattern)
00285         val1.convex_hull_x = struct.unpack(pattern, str[start:end])
00286         start = end
00287         end += 4
00288         (length,) = _struct_I.unpack(str[start:end])
00289         pattern = '<%sh'%length
00290         start = end
00291         end += struct.calcsize(pattern)
00292         val1.convex_hull_y = struct.unpack(pattern, str[start:end])
00293         _x = val1
00294         start = end
00295         end += 6
00296         (_x.mean_quality, _x.used_points,) = _struct_fh.unpack(str[start:end])
00297         start = end
00298         end += 4
00299         (length,) = _struct_I.unpack(str[start:end])
00300         val1.properties = []
00301         for i in range(0, length):
00302           val2 = blort_ros.msg.NameTypeValue()
00303           start = end
00304           end += 4
00305           (length,) = _struct_I.unpack(str[start:end])
00306           start = end
00307           end += length
00308           if python3:
00309             val2.name = str[start:end].decode('utf-8')
00310           else:
00311             val2.name = str[start:end]
00312           start = end
00313           end += 4
00314           (length,) = _struct_I.unpack(str[start:end])
00315           start = end
00316           end += length
00317           if python3:
00318             val2.type = str[start:end].decode('utf-8')
00319           else:
00320             val2.type = str[start:end]
00321           start = end
00322           end += 4
00323           (length,) = _struct_I.unpack(str[start:end])
00324           start = end
00325           end += length
00326           if python3:
00327             val2.value = str[start:end].decode('utf-8')
00328           else:
00329             val2.value = str[start:end]
00330           val1.properties.append(val2)
00331         start = end
00332         end += 4
00333         (length,) = _struct_I.unpack(str[start:end])
00334         val1.pose_uncertainty_list = []
00335         for i in range(0, length):
00336           val2 = geometry_msgs.msg.Pose()
00337           _v11 = val2.position
00338           _x = _v11
00339           start = end
00340           end += 24
00341           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00342           _v12 = val2.orientation
00343           _x = _v12
00344           start = end
00345           end += 32
00346           (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00347           val1.pose_uncertainty_list.append(val2)
00348         self.object_list.append(val1)
00349       _x = self
00350       start = end
00351       end += 16
00352       (_x.originalTimeStamp.secs, _x.originalTimeStamp.nsecs, _x.requestTimeStamp.secs, _x.requestTimeStamp.nsecs,) = _struct_4I.unpack(str[start:end])
00353       self.originalTimeStamp.canon()
00354       self.requestTimeStamp.canon()
00355       return self
00356     except struct.error as e:
00357       raise genpy.DeserializationError(e) #most likely buffer underfill
00358 
00359 
00360   def serialize_numpy(self, buff, numpy):
00361     """
00362     serialize message with numpy array types into buffer
00363     :param buff: buffer, ``StringIO``
00364     :param numpy: numpy python module
00365     """
00366     try:
00367       _x = self
00368       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00369       _x = self.header.frame_id
00370       length = len(_x)
00371       if python3 or type(_x) == unicode:
00372         _x = _x.encode('utf-8')
00373         length = len(_x)
00374       buff.write(struct.pack('<I%ss'%length, length, _x))
00375       length = len(self.object_list)
00376       buff.write(_struct_I.pack(length))
00377       for val1 in self.object_list:
00378         _x = val1.name
00379         length = len(_x)
00380         if python3 or type(_x) == unicode:
00381           _x = _x.encode('utf-8')
00382           length = len(_x)
00383         buff.write(struct.pack('<I%ss'%length, length, _x))
00384         _v13 = val1.pose
00385         _v14 = _v13.position
00386         _x = _v14
00387         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00388         _v15 = _v13.orientation
00389         _x = _v15
00390         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00391         _v16 = val1.pose2D
00392         _x = _v16
00393         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00394         length = len(val1.convex_hull_x)
00395         buff.write(_struct_I.pack(length))
00396         pattern = '<%sh'%length
00397         buff.write(val1.convex_hull_x.tostring())
00398         length = len(val1.convex_hull_y)
00399         buff.write(_struct_I.pack(length))
00400         pattern = '<%sh'%length
00401         buff.write(val1.convex_hull_y.tostring())
00402         _x = val1
00403         buff.write(_struct_fh.pack(_x.mean_quality, _x.used_points))
00404         length = len(val1.properties)
00405         buff.write(_struct_I.pack(length))
00406         for val2 in val1.properties:
00407           _x = val2.name
00408           length = len(_x)
00409           if python3 or type(_x) == unicode:
00410             _x = _x.encode('utf-8')
00411             length = len(_x)
00412           buff.write(struct.pack('<I%ss'%length, length, _x))
00413           _x = val2.type
00414           length = len(_x)
00415           if python3 or type(_x) == unicode:
00416             _x = _x.encode('utf-8')
00417             length = len(_x)
00418           buff.write(struct.pack('<I%ss'%length, length, _x))
00419           _x = val2.value
00420           length = len(_x)
00421           if python3 or type(_x) == unicode:
00422             _x = _x.encode('utf-8')
00423             length = len(_x)
00424           buff.write(struct.pack('<I%ss'%length, length, _x))
00425         length = len(val1.pose_uncertainty_list)
00426         buff.write(_struct_I.pack(length))
00427         for val2 in val1.pose_uncertainty_list:
00428           _v17 = val2.position
00429           _x = _v17
00430           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00431           _v18 = val2.orientation
00432           _x = _v18
00433           buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00434       _x = self
00435       buff.write(_struct_4I.pack(_x.originalTimeStamp.secs, _x.originalTimeStamp.nsecs, _x.requestTimeStamp.secs, _x.requestTimeStamp.nsecs))
00436     except struct.error as se: self._check_types(se)
00437     except TypeError as te: self._check_types(te)
00438 
00439   def deserialize_numpy(self, str, numpy):
00440     """
00441     unpack serialized message in str into this message instance using numpy for array types
00442     :param str: byte array of serialized message, ``str``
00443     :param numpy: numpy python module
00444     """
00445     try:
00446       if self.header is None:
00447         self.header = std_msgs.msg.Header()
00448       if self.object_list is None:
00449         self.object_list = None
00450       if self.originalTimeStamp is None:
00451         self.originalTimeStamp = genpy.Time()
00452       if self.requestTimeStamp is None:
00453         self.requestTimeStamp = genpy.Time()
00454       end = 0
00455       _x = self
00456       start = end
00457       end += 12
00458       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00459       start = end
00460       end += 4
00461       (length,) = _struct_I.unpack(str[start:end])
00462       start = end
00463       end += length
00464       if python3:
00465         self.header.frame_id = str[start:end].decode('utf-8')
00466       else:
00467         self.header.frame_id = str[start:end]
00468       start = end
00469       end += 4
00470       (length,) = _struct_I.unpack(str[start:end])
00471       self.object_list = []
00472       for i in range(0, length):
00473         val1 = blort_ros.msg.ObjectPose()
00474         start = end
00475         end += 4
00476         (length,) = _struct_I.unpack(str[start:end])
00477         start = end
00478         end += length
00479         if python3:
00480           val1.name = str[start:end].decode('utf-8')
00481         else:
00482           val1.name = str[start:end]
00483         _v19 = val1.pose
00484         _v20 = _v19.position
00485         _x = _v20
00486         start = end
00487         end += 24
00488         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00489         _v21 = _v19.orientation
00490         _x = _v21
00491         start = end
00492         end += 32
00493         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00494         _v22 = val1.pose2D
00495         _x = _v22
00496         start = end
00497         end += 12
00498         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00499         start = end
00500         end += 4
00501         (length,) = _struct_I.unpack(str[start:end])
00502         pattern = '<%sh'%length
00503         start = end
00504         end += struct.calcsize(pattern)
00505         val1.convex_hull_x = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=length)
00506         start = end
00507         end += 4
00508         (length,) = _struct_I.unpack(str[start:end])
00509         pattern = '<%sh'%length
00510         start = end
00511         end += struct.calcsize(pattern)
00512         val1.convex_hull_y = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=length)
00513         _x = val1
00514         start = end
00515         end += 6
00516         (_x.mean_quality, _x.used_points,) = _struct_fh.unpack(str[start:end])
00517         start = end
00518         end += 4
00519         (length,) = _struct_I.unpack(str[start:end])
00520         val1.properties = []
00521         for i in range(0, length):
00522           val2 = blort_ros.msg.NameTypeValue()
00523           start = end
00524           end += 4
00525           (length,) = _struct_I.unpack(str[start:end])
00526           start = end
00527           end += length
00528           if python3:
00529             val2.name = str[start:end].decode('utf-8')
00530           else:
00531             val2.name = str[start:end]
00532           start = end
00533           end += 4
00534           (length,) = _struct_I.unpack(str[start:end])
00535           start = end
00536           end += length
00537           if python3:
00538             val2.type = str[start:end].decode('utf-8')
00539           else:
00540             val2.type = str[start:end]
00541           start = end
00542           end += 4
00543           (length,) = _struct_I.unpack(str[start:end])
00544           start = end
00545           end += length
00546           if python3:
00547             val2.value = str[start:end].decode('utf-8')
00548           else:
00549             val2.value = str[start:end]
00550           val1.properties.append(val2)
00551         start = end
00552         end += 4
00553         (length,) = _struct_I.unpack(str[start:end])
00554         val1.pose_uncertainty_list = []
00555         for i in range(0, length):
00556           val2 = geometry_msgs.msg.Pose()
00557           _v23 = val2.position
00558           _x = _v23
00559           start = end
00560           end += 24
00561           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00562           _v24 = val2.orientation
00563           _x = _v24
00564           start = end
00565           end += 32
00566           (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00567           val1.pose_uncertainty_list.append(val2)
00568         self.object_list.append(val1)
00569       _x = self
00570       start = end
00571       end += 16
00572       (_x.originalTimeStamp.secs, _x.originalTimeStamp.nsecs, _x.requestTimeStamp.secs, _x.requestTimeStamp.nsecs,) = _struct_4I.unpack(str[start:end])
00573       self.originalTimeStamp.canon()
00574       self.requestTimeStamp.canon()
00575       return self
00576     except struct.error as e:
00577       raise genpy.DeserializationError(e) #most likely buffer underfill
00578 
00579 _struct_I = genpy.struct_I
00580 _struct_3I = struct.Struct("<3I")
00581 _struct_4I = struct.Struct("<4I")
00582 _struct_fh = struct.Struct("<fh")
00583 _struct_4d = struct.Struct("<4d")
00584 _struct_3f = struct.Struct("<3f")
00585 _struct_3d = struct.Struct("<3d")


blort_ros
Author(s): Bence Magyar
autogenerated on Thu Jan 2 2014 11:39:12