$search
00001 """autogenerated by genmsg_py from FindFiducialActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import turtlebot_actions.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class FindFiducialActionGoal(roslib.message.Message): 00011 _md5sum = "c6a34d64b9eb5980711e7f6f5b5b4380" 00012 _type = "turtlebot_actions/FindFiducialActionGoal" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalID goal_id 00018 FindFiducialGoal goal 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalID 00040 # The stamp should store the time at which this goal was requested. 00041 # It is used by an action server when it tries to preempt all 00042 # goals that were requested before a certain time 00043 time stamp 00044 00045 # The id provides a way to associate feedback and 00046 # result message with specific goal requests. The id 00047 # specified must be unique. 00048 string id 00049 00050 00051 ================================================================================ 00052 MSG: turtlebot_actions/FindFiducialGoal 00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00054 #goal definition 00055 uint8 CHESSBOARD = 1 00056 uint8 CIRCLES_GRID = 2 00057 uint8 ASYMMETRIC_CIRCLES_GRID =3 00058 00059 string camera_name # name of the camera 00060 uint8 pattern_width # number of objects across 00061 uint8 pattern_height # number of objects down 00062 float32 pattern_size # size the object pattern (square size or circle size) 00063 uint8 pattern_type # type of pattern (CHESSBOARD, CIRCLES_GRID, ASYMMETRIC_CIRCLES_GRID) 00064 00065 """ 00066 __slots__ = ['header','goal_id','goal'] 00067 _slot_types = ['Header','actionlib_msgs/GoalID','turtlebot_actions/FindFiducialGoal'] 00068 00069 def __init__(self, *args, **kwds): 00070 """ 00071 Constructor. Any message fields that are implicitly/explicitly 00072 set to None will be assigned a default value. The recommend 00073 use is keyword arguments as this is more robust to future message 00074 changes. You cannot mix in-order arguments and keyword arguments. 00075 00076 The available fields are: 00077 header,goal_id,goal 00078 00079 @param args: complete set of field values, in .msg order 00080 @param kwds: use keyword arguments corresponding to message field names 00081 to set specific fields. 00082 """ 00083 if args or kwds: 00084 super(FindFiducialActionGoal, self).__init__(*args, **kwds) 00085 #message fields cannot be None, assign default values for those that are 00086 if self.header is None: 00087 self.header = std_msgs.msg._Header.Header() 00088 if self.goal_id is None: 00089 self.goal_id = actionlib_msgs.msg.GoalID() 00090 if self.goal is None: 00091 self.goal = turtlebot_actions.msg.FindFiducialGoal() 00092 else: 00093 self.header = std_msgs.msg._Header.Header() 00094 self.goal_id = actionlib_msgs.msg.GoalID() 00095 self.goal = turtlebot_actions.msg.FindFiducialGoal() 00096 00097 def _get_types(self): 00098 """ 00099 internal API method 00100 """ 00101 return self._slot_types 00102 00103 def serialize(self, buff): 00104 """ 00105 serialize message into buffer 00106 @param buff: buffer 00107 @type buff: StringIO 00108 """ 00109 try: 00110 _x = self 00111 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00112 _x = self.header.frame_id 00113 length = len(_x) 00114 buff.write(struct.pack('<I%ss'%length, length, _x)) 00115 _x = self 00116 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00117 _x = self.goal_id.id 00118 length = len(_x) 00119 buff.write(struct.pack('<I%ss'%length, length, _x)) 00120 _x = self.goal.camera_name 00121 length = len(_x) 00122 buff.write(struct.pack('<I%ss'%length, length, _x)) 00123 _x = self 00124 buff.write(_struct_2BfB.pack(_x.goal.pattern_width, _x.goal.pattern_height, _x.goal.pattern_size, _x.goal.pattern_type)) 00125 except struct.error as se: self._check_types(se) 00126 except TypeError as te: self._check_types(te) 00127 00128 def deserialize(self, str): 00129 """ 00130 unpack serialized message in str into this message instance 00131 @param str: byte array of serialized message 00132 @type str: str 00133 """ 00134 try: 00135 if self.header is None: 00136 self.header = std_msgs.msg._Header.Header() 00137 if self.goal_id is None: 00138 self.goal_id = actionlib_msgs.msg.GoalID() 00139 if self.goal is None: 00140 self.goal = turtlebot_actions.msg.FindFiducialGoal() 00141 end = 0 00142 _x = self 00143 start = end 00144 end += 12 00145 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00146 start = end 00147 end += 4 00148 (length,) = _struct_I.unpack(str[start:end]) 00149 start = end 00150 end += length 00151 self.header.frame_id = str[start:end] 00152 _x = self 00153 start = end 00154 end += 8 00155 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00156 start = end 00157 end += 4 00158 (length,) = _struct_I.unpack(str[start:end]) 00159 start = end 00160 end += length 00161 self.goal_id.id = str[start:end] 00162 start = end 00163 end += 4 00164 (length,) = _struct_I.unpack(str[start:end]) 00165 start = end 00166 end += length 00167 self.goal.camera_name = str[start:end] 00168 _x = self 00169 start = end 00170 end += 7 00171 (_x.goal.pattern_width, _x.goal.pattern_height, _x.goal.pattern_size, _x.goal.pattern_type,) = _struct_2BfB.unpack(str[start:end]) 00172 return self 00173 except struct.error as e: 00174 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00175 00176 00177 def serialize_numpy(self, buff, numpy): 00178 """ 00179 serialize message with numpy array types into buffer 00180 @param buff: buffer 00181 @type buff: StringIO 00182 @param numpy: numpy python module 00183 @type numpy module 00184 """ 00185 try: 00186 _x = self 00187 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00188 _x = self.header.frame_id 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 _x = self 00192 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00193 _x = self.goal_id.id 00194 length = len(_x) 00195 buff.write(struct.pack('<I%ss'%length, length, _x)) 00196 _x = self.goal.camera_name 00197 length = len(_x) 00198 buff.write(struct.pack('<I%ss'%length, length, _x)) 00199 _x = self 00200 buff.write(_struct_2BfB.pack(_x.goal.pattern_width, _x.goal.pattern_height, _x.goal.pattern_size, _x.goal.pattern_type)) 00201 except struct.error as se: self._check_types(se) 00202 except TypeError as te: self._check_types(te) 00203 00204 def deserialize_numpy(self, str, numpy): 00205 """ 00206 unpack serialized message in str into this message instance using numpy for array types 00207 @param str: byte array of serialized message 00208 @type str: str 00209 @param numpy: numpy python module 00210 @type numpy: module 00211 """ 00212 try: 00213 if self.header is None: 00214 self.header = std_msgs.msg._Header.Header() 00215 if self.goal_id is None: 00216 self.goal_id = actionlib_msgs.msg.GoalID() 00217 if self.goal is None: 00218 self.goal = turtlebot_actions.msg.FindFiducialGoal() 00219 end = 0 00220 _x = self 00221 start = end 00222 end += 12 00223 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 start = end 00228 end += length 00229 self.header.frame_id = str[start:end] 00230 _x = self 00231 start = end 00232 end += 8 00233 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.goal_id.id = str[start:end] 00240 start = end 00241 end += 4 00242 (length,) = _struct_I.unpack(str[start:end]) 00243 start = end 00244 end += length 00245 self.goal.camera_name = str[start:end] 00246 _x = self 00247 start = end 00248 end += 7 00249 (_x.goal.pattern_width, _x.goal.pattern_height, _x.goal.pattern_size, _x.goal.pattern_type,) = _struct_2BfB.unpack(str[start:end]) 00250 return self 00251 except struct.error as e: 00252 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00253 00254 _struct_I = roslib.message.struct_I 00255 _struct_2BfB = struct.Struct("<2BfB") 00256 _struct_3I = struct.Struct("<3I") 00257 _struct_2I = struct.Struct("<2I")