00001 """autogenerated by genmsg_py from algorithm_evaluation.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import vision_msgs.msg
00006
00007 class algorithm_evaluation(roslib.message.Message):
00008 _md5sum = "e07475feaa79c93a297b4d8386124d13"
00009 _type = "vision_msgs/algorithm_evaluation"
00010 _has_header = False
00011 _full_text = """#Message that contains basic information regarding an algorithm U. Klank klank@in.tum.de
00012 string plugin_name # Perception primitive that caused this answer
00013 float64 basic_evaluation # A score describing the basic score of this algorithm, should reflect the significance of the results
00014 object_algorithm_relation[] objects # All objects that were executed with this algotihm and their results
00015
00016 ================================================================================
00017 MSG: vision_msgs/object_algorithm_relation
00018 #Message that contains basic information regarding the evaluation of an algorithm and its objects U. Klank klank@in.tum.de
00019 uint64 object_id
00020 float64 basic_evaluation
00021
00022 """
00023 __slots__ = ['plugin_name','basic_evaluation','objects']
00024 _slot_types = ['string','float64','vision_msgs/object_algorithm_relation[]']
00025
00026 def __init__(self, *args, **kwds):
00027 """
00028 Constructor. Any message fields that are implicitly/explicitly
00029 set to None will be assigned a default value. The recommend
00030 use is keyword arguments as this is more robust to future message
00031 changes. You cannot mix in-order arguments and keyword arguments.
00032
00033 The available fields are:
00034 plugin_name,basic_evaluation,objects
00035
00036 @param args: complete set of field values, in .msg order
00037 @param kwds: use keyword arguments corresponding to message field names
00038 to set specific fields.
00039 """
00040 if args or kwds:
00041 super(algorithm_evaluation, self).__init__(*args, **kwds)
00042
00043 if self.plugin_name is None:
00044 self.plugin_name = ''
00045 if self.basic_evaluation is None:
00046 self.basic_evaluation = 0.
00047 if self.objects is None:
00048 self.objects = []
00049 else:
00050 self.plugin_name = ''
00051 self.basic_evaluation = 0.
00052 self.objects = []
00053
00054 def _get_types(self):
00055 """
00056 internal API method
00057 """
00058 return self._slot_types
00059
00060 def serialize(self, buff):
00061 """
00062 serialize message into buffer
00063 @param buff: buffer
00064 @type buff: StringIO
00065 """
00066 try:
00067 _x = self.plugin_name
00068 length = len(_x)
00069 buff.write(struct.pack('<I%ss'%length, length, _x))
00070 buff.write(_struct_d.pack(self.basic_evaluation))
00071 length = len(self.objects)
00072 buff.write(_struct_I.pack(length))
00073 for val1 in self.objects:
00074 _x = val1
00075 buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation))
00076 except struct.error, se: self._check_types(se)
00077 except TypeError, te: self._check_types(te)
00078
00079 def deserialize(self, str):
00080 """
00081 unpack serialized message in str into this message instance
00082 @param str: byte array of serialized message
00083 @type str: str
00084 """
00085 try:
00086 end = 0
00087 start = end
00088 end += 4
00089 (length,) = _struct_I.unpack(str[start:end])
00090 start = end
00091 end += length
00092 self.plugin_name = str[start:end]
00093 start = end
00094 end += 8
00095 (self.basic_evaluation,) = _struct_d.unpack(str[start:end])
00096 start = end
00097 end += 4
00098 (length,) = _struct_I.unpack(str[start:end])
00099 self.objects = []
00100 for i in xrange(0, length):
00101 val1 = vision_msgs.msg.object_algorithm_relation()
00102 _x = val1
00103 start = end
00104 end += 16
00105 (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end])
00106 self.objects.append(val1)
00107 return self
00108 except struct.error, e:
00109 raise roslib.message.DeserializationError(e)
00110
00111
00112 def serialize_numpy(self, buff, numpy):
00113 """
00114 serialize message with numpy array types into buffer
00115 @param buff: buffer
00116 @type buff: StringIO
00117 @param numpy: numpy python module
00118 @type numpy module
00119 """
00120 try:
00121 _x = self.plugin_name
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 buff.write(_struct_d.pack(self.basic_evaluation))
00125 length = len(self.objects)
00126 buff.write(_struct_I.pack(length))
00127 for val1 in self.objects:
00128 _x = val1
00129 buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation))
00130 except struct.error, se: self._check_types(se)
00131 except TypeError, te: self._check_types(te)
00132
00133 def deserialize_numpy(self, str, numpy):
00134 """
00135 unpack serialized message in str into this message instance using numpy for array types
00136 @param str: byte array of serialized message
00137 @type str: str
00138 @param numpy: numpy python module
00139 @type numpy: module
00140 """
00141 try:
00142 end = 0
00143 start = end
00144 end += 4
00145 (length,) = _struct_I.unpack(str[start:end])
00146 start = end
00147 end += length
00148 self.plugin_name = str[start:end]
00149 start = end
00150 end += 8
00151 (self.basic_evaluation,) = _struct_d.unpack(str[start:end])
00152 start = end
00153 end += 4
00154 (length,) = _struct_I.unpack(str[start:end])
00155 self.objects = []
00156 for i in xrange(0, length):
00157 val1 = vision_msgs.msg.object_algorithm_relation()
00158 _x = val1
00159 start = end
00160 end += 16
00161 (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end])
00162 self.objects.append(val1)
00163 return self
00164 except struct.error, e:
00165 raise roslib.message.DeserializationError(e)
00166
00167 _struct_I = roslib.message.struct_I
00168 _struct_d = struct.Struct("<d")
00169 _struct_Qd = struct.Struct("<Qd")