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