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


hector_worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Oct 6 2014 00:36:26