00001 """autogenerated by genpy from worldmodel_msgs/VerifyPerceptRequest.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 worldmodel_msgs.msg
00009 import std_msgs.msg
00010
00011 class VerifyPerceptRequest(genpy.Message):
00012 _md5sum = "9bd63c0c584500367d789d059094e625"
00013 _type = "worldmodel_msgs/VerifyPerceptRequest"
00014 _has_header = False
00015 _full_text = """
00016
00017
00018 PosePercept percept
00019
00020 ================================================================================
00021 MSG: worldmodel_msgs/PosePercept
00022 # This message represents an observation of an object in a single image.
00023
00024 # The header should equal the header of the corresponding image.
00025 Header header
00026
00027 # The estimated pose of the object with its covariance
00028 geometry_msgs/PoseWithCovariance pose
00029
00030 # Additional information about the percept
00031 worldmodel_msgs/PerceptInfo info
00032
00033 ================================================================================
00034 MSG: std_msgs/Header
00035 # Standard metadata for higher-level stamped data types.
00036 # This is generally used to communicate timestamped data
00037 # in a particular coordinate frame.
00038 #
00039 # sequence ID: consecutively increasing ID
00040 uint32 seq
00041 #Two-integer timestamp that is expressed as:
00042 # * stamp.secs: seconds (stamp_secs) since epoch
00043 # * stamp.nsecs: nanoseconds since stamp_secs
00044 # time-handling sugar is provided by the client library
00045 time stamp
00046 #Frame this data is associated with
00047 # 0: no frame
00048 # 1: global frame
00049 string frame_id
00050
00051 ================================================================================
00052 MSG: geometry_msgs/PoseWithCovariance
00053 # This represents a pose in free space with uncertainty.
00054
00055 Pose pose
00056
00057 # Row-major representation of the 6x6 covariance matrix
00058 # The orientation parameters use a fixed-axis representation.
00059 # In order, the parameters are:
00060 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00061 float64[36] covariance
00062
00063 ================================================================================
00064 MSG: geometry_msgs/Pose
00065 # A representation of pose in free space, composed of postion and orientation.
00066 Point position
00067 Quaternion orientation
00068
00069 ================================================================================
00070 MSG: geometry_msgs/Point
00071 # This contains the position of a point in free space
00072 float64 x
00073 float64 y
00074 float64 z
00075
00076 ================================================================================
00077 MSG: geometry_msgs/Quaternion
00078 # This represents an orientation in free space in quaternion form.
00079
00080 float64 x
00081 float64 y
00082 float64 z
00083 float64 w
00084
00085 ================================================================================
00086 MSG: worldmodel_msgs/PerceptInfo
00087 # This message contains information about the estimated class and object identity
00088
00089 # A string identifying the object's class (all objects of a class look the same)
00090 string class_id
00091
00092 # The class association support of the observation
00093 # The support is the log odd likelihood ratio given by log(p(y/observation y belongs to object of class class_id) / p(y/observation y is a false positive))
00094 float32 class_support
00095
00096 # A string identifying a specific object
00097 string object_id
00098
00099 # The object association support of the observation
00100 # The support is the log odd likelihood ratio given by log(p(observation belongs to object object_id) / p(observation is false positive or belongs to another object))
00101 float32 object_support
00102
00103 # A string that contains the name or a description of the specific object
00104 string name
00105
00106 """
00107 __slots__ = ['percept']
00108 _slot_types = ['worldmodel_msgs/PosePercept']
00109
00110 def __init__(self, *args, **kwds):
00111 """
00112 Constructor. Any message fields that are implicitly/explicitly
00113 set to None will be assigned a default value. The recommend
00114 use is keyword arguments as this is more robust to future message
00115 changes. You cannot mix in-order arguments and keyword arguments.
00116
00117 The available fields are:
00118 percept
00119
00120 :param args: complete set of field values, in .msg order
00121 :param kwds: use keyword arguments corresponding to message field names
00122 to set specific fields.
00123 """
00124 if args or kwds:
00125 super(VerifyPerceptRequest, self).__init__(*args, **kwds)
00126
00127 if self.percept is None:
00128 self.percept = worldmodel_msgs.msg.PosePercept()
00129 else:
00130 self.percept = worldmodel_msgs.msg.PosePercept()
00131
00132 def _get_types(self):
00133 """
00134 internal API method
00135 """
00136 return self._slot_types
00137
00138 def serialize(self, buff):
00139 """
00140 serialize message into buffer
00141 :param buff: buffer, ``StringIO``
00142 """
00143 try:
00144 _x = self
00145 buff.write(_struct_3I.pack(_x.percept.header.seq, _x.percept.header.stamp.secs, _x.percept.header.stamp.nsecs))
00146 _x = self.percept.header.frame_id
00147 length = len(_x)
00148 if python3 or type(_x) == unicode:
00149 _x = _x.encode('utf-8')
00150 length = len(_x)
00151 buff.write(struct.pack('<I%ss'%length, length, _x))
00152 _x = self
00153 buff.write(_struct_7d.pack(_x.percept.pose.pose.position.x, _x.percept.pose.pose.position.y, _x.percept.pose.pose.position.z, _x.percept.pose.pose.orientation.x, _x.percept.pose.pose.orientation.y, _x.percept.pose.pose.orientation.z, _x.percept.pose.pose.orientation.w))
00154 buff.write(_struct_36d.pack(*self.percept.pose.covariance))
00155 _x = self.percept.info.class_id
00156 length = len(_x)
00157 if python3 or type(_x) == unicode:
00158 _x = _x.encode('utf-8')
00159 length = len(_x)
00160 buff.write(struct.pack('<I%ss'%length, length, _x))
00161 buff.write(_struct_f.pack(self.percept.info.class_support))
00162 _x = self.percept.info.object_id
00163 length = len(_x)
00164 if python3 or type(_x) == unicode:
00165 _x = _x.encode('utf-8')
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 buff.write(_struct_f.pack(self.percept.info.object_support))
00169 _x = self.percept.info.name
00170 length = len(_x)
00171 if python3 or type(_x) == unicode:
00172 _x = _x.encode('utf-8')
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 except struct.error as se: self._check_types(se)
00176 except TypeError as te: self._check_types(te)
00177
00178 def deserialize(self, str):
00179 """
00180 unpack serialized message in str into this message instance
00181 :param str: byte array of serialized message, ``str``
00182 """
00183 try:
00184 if self.percept is None:
00185 self.percept = worldmodel_msgs.msg.PosePercept()
00186 end = 0
00187 _x = self
00188 start = end
00189 end += 12
00190 (_x.percept.header.seq, _x.percept.header.stamp.secs, _x.percept.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00191 start = end
00192 end += 4
00193 (length,) = _struct_I.unpack(str[start:end])
00194 start = end
00195 end += length
00196 if python3:
00197 self.percept.header.frame_id = str[start:end].decode('utf-8')
00198 else:
00199 self.percept.header.frame_id = str[start:end]
00200 _x = self
00201 start = end
00202 end += 56
00203 (_x.percept.pose.pose.position.x, _x.percept.pose.pose.position.y, _x.percept.pose.pose.position.z, _x.percept.pose.pose.orientation.x, _x.percept.pose.pose.orientation.y, _x.percept.pose.pose.orientation.z, _x.percept.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00204 start = end
00205 end += 288
00206 self.percept.pose.covariance = _struct_36d.unpack(str[start:end])
00207 start = end
00208 end += 4
00209 (length,) = _struct_I.unpack(str[start:end])
00210 start = end
00211 end += length
00212 if python3:
00213 self.percept.info.class_id = str[start:end].decode('utf-8')
00214 else:
00215 self.percept.info.class_id = str[start:end]
00216 start = end
00217 end += 4
00218 (self.percept.info.class_support,) = _struct_f.unpack(str[start:end])
00219 start = end
00220 end += 4
00221 (length,) = _struct_I.unpack(str[start:end])
00222 start = end
00223 end += length
00224 if python3:
00225 self.percept.info.object_id = str[start:end].decode('utf-8')
00226 else:
00227 self.percept.info.object_id = str[start:end]
00228 start = end
00229 end += 4
00230 (self.percept.info.object_support,) = _struct_f.unpack(str[start:end])
00231 start = end
00232 end += 4
00233 (length,) = _struct_I.unpack(str[start:end])
00234 start = end
00235 end += length
00236 if python3:
00237 self.percept.info.name = str[start:end].decode('utf-8')
00238 else:
00239 self.percept.info.name = str[start:end]
00240 return self
00241 except struct.error as e:
00242 raise genpy.DeserializationError(e)
00243
00244
00245 def serialize_numpy(self, buff, numpy):
00246 """
00247 serialize message with numpy array types into buffer
00248 :param buff: buffer, ``StringIO``
00249 :param numpy: numpy python module
00250 """
00251 try:
00252 _x = self
00253 buff.write(_struct_3I.pack(_x.percept.header.seq, _x.percept.header.stamp.secs, _x.percept.header.stamp.nsecs))
00254 _x = self.percept.header.frame_id
00255 length = len(_x)
00256 if python3 or type(_x) == unicode:
00257 _x = _x.encode('utf-8')
00258 length = len(_x)
00259 buff.write(struct.pack('<I%ss'%length, length, _x))
00260 _x = self
00261 buff.write(_struct_7d.pack(_x.percept.pose.pose.position.x, _x.percept.pose.pose.position.y, _x.percept.pose.pose.position.z, _x.percept.pose.pose.orientation.x, _x.percept.pose.pose.orientation.y, _x.percept.pose.pose.orientation.z, _x.percept.pose.pose.orientation.w))
00262 buff.write(self.percept.pose.covariance.tostring())
00263 _x = self.percept.info.class_id
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 buff.write(_struct_f.pack(self.percept.info.class_support))
00270 _x = self.percept.info.object_id
00271 length = len(_x)
00272 if python3 or type(_x) == unicode:
00273 _x = _x.encode('utf-8')
00274 length = len(_x)
00275 buff.write(struct.pack('<I%ss'%length, length, _x))
00276 buff.write(_struct_f.pack(self.percept.info.object_support))
00277 _x = self.percept.info.name
00278 length = len(_x)
00279 if python3 or type(_x) == unicode:
00280 _x = _x.encode('utf-8')
00281 length = len(_x)
00282 buff.write(struct.pack('<I%ss'%length, length, _x))
00283 except struct.error as se: self._check_types(se)
00284 except TypeError as te: self._check_types(te)
00285
00286 def deserialize_numpy(self, str, numpy):
00287 """
00288 unpack serialized message in str into this message instance using numpy for array types
00289 :param str: byte array of serialized message, ``str``
00290 :param numpy: numpy python module
00291 """
00292 try:
00293 if self.percept is None:
00294 self.percept = worldmodel_msgs.msg.PosePercept()
00295 end = 0
00296 _x = self
00297 start = end
00298 end += 12
00299 (_x.percept.header.seq, _x.percept.header.stamp.secs, _x.percept.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00300 start = end
00301 end += 4
00302 (length,) = _struct_I.unpack(str[start:end])
00303 start = end
00304 end += length
00305 if python3:
00306 self.percept.header.frame_id = str[start:end].decode('utf-8')
00307 else:
00308 self.percept.header.frame_id = str[start:end]
00309 _x = self
00310 start = end
00311 end += 56
00312 (_x.percept.pose.pose.position.x, _x.percept.pose.pose.position.y, _x.percept.pose.pose.position.z, _x.percept.pose.pose.orientation.x, _x.percept.pose.pose.orientation.y, _x.percept.pose.pose.orientation.z, _x.percept.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00313 start = end
00314 end += 288
00315 self.percept.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 if python3:
00322 self.percept.info.class_id = str[start:end].decode('utf-8')
00323 else:
00324 self.percept.info.class_id = str[start:end]
00325 start = end
00326 end += 4
00327 (self.percept.info.class_support,) = _struct_f.unpack(str[start:end])
00328 start = end
00329 end += 4
00330 (length,) = _struct_I.unpack(str[start:end])
00331 start = end
00332 end += length
00333 if python3:
00334 self.percept.info.object_id = str[start:end].decode('utf-8')
00335 else:
00336 self.percept.info.object_id = str[start:end]
00337 start = end
00338 end += 4
00339 (self.percept.info.object_support,) = _struct_f.unpack(str[start:end])
00340 start = end
00341 end += 4
00342 (length,) = _struct_I.unpack(str[start:end])
00343 start = end
00344 end += length
00345 if python3:
00346 self.percept.info.name = str[start:end].decode('utf-8')
00347 else:
00348 self.percept.info.name = str[start:end]
00349 return self
00350 except struct.error as e:
00351 raise genpy.DeserializationError(e)
00352
00353 _struct_I = genpy.struct_I
00354 _struct_3I = struct.Struct("<3I")
00355 _struct_7d = struct.Struct("<7d")
00356 _struct_36d = struct.Struct("<36d")
00357 _struct_f = struct.Struct("<f")
00358 """autogenerated by genpy from worldmodel_msgs/VerifyPerceptResponse.msg. Do not edit."""
00359 import sys
00360 python3 = True if sys.hexversion > 0x03000000 else False
00361 import genpy
00362 import struct
00363
00364
00365 class VerifyPerceptResponse(genpy.Message):
00366 _md5sum = "a4e2509e523147799a63deb6a40a0721"
00367 _type = "worldmodel_msgs/VerifyPerceptResponse"
00368 _has_header = False
00369 _full_text = """
00370 uint8 response
00371 uint8 UNKNOWN = 0
00372 uint8 DISCARD = 1
00373 uint8 CONFIRM = 2
00374
00375
00376 """
00377
00378 UNKNOWN = 0
00379 DISCARD = 1
00380 CONFIRM = 2
00381
00382 __slots__ = ['response']
00383 _slot_types = ['uint8']
00384
00385 def __init__(self, *args, **kwds):
00386 """
00387 Constructor. Any message fields that are implicitly/explicitly
00388 set to None will be assigned a default value. The recommend
00389 use is keyword arguments as this is more robust to future message
00390 changes. You cannot mix in-order arguments and keyword arguments.
00391
00392 The available fields are:
00393 response
00394
00395 :param args: complete set of field values, in .msg order
00396 :param kwds: use keyword arguments corresponding to message field names
00397 to set specific fields.
00398 """
00399 if args or kwds:
00400 super(VerifyPerceptResponse, self).__init__(*args, **kwds)
00401
00402 if self.response is None:
00403 self.response = 0
00404 else:
00405 self.response = 0
00406
00407 def _get_types(self):
00408 """
00409 internal API method
00410 """
00411 return self._slot_types
00412
00413 def serialize(self, buff):
00414 """
00415 serialize message into buffer
00416 :param buff: buffer, ``StringIO``
00417 """
00418 try:
00419 buff.write(_struct_B.pack(self.response))
00420 except struct.error as se: self._check_types(se)
00421 except TypeError as te: self._check_types(te)
00422
00423 def deserialize(self, str):
00424 """
00425 unpack serialized message in str into this message instance
00426 :param str: byte array of serialized message, ``str``
00427 """
00428 try:
00429 end = 0
00430 start = end
00431 end += 1
00432 (self.response,) = _struct_B.unpack(str[start:end])
00433 return self
00434 except struct.error as e:
00435 raise genpy.DeserializationError(e)
00436
00437
00438 def serialize_numpy(self, buff, numpy):
00439 """
00440 serialize message with numpy array types into buffer
00441 :param buff: buffer, ``StringIO``
00442 :param numpy: numpy python module
00443 """
00444 try:
00445 buff.write(_struct_B.pack(self.response))
00446 except struct.error as se: self._check_types(se)
00447 except TypeError as te: self._check_types(te)
00448
00449 def deserialize_numpy(self, str, numpy):
00450 """
00451 unpack serialized message in str into this message instance using numpy for array types
00452 :param str: byte array of serialized message, ``str``
00453 :param numpy: numpy python module
00454 """
00455 try:
00456 end = 0
00457 start = end
00458 end += 1
00459 (self.response,) = _struct_B.unpack(str[start:end])
00460 return self
00461 except struct.error as e:
00462 raise genpy.DeserializationError(e)
00463
00464 _struct_I = genpy.struct_I
00465 _struct_B = struct.Struct("<B")
00466 class VerifyPercept(object):
00467 _type = 'worldmodel_msgs/VerifyPercept'
00468 _md5sum = '4274b9c0812a5a8c107aa29835bb1b45'
00469 _request_class = VerifyPerceptRequest
00470 _response_class = VerifyPerceptResponse