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