$search
00001 """autogenerated by genmsg_py from ScriptActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 import cob_script_server.msg 00008 import std_msgs.msg 00009 00010 class ScriptActionGoal(roslib.message.Message): 00011 _md5sum = "0d0aefd8bc74f97d2bda7e785f0e79d4" 00012 _type = "cob_script_server/ScriptActionGoal" 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 ScriptGoal 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: cob_script_server/ScriptGoal 00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00054 #goal definition 00055 string function_name 00056 string component_name 00057 string parameter_name 00058 string mode 00059 string service_name 00060 float32 duration 00061 bool planning 00062 00063 """ 00064 __slots__ = ['header','goal_id','goal'] 00065 _slot_types = ['Header','actionlib_msgs/GoalID','cob_script_server/ScriptGoal'] 00066 00067 def __init__(self, *args, **kwds): 00068 """ 00069 Constructor. Any message fields that are implicitly/explicitly 00070 set to None will be assigned a default value. The recommend 00071 use is keyword arguments as this is more robust to future message 00072 changes. You cannot mix in-order arguments and keyword arguments. 00073 00074 The available fields are: 00075 header,goal_id,goal 00076 00077 @param args: complete set of field values, in .msg order 00078 @param kwds: use keyword arguments corresponding to message field names 00079 to set specific fields. 00080 """ 00081 if args or kwds: 00082 super(ScriptActionGoal, self).__init__(*args, **kwds) 00083 #message fields cannot be None, assign default values for those that are 00084 if self.header is None: 00085 self.header = std_msgs.msg._Header.Header() 00086 if self.goal_id is None: 00087 self.goal_id = actionlib_msgs.msg.GoalID() 00088 if self.goal is None: 00089 self.goal = cob_script_server.msg.ScriptGoal() 00090 else: 00091 self.header = std_msgs.msg._Header.Header() 00092 self.goal_id = actionlib_msgs.msg.GoalID() 00093 self.goal = cob_script_server.msg.ScriptGoal() 00094 00095 def _get_types(self): 00096 """ 00097 internal API method 00098 """ 00099 return self._slot_types 00100 00101 def serialize(self, buff): 00102 """ 00103 serialize message into buffer 00104 @param buff: buffer 00105 @type buff: StringIO 00106 """ 00107 try: 00108 _x = self 00109 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00110 _x = self.header.frame_id 00111 length = len(_x) 00112 buff.write(struct.pack('<I%ss'%length, length, _x)) 00113 _x = self 00114 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00115 _x = self.goal_id.id 00116 length = len(_x) 00117 buff.write(struct.pack('<I%ss'%length, length, _x)) 00118 _x = self.goal.function_name 00119 length = len(_x) 00120 buff.write(struct.pack('<I%ss'%length, length, _x)) 00121 _x = self.goal.component_name 00122 length = len(_x) 00123 buff.write(struct.pack('<I%ss'%length, length, _x)) 00124 _x = self.goal.parameter_name 00125 length = len(_x) 00126 buff.write(struct.pack('<I%ss'%length, length, _x)) 00127 _x = self.goal.mode 00128 length = len(_x) 00129 buff.write(struct.pack('<I%ss'%length, length, _x)) 00130 _x = self.goal.service_name 00131 length = len(_x) 00132 buff.write(struct.pack('<I%ss'%length, length, _x)) 00133 _x = self 00134 buff.write(_struct_fB.pack(_x.goal.duration, _x.goal.planning)) 00135 except struct.error as se: self._check_types(se) 00136 except TypeError as te: self._check_types(te) 00137 00138 def deserialize(self, str): 00139 """ 00140 unpack serialized message in str into this message instance 00141 @param str: byte array of serialized message 00142 @type str: str 00143 """ 00144 try: 00145 if self.header is None: 00146 self.header = std_msgs.msg._Header.Header() 00147 if self.goal_id is None: 00148 self.goal_id = actionlib_msgs.msg.GoalID() 00149 if self.goal is None: 00150 self.goal = cob_script_server.msg.ScriptGoal() 00151 end = 0 00152 _x = self 00153 start = end 00154 end += 12 00155 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end] 00162 _x = self 00163 start = end 00164 end += 8 00165 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00166 start = end 00167 end += 4 00168 (length,) = _struct_I.unpack(str[start:end]) 00169 start = end 00170 end += length 00171 self.goal_id.id = str[start:end] 00172 start = end 00173 end += 4 00174 (length,) = _struct_I.unpack(str[start:end]) 00175 start = end 00176 end += length 00177 self.goal.function_name = str[start:end] 00178 start = end 00179 end += 4 00180 (length,) = _struct_I.unpack(str[start:end]) 00181 start = end 00182 end += length 00183 self.goal.component_name = str[start:end] 00184 start = end 00185 end += 4 00186 (length,) = _struct_I.unpack(str[start:end]) 00187 start = end 00188 end += length 00189 self.goal.parameter_name = str[start:end] 00190 start = end 00191 end += 4 00192 (length,) = _struct_I.unpack(str[start:end]) 00193 start = end 00194 end += length 00195 self.goal.mode = str[start:end] 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 start = end 00200 end += length 00201 self.goal.service_name = str[start:end] 00202 _x = self 00203 start = end 00204 end += 5 00205 (_x.goal.duration, _x.goal.planning,) = _struct_fB.unpack(str[start:end]) 00206 self.goal.planning = bool(self.goal.planning) 00207 return self 00208 except struct.error as e: 00209 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00210 00211 00212 def serialize_numpy(self, buff, numpy): 00213 """ 00214 serialize message with numpy array types into buffer 00215 @param buff: buffer 00216 @type buff: StringIO 00217 @param numpy: numpy python module 00218 @type numpy module 00219 """ 00220 try: 00221 _x = self 00222 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00223 _x = self.header.frame_id 00224 length = len(_x) 00225 buff.write(struct.pack('<I%ss'%length, length, _x)) 00226 _x = self 00227 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00228 _x = self.goal_id.id 00229 length = len(_x) 00230 buff.write(struct.pack('<I%ss'%length, length, _x)) 00231 _x = self.goal.function_name 00232 length = len(_x) 00233 buff.write(struct.pack('<I%ss'%length, length, _x)) 00234 _x = self.goal.component_name 00235 length = len(_x) 00236 buff.write(struct.pack('<I%ss'%length, length, _x)) 00237 _x = self.goal.parameter_name 00238 length = len(_x) 00239 buff.write(struct.pack('<I%ss'%length, length, _x)) 00240 _x = self.goal.mode 00241 length = len(_x) 00242 buff.write(struct.pack('<I%ss'%length, length, _x)) 00243 _x = self.goal.service_name 00244 length = len(_x) 00245 buff.write(struct.pack('<I%ss'%length, length, _x)) 00246 _x = self 00247 buff.write(_struct_fB.pack(_x.goal.duration, _x.goal.planning)) 00248 except struct.error as se: self._check_types(se) 00249 except TypeError as te: self._check_types(te) 00250 00251 def deserialize_numpy(self, str, numpy): 00252 """ 00253 unpack serialized message in str into this message instance using numpy for array types 00254 @param str: byte array of serialized message 00255 @type str: str 00256 @param numpy: numpy python module 00257 @type numpy: module 00258 """ 00259 try: 00260 if self.header is None: 00261 self.header = std_msgs.msg._Header.Header() 00262 if self.goal_id is None: 00263 self.goal_id = actionlib_msgs.msg.GoalID() 00264 if self.goal is None: 00265 self.goal = cob_script_server.msg.ScriptGoal() 00266 end = 0 00267 _x = self 00268 start = end 00269 end += 12 00270 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 start = end 00275 end += length 00276 self.header.frame_id = str[start:end] 00277 _x = self 00278 start = end 00279 end += 8 00280 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00281 start = end 00282 end += 4 00283 (length,) = _struct_I.unpack(str[start:end]) 00284 start = end 00285 end += length 00286 self.goal_id.id = str[start:end] 00287 start = end 00288 end += 4 00289 (length,) = _struct_I.unpack(str[start:end]) 00290 start = end 00291 end += length 00292 self.goal.function_name = str[start:end] 00293 start = end 00294 end += 4 00295 (length,) = _struct_I.unpack(str[start:end]) 00296 start = end 00297 end += length 00298 self.goal.component_name = str[start:end] 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 start = end 00303 end += length 00304 self.goal.parameter_name = str[start:end] 00305 start = end 00306 end += 4 00307 (length,) = _struct_I.unpack(str[start:end]) 00308 start = end 00309 end += length 00310 self.goal.mode = str[start:end] 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 start = end 00315 end += length 00316 self.goal.service_name = str[start:end] 00317 _x = self 00318 start = end 00319 end += 5 00320 (_x.goal.duration, _x.goal.planning,) = _struct_fB.unpack(str[start:end]) 00321 self.goal.planning = bool(self.goal.planning) 00322 return self 00323 except struct.error as e: 00324 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00325 00326 _struct_I = roslib.message.struct_I 00327 _struct_fB = struct.Struct("<fB") 00328 _struct_3I = struct.Struct("<3I") 00329 _struct_2I = struct.Struct("<2I")