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


worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Sep 2 2013 11:37:27