$search
00001 """autogenerated by genmsg_py from HectorDebugInfo.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import hector_mapping.msg 00006 00007 class HectorDebugInfo(roslib.message.Message): 00008 _md5sum = "4d33c0696c0c536f5c1447c260756674" 00009 _type = "hector_mapping/HectorDebugInfo" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """HectorIterData[] iterData 00012 ================================================================================ 00013 MSG: hector_mapping/HectorIterData 00014 float64[9] hessian 00015 float64 conditionNum 00016 float64 determinant 00017 float64 conditionNum2d 00018 float64 determinant2d 00019 00020 """ 00021 __slots__ = ['iterData'] 00022 _slot_types = ['hector_mapping/HectorIterData[]'] 00023 00024 def __init__(self, *args, **kwds): 00025 """ 00026 Constructor. Any message fields that are implicitly/explicitly 00027 set to None will be assigned a default value. The recommend 00028 use is keyword arguments as this is more robust to future message 00029 changes. You cannot mix in-order arguments and keyword arguments. 00030 00031 The available fields are: 00032 iterData 00033 00034 @param args: complete set of field values, in .msg order 00035 @param kwds: use keyword arguments corresponding to message field names 00036 to set specific fields. 00037 """ 00038 if args or kwds: 00039 super(HectorDebugInfo, self).__init__(*args, **kwds) 00040 #message fields cannot be None, assign default values for those that are 00041 if self.iterData is None: 00042 self.iterData = [] 00043 else: 00044 self.iterData = [] 00045 00046 def _get_types(self): 00047 """ 00048 internal API method 00049 """ 00050 return self._slot_types 00051 00052 def serialize(self, buff): 00053 """ 00054 serialize message into buffer 00055 @param buff: buffer 00056 @type buff: StringIO 00057 """ 00058 try: 00059 length = len(self.iterData) 00060 buff.write(_struct_I.pack(length)) 00061 for val1 in self.iterData: 00062 buff.write(_struct_9d.pack(*val1.hessian)) 00063 _x = val1 00064 buff.write(_struct_4d.pack(_x.conditionNum, _x.determinant, _x.conditionNum2d, _x.determinant2d)) 00065 except struct.error as se: self._check_types(se) 00066 except TypeError as te: self._check_types(te) 00067 00068 def deserialize(self, str): 00069 """ 00070 unpack serialized message in str into this message instance 00071 @param str: byte array of serialized message 00072 @type str: str 00073 """ 00074 try: 00075 end = 0 00076 start = end 00077 end += 4 00078 (length,) = _struct_I.unpack(str[start:end]) 00079 self.iterData = [] 00080 for i in range(0, length): 00081 val1 = hector_mapping.msg.HectorIterData() 00082 start = end 00083 end += 72 00084 val1.hessian = _struct_9d.unpack(str[start:end]) 00085 _x = val1 00086 start = end 00087 end += 32 00088 (_x.conditionNum, _x.determinant, _x.conditionNum2d, _x.determinant2d,) = _struct_4d.unpack(str[start:end]) 00089 self.iterData.append(val1) 00090 return self 00091 except struct.error as e: 00092 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00093 00094 00095 def serialize_numpy(self, buff, numpy): 00096 """ 00097 serialize message with numpy array types into buffer 00098 @param buff: buffer 00099 @type buff: StringIO 00100 @param numpy: numpy python module 00101 @type numpy module 00102 """ 00103 try: 00104 length = len(self.iterData) 00105 buff.write(_struct_I.pack(length)) 00106 for val1 in self.iterData: 00107 buff.write(val1.hessian.tostring()) 00108 _x = val1 00109 buff.write(_struct_4d.pack(_x.conditionNum, _x.determinant, _x.conditionNum2d, _x.determinant2d)) 00110 except struct.error as se: self._check_types(se) 00111 except TypeError as te: self._check_types(te) 00112 00113 def deserialize_numpy(self, str, numpy): 00114 """ 00115 unpack serialized message in str into this message instance using numpy for array types 00116 @param str: byte array of serialized message 00117 @type str: str 00118 @param numpy: numpy python module 00119 @type numpy: module 00120 """ 00121 try: 00122 end = 0 00123 start = end 00124 end += 4 00125 (length,) = _struct_I.unpack(str[start:end]) 00126 self.iterData = [] 00127 for i in range(0, length): 00128 val1 = hector_mapping.msg.HectorIterData() 00129 start = end 00130 end += 72 00131 val1.hessian = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9) 00132 _x = val1 00133 start = end 00134 end += 32 00135 (_x.conditionNum, _x.determinant, _x.conditionNum2d, _x.determinant2d,) = _struct_4d.unpack(str[start:end]) 00136 self.iterData.append(val1) 00137 return self 00138 except struct.error as e: 00139 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00140 00141 _struct_I = roslib.message.struct_I 00142 _struct_4d = struct.Struct("<4d") 00143 _struct_9d = struct.Struct("<9d")