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