00001 """autogenerated by genmsg_py from AveragingAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import actionlib_tutorials.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class AveragingAction(roslib.message.Message):
00011 _md5sum = "628678f2b4fa6a5951746a4a2d39e716"
00012 _type = "actionlib_tutorials/AveragingAction"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 AveragingActionGoal action_goal
00017 AveragingActionResult action_result
00018 AveragingActionFeedback action_feedback
00019
00020 ================================================================================
00021 MSG: actionlib_tutorials/AveragingActionGoal
00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 AveragingGoal goal
00027
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data
00032 # in a particular coordinate frame.
00033 #
00034 # sequence ID: consecutively increasing ID
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045
00046 ================================================================================
00047 MSG: actionlib_msgs/GoalID
00048 # The stamp should store the time at which this goal was requested.
00049 # It is used by an action server when it tries to preempt all
00050 # goals that were requested before a certain time
00051 time stamp
00052
00053 # The id provides a way to associate feedback and
00054 # result message with specific goal requests. The id
00055 # specified must be unique.
00056 string id
00057
00058
00059 ================================================================================
00060 MSG: actionlib_tutorials/AveragingGoal
00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00062 #goal definition
00063 int32 samples
00064
00065 ================================================================================
00066 MSG: actionlib_tutorials/AveragingActionResult
00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00068
00069 Header header
00070 actionlib_msgs/GoalStatus status
00071 AveragingResult result
00072
00073 ================================================================================
00074 MSG: actionlib_msgs/GoalStatus
00075 GoalID goal_id
00076 uint8 status
00077 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00078 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00079 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00080 # and has since completed its execution (Terminal State)
00081 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00082 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00083 # to some failure (Terminal State)
00084 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00085 # because the goal was unattainable or invalid (Terminal State)
00086 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00087 # and has not yet completed execution
00088 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00089 # but the action server has not yet confirmed that the goal is canceled
00090 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00091 # and was successfully cancelled (Terminal State)
00092 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00093 # sent over the wire by an action server
00094
00095 #Allow for the user to associate a string with GoalStatus for debugging
00096 string text
00097
00098
00099 ================================================================================
00100 MSG: actionlib_tutorials/AveragingResult
00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00102 #result definition
00103 float32 mean
00104 float32 std_dev
00105
00106 ================================================================================
00107 MSG: actionlib_tutorials/AveragingActionFeedback
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 AveragingFeedback feedback
00113
00114 ================================================================================
00115 MSG: actionlib_tutorials/AveragingFeedback
00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00117 #feedback
00118 int32 sample
00119 float32 data
00120 float32 mean
00121 float32 std_dev
00122
00123
00124
00125 """
00126 __slots__ = ['action_goal','action_result','action_feedback']
00127 _slot_types = ['actionlib_tutorials/AveragingActionGoal','actionlib_tutorials/AveragingActionResult','actionlib_tutorials/AveragingActionFeedback']
00128
00129 def __init__(self, *args, **kwds):
00130 """
00131 Constructor. Any message fields that are implicitly/explicitly
00132 set to None will be assigned a default value. The recommend
00133 use is keyword arguments as this is more robust to future message
00134 changes. You cannot mix in-order arguments and keyword arguments.
00135
00136 The available fields are:
00137 action_goal,action_result,action_feedback
00138
00139 @param args: complete set of field values, in .msg order
00140 @param kwds: use keyword arguments corresponding to message field names
00141 to set specific fields.
00142 """
00143 if args or kwds:
00144 super(AveragingAction, self).__init__(*args, **kwds)
00145
00146 if self.action_goal is None:
00147 self.action_goal = actionlib_tutorials.msg.AveragingActionGoal()
00148 if self.action_result is None:
00149 self.action_result = actionlib_tutorials.msg.AveragingActionResult()
00150 if self.action_feedback is None:
00151 self.action_feedback = actionlib_tutorials.msg.AveragingActionFeedback()
00152 else:
00153 self.action_goal = actionlib_tutorials.msg.AveragingActionGoal()
00154 self.action_result = actionlib_tutorials.msg.AveragingActionResult()
00155 self.action_feedback = actionlib_tutorials.msg.AveragingActionFeedback()
00156
00157 def _get_types(self):
00158 """
00159 internal API method
00160 """
00161 return self._slot_types
00162
00163 def serialize(self, buff):
00164 """
00165 serialize message into buffer
00166 @param buff: buffer
00167 @type buff: StringIO
00168 """
00169 try:
00170 _x = self
00171 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00172 _x = self.action_goal.header.frame_id
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self
00176 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00177 _x = self.action_goal.goal_id.id
00178 length = len(_x)
00179 buff.write(struct.pack('<I%ss'%length, length, _x))
00180 _x = self
00181 buff.write(_struct_i3I.pack(_x.action_goal.goal.samples, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00182 _x = self.action_result.header.frame_id
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self
00186 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00187 _x = self.action_result.status.goal_id.id
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 buff.write(_struct_B.pack(self.action_result.status.status))
00191 _x = self.action_result.status.text
00192 length = len(_x)
00193 buff.write(struct.pack('<I%ss'%length, length, _x))
00194 _x = self
00195 buff.write(_struct_2f3I.pack(_x.action_result.result.mean, _x.action_result.result.std_dev, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00196 _x = self.action_feedback.header.frame_id
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 _x = self
00200 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00201 _x = self.action_feedback.status.goal_id.id
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 buff.write(_struct_B.pack(self.action_feedback.status.status))
00205 _x = self.action_feedback.status.text
00206 length = len(_x)
00207 buff.write(struct.pack('<I%ss'%length, length, _x))
00208 _x = self
00209 buff.write(_struct_i3f.pack(_x.action_feedback.feedback.sample, _x.action_feedback.feedback.data, _x.action_feedback.feedback.mean, _x.action_feedback.feedback.std_dev))
00210 except struct.error, se: self._check_types(se)
00211 except TypeError, te: self._check_types(te)
00212
00213 def deserialize(self, str):
00214 """
00215 unpack serialized message in str into this message instance
00216 @param str: byte array of serialized message
00217 @type str: str
00218 """
00219 try:
00220 if self.action_goal is None:
00221 self.action_goal = actionlib_tutorials.msg.AveragingActionGoal()
00222 if self.action_result is None:
00223 self.action_result = actionlib_tutorials.msg.AveragingActionResult()
00224 if self.action_feedback is None:
00225 self.action_feedback = actionlib_tutorials.msg.AveragingActionFeedback()
00226 end = 0
00227 _x = self
00228 start = end
00229 end += 12
00230 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00231 start = end
00232 end += 4
00233 (length,) = _struct_I.unpack(str[start:end])
00234 start = end
00235 end += length
00236 self.action_goal.header.frame_id = str[start:end]
00237 _x = self
00238 start = end
00239 end += 8
00240 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00241 start = end
00242 end += 4
00243 (length,) = _struct_I.unpack(str[start:end])
00244 start = end
00245 end += length
00246 self.action_goal.goal_id.id = str[start:end]
00247 _x = self
00248 start = end
00249 end += 16
00250 (_x.action_goal.goal.samples, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 start = end
00255 end += length
00256 self.action_result.header.frame_id = str[start:end]
00257 _x = self
00258 start = end
00259 end += 8
00260 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 start = end
00265 end += length
00266 self.action_result.status.goal_id.id = str[start:end]
00267 start = end
00268 end += 1
00269 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 self.action_result.status.text = str[start:end]
00276 _x = self
00277 start = end
00278 end += 20
00279 (_x.action_result.result.mean, _x.action_result.result.std_dev, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end])
00280 start = end
00281 end += 4
00282 (length,) = _struct_I.unpack(str[start:end])
00283 start = end
00284 end += length
00285 self.action_feedback.header.frame_id = str[start:end]
00286 _x = self
00287 start = end
00288 end += 8
00289 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00290 start = end
00291 end += 4
00292 (length,) = _struct_I.unpack(str[start:end])
00293 start = end
00294 end += length
00295 self.action_feedback.status.goal_id.id = str[start:end]
00296 start = end
00297 end += 1
00298 (self.action_feedback.status.status,) = _struct_B.unpack(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.action_feedback.status.text = str[start:end]
00305 _x = self
00306 start = end
00307 end += 16
00308 (_x.action_feedback.feedback.sample, _x.action_feedback.feedback.data, _x.action_feedback.feedback.mean, _x.action_feedback.feedback.std_dev,) = _struct_i3f.unpack(str[start:end])
00309 return self
00310 except struct.error, e:
00311 raise roslib.message.DeserializationError(e)
00312
00313
00314 def serialize_numpy(self, buff, numpy):
00315 """
00316 serialize message with numpy array types into buffer
00317 @param buff: buffer
00318 @type buff: StringIO
00319 @param numpy: numpy python module
00320 @type numpy module
00321 """
00322 try:
00323 _x = self
00324 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00325 _x = self.action_goal.header.frame_id
00326 length = len(_x)
00327 buff.write(struct.pack('<I%ss'%length, length, _x))
00328 _x = self
00329 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00330 _x = self.action_goal.goal_id.id
00331 length = len(_x)
00332 buff.write(struct.pack('<I%ss'%length, length, _x))
00333 _x = self
00334 buff.write(_struct_i3I.pack(_x.action_goal.goal.samples, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00335 _x = self.action_result.header.frame_id
00336 length = len(_x)
00337 buff.write(struct.pack('<I%ss'%length, length, _x))
00338 _x = self
00339 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00340 _x = self.action_result.status.goal_id.id
00341 length = len(_x)
00342 buff.write(struct.pack('<I%ss'%length, length, _x))
00343 buff.write(_struct_B.pack(self.action_result.status.status))
00344 _x = self.action_result.status.text
00345 length = len(_x)
00346 buff.write(struct.pack('<I%ss'%length, length, _x))
00347 _x = self
00348 buff.write(_struct_2f3I.pack(_x.action_result.result.mean, _x.action_result.result.std_dev, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00349 _x = self.action_feedback.header.frame_id
00350 length = len(_x)
00351 buff.write(struct.pack('<I%ss'%length, length, _x))
00352 _x = self
00353 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00354 _x = self.action_feedback.status.goal_id.id
00355 length = len(_x)
00356 buff.write(struct.pack('<I%ss'%length, length, _x))
00357 buff.write(_struct_B.pack(self.action_feedback.status.status))
00358 _x = self.action_feedback.status.text
00359 length = len(_x)
00360 buff.write(struct.pack('<I%ss'%length, length, _x))
00361 _x = self
00362 buff.write(_struct_i3f.pack(_x.action_feedback.feedback.sample, _x.action_feedback.feedback.data, _x.action_feedback.feedback.mean, _x.action_feedback.feedback.std_dev))
00363 except struct.error, se: self._check_types(se)
00364 except TypeError, te: self._check_types(te)
00365
00366 def deserialize_numpy(self, str, numpy):
00367 """
00368 unpack serialized message in str into this message instance using numpy for array types
00369 @param str: byte array of serialized message
00370 @type str: str
00371 @param numpy: numpy python module
00372 @type numpy: module
00373 """
00374 try:
00375 if self.action_goal is None:
00376 self.action_goal = actionlib_tutorials.msg.AveragingActionGoal()
00377 if self.action_result is None:
00378 self.action_result = actionlib_tutorials.msg.AveragingActionResult()
00379 if self.action_feedback is None:
00380 self.action_feedback = actionlib_tutorials.msg.AveragingActionFeedback()
00381 end = 0
00382 _x = self
00383 start = end
00384 end += 12
00385 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 start = end
00390 end += length
00391 self.action_goal.header.frame_id = str[start:end]
00392 _x = self
00393 start = end
00394 end += 8
00395 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00396 start = end
00397 end += 4
00398 (length,) = _struct_I.unpack(str[start:end])
00399 start = end
00400 end += length
00401 self.action_goal.goal_id.id = str[start:end]
00402 _x = self
00403 start = end
00404 end += 16
00405 (_x.action_goal.goal.samples, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00406 start = end
00407 end += 4
00408 (length,) = _struct_I.unpack(str[start:end])
00409 start = end
00410 end += length
00411 self.action_result.header.frame_id = str[start:end]
00412 _x = self
00413 start = end
00414 end += 8
00415 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00416 start = end
00417 end += 4
00418 (length,) = _struct_I.unpack(str[start:end])
00419 start = end
00420 end += length
00421 self.action_result.status.goal_id.id = str[start:end]
00422 start = end
00423 end += 1
00424 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00425 start = end
00426 end += 4
00427 (length,) = _struct_I.unpack(str[start:end])
00428 start = end
00429 end += length
00430 self.action_result.status.text = str[start:end]
00431 _x = self
00432 start = end
00433 end += 20
00434 (_x.action_result.result.mean, _x.action_result.result.std_dev, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end])
00435 start = end
00436 end += 4
00437 (length,) = _struct_I.unpack(str[start:end])
00438 start = end
00439 end += length
00440 self.action_feedback.header.frame_id = str[start:end]
00441 _x = self
00442 start = end
00443 end += 8
00444 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00445 start = end
00446 end += 4
00447 (length,) = _struct_I.unpack(str[start:end])
00448 start = end
00449 end += length
00450 self.action_feedback.status.goal_id.id = str[start:end]
00451 start = end
00452 end += 1
00453 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00454 start = end
00455 end += 4
00456 (length,) = _struct_I.unpack(str[start:end])
00457 start = end
00458 end += length
00459 self.action_feedback.status.text = str[start:end]
00460 _x = self
00461 start = end
00462 end += 16
00463 (_x.action_feedback.feedback.sample, _x.action_feedback.feedback.data, _x.action_feedback.feedback.mean, _x.action_feedback.feedback.std_dev,) = _struct_i3f.unpack(str[start:end])
00464 return self
00465 except struct.error, e:
00466 raise roslib.message.DeserializationError(e)
00467
00468 _struct_I = roslib.message.struct_I
00469 _struct_B = struct.Struct("<B")
00470 _struct_2f3I = struct.Struct("<2f3I")
00471 _struct_i3I = struct.Struct("<i3I")
00472 _struct_i3f = struct.Struct("<i3f")
00473 _struct_3I = struct.Struct("<3I")
00474 _struct_2I = struct.Struct("<2I")