$search
00001 """autogenerated by genmsg_py from FindFiducialGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class FindFiducialGoal(roslib.message.Message): 00007 _md5sum = "8906385fe785bb5733551eb61968fe5b" 00008 _type = "turtlebot_actions/FindFiducialGoal" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 #goal definition 00012 uint8 CHESSBOARD = 1 00013 uint8 CIRCLES_GRID = 2 00014 uint8 ASYMMETRIC_CIRCLES_GRID =3 00015 00016 string camera_name # name of the camera 00017 uint8 pattern_width # number of objects across 00018 uint8 pattern_height # number of objects down 00019 float32 pattern_size # size the object pattern (square size or circle size) 00020 uint8 pattern_type # type of pattern (CHESSBOARD, CIRCLES_GRID, ASYMMETRIC_CIRCLES_GRID) 00021 00022 """ 00023 # Pseudo-constants 00024 CHESSBOARD = 1 00025 CIRCLES_GRID = 2 00026 ASYMMETRIC_CIRCLES_GRID = 3 00027 00028 __slots__ = ['camera_name','pattern_width','pattern_height','pattern_size','pattern_type'] 00029 _slot_types = ['string','uint8','uint8','float32','uint8'] 00030 00031 def __init__(self, *args, **kwds): 00032 """ 00033 Constructor. Any message fields that are implicitly/explicitly 00034 set to None will be assigned a default value. The recommend 00035 use is keyword arguments as this is more robust to future message 00036 changes. You cannot mix in-order arguments and keyword arguments. 00037 00038 The available fields are: 00039 camera_name,pattern_width,pattern_height,pattern_size,pattern_type 00040 00041 @param args: complete set of field values, in .msg order 00042 @param kwds: use keyword arguments corresponding to message field names 00043 to set specific fields. 00044 """ 00045 if args or kwds: 00046 super(FindFiducialGoal, self).__init__(*args, **kwds) 00047 #message fields cannot be None, assign default values for those that are 00048 if self.camera_name is None: 00049 self.camera_name = '' 00050 if self.pattern_width is None: 00051 self.pattern_width = 0 00052 if self.pattern_height is None: 00053 self.pattern_height = 0 00054 if self.pattern_size is None: 00055 self.pattern_size = 0. 00056 if self.pattern_type is None: 00057 self.pattern_type = 0 00058 else: 00059 self.camera_name = '' 00060 self.pattern_width = 0 00061 self.pattern_height = 0 00062 self.pattern_size = 0. 00063 self.pattern_type = 0 00064 00065 def _get_types(self): 00066 """ 00067 internal API method 00068 """ 00069 return self._slot_types 00070 00071 def serialize(self, buff): 00072 """ 00073 serialize message into buffer 00074 @param buff: buffer 00075 @type buff: StringIO 00076 """ 00077 try: 00078 _x = self.camera_name 00079 length = len(_x) 00080 buff.write(struct.pack('<I%ss'%length, length, _x)) 00081 _x = self 00082 buff.write(_struct_2BfB.pack(_x.pattern_width, _x.pattern_height, _x.pattern_size, _x.pattern_type)) 00083 except struct.error as se: self._check_types(se) 00084 except TypeError as te: self._check_types(te) 00085 00086 def deserialize(self, str): 00087 """ 00088 unpack serialized message in str into this message instance 00089 @param str: byte array of serialized message 00090 @type str: str 00091 """ 00092 try: 00093 end = 0 00094 start = end 00095 end += 4 00096 (length,) = _struct_I.unpack(str[start:end]) 00097 start = end 00098 end += length 00099 self.camera_name = str[start:end] 00100 _x = self 00101 start = end 00102 end += 7 00103 (_x.pattern_width, _x.pattern_height, _x.pattern_size, _x.pattern_type,) = _struct_2BfB.unpack(str[start:end]) 00104 return self 00105 except struct.error as e: 00106 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00107 00108 00109 def serialize_numpy(self, buff, numpy): 00110 """ 00111 serialize message with numpy array types into buffer 00112 @param buff: buffer 00113 @type buff: StringIO 00114 @param numpy: numpy python module 00115 @type numpy module 00116 """ 00117 try: 00118 _x = self.camera_name 00119 length = len(_x) 00120 buff.write(struct.pack('<I%ss'%length, length, _x)) 00121 _x = self 00122 buff.write(_struct_2BfB.pack(_x.pattern_width, _x.pattern_height, _x.pattern_size, _x.pattern_type)) 00123 except struct.error as se: self._check_types(se) 00124 except TypeError as te: self._check_types(te) 00125 00126 def deserialize_numpy(self, str, numpy): 00127 """ 00128 unpack serialized message in str into this message instance using numpy for array types 00129 @param str: byte array of serialized message 00130 @type str: str 00131 @param numpy: numpy python module 00132 @type numpy: module 00133 """ 00134 try: 00135 end = 0 00136 start = end 00137 end += 4 00138 (length,) = _struct_I.unpack(str[start:end]) 00139 start = end 00140 end += length 00141 self.camera_name = str[start:end] 00142 _x = self 00143 start = end 00144 end += 7 00145 (_x.pattern_width, _x.pattern_height, _x.pattern_size, _x.pattern_type,) = _struct_2BfB.unpack(str[start:end]) 00146 return self 00147 except struct.error as e: 00148 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00149 00150 _struct_I = roslib.message.struct_I 00151 _struct_2BfB = struct.Struct("<2BfB")