$search
00001 """autogenerated by genmsg_py from ExecutiveState.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ExecutiveState(roslib.message.Message): 00007 _md5sum = "87a76fce09087102a8a2c11f3e8fb6be" 00008 _type = "flirtlib_ros/ExecutiveState" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# Will the node publish localization messages to reset amcl if possible? 00011 bool publishing_localization 00012 00013 # How bad the current localization is 00014 float32 localization_badness 00015 00016 # How many successful navigations have been observed so far 00017 uint32 successful_navs 00018 """ 00019 __slots__ = ['publishing_localization','localization_badness','successful_navs'] 00020 _slot_types = ['bool','float32','uint32'] 00021 00022 def __init__(self, *args, **kwds): 00023 """ 00024 Constructor. Any message fields that are implicitly/explicitly 00025 set to None will be assigned a default value. The recommend 00026 use is keyword arguments as this is more robust to future message 00027 changes. You cannot mix in-order arguments and keyword arguments. 00028 00029 The available fields are: 00030 publishing_localization,localization_badness,successful_navs 00031 00032 @param args: complete set of field values, in .msg order 00033 @param kwds: use keyword arguments corresponding to message field names 00034 to set specific fields. 00035 """ 00036 if args or kwds: 00037 super(ExecutiveState, self).__init__(*args, **kwds) 00038 #message fields cannot be None, assign default values for those that are 00039 if self.publishing_localization is None: 00040 self.publishing_localization = False 00041 if self.localization_badness is None: 00042 self.localization_badness = 0. 00043 if self.successful_navs is None: 00044 self.successful_navs = 0 00045 else: 00046 self.publishing_localization = False 00047 self.localization_badness = 0. 00048 self.successful_navs = 0 00049 00050 def _get_types(self): 00051 """ 00052 internal API method 00053 """ 00054 return self._slot_types 00055 00056 def serialize(self, buff): 00057 """ 00058 serialize message into buffer 00059 @param buff: buffer 00060 @type buff: StringIO 00061 """ 00062 try: 00063 _x = self 00064 buff.write(_struct_BfI.pack(_x.publishing_localization, _x.localization_badness, _x.successful_navs)) 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 _x = self 00077 start = end 00078 end += 9 00079 (_x.publishing_localization, _x.localization_badness, _x.successful_navs,) = _struct_BfI.unpack(str[start:end]) 00080 self.publishing_localization = bool(self.publishing_localization) 00081 return self 00082 except struct.error as e: 00083 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00084 00085 00086 def serialize_numpy(self, buff, numpy): 00087 """ 00088 serialize message with numpy array types into buffer 00089 @param buff: buffer 00090 @type buff: StringIO 00091 @param numpy: numpy python module 00092 @type numpy module 00093 """ 00094 try: 00095 _x = self 00096 buff.write(_struct_BfI.pack(_x.publishing_localization, _x.localization_badness, _x.successful_navs)) 00097 except struct.error as se: self._check_types(se) 00098 except TypeError as te: self._check_types(te) 00099 00100 def deserialize_numpy(self, str, numpy): 00101 """ 00102 unpack serialized message in str into this message instance using numpy for array types 00103 @param str: byte array of serialized message 00104 @type str: str 00105 @param numpy: numpy python module 00106 @type numpy: module 00107 """ 00108 try: 00109 end = 0 00110 _x = self 00111 start = end 00112 end += 9 00113 (_x.publishing_localization, _x.localization_badness, _x.successful_navs,) = _struct_BfI.unpack(str[start:end]) 00114 self.publishing_localization = bool(self.publishing_localization) 00115 return self 00116 except struct.error as e: 00117 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00118 00119 _struct_I = roslib.message.struct_I 00120 _struct_BfI = struct.Struct("<BfI")