00001 """autogenerated by genmsg_py from MoveArmActionFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import move_arm_msgs.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class MoveArmActionFeedback(roslib.message.Message):
00011 _md5sum = "50284463bfe759fbf589fc263537baad"
00012 _type = "move_arm_msgs/MoveArmActionFeedback"
00013 _has_header = True
00014 _full_text = """
00015 Header header
00016 actionlib_msgs/GoalStatus status
00017 MoveArmFeedback feedback
00018
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data
00023 # in a particular coordinate frame.
00024 #
00025 # sequence ID: consecutively increasing ID
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036
00037 ================================================================================
00038 MSG: actionlib_msgs/GoalStatus
00039 GoalID goal_id
00040 uint8 status
00041 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00042 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00043 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00044 # and has since completed its execution (Terminal State)
00045 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00046 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00047 # to some failure (Terminal State)
00048 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00049 # because the goal was unattainable or invalid (Terminal State)
00050 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00051 # and has not yet completed execution
00052 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00053 # but the action server has not yet confirmed that the goal is canceled
00054 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00055 # and was successfully cancelled (Terminal State)
00056 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00057 # sent over the wire by an action server
00058
00059 #Allow for the user to associate a string with GoalStatus for debugging
00060 string text
00061
00062
00063 ================================================================================
00064 MSG: actionlib_msgs/GoalID
00065 # The stamp should store the time at which this goal was requested.
00066 # It is used by an action server when it tries to preempt all
00067 # goals that were requested before a certain time
00068 time stamp
00069
00070 # The id provides a way to associate feedback and
00071 # result message with specific goal requests. The id
00072 # specified must be unique.
00073 string id
00074
00075
00076 ================================================================================
00077 MSG: move_arm_msgs/MoveArmFeedback
00078 # The internal state that the move arm action currently is in
00079 string state
00080
00081 # Time to completion - this is a combination of requested planning time and trajectory completion time
00082 duration time_to_completion
00083
00084 """
00085 __slots__ = ['header','status','feedback']
00086 _slot_types = ['Header','actionlib_msgs/GoalStatus','move_arm_msgs/MoveArmFeedback']
00087
00088 def __init__(self, *args, **kwds):
00089 """
00090 Constructor. Any message fields that are implicitly/explicitly
00091 set to None will be assigned a default value. The recommend
00092 use is keyword arguments as this is more robust to future message
00093 changes. You cannot mix in-order arguments and keyword arguments.
00094
00095 The available fields are:
00096 header,status,feedback
00097
00098 @param args: complete set of field values, in .msg order
00099 @param kwds: use keyword arguments corresponding to message field names
00100 to set specific fields.
00101 """
00102 if args or kwds:
00103 super(MoveArmActionFeedback, self).__init__(*args, **kwds)
00104
00105 if self.header is None:
00106 self.header = std_msgs.msg._Header.Header()
00107 if self.status is None:
00108 self.status = actionlib_msgs.msg.GoalStatus()
00109 if self.feedback is None:
00110 self.feedback = move_arm_msgs.msg.MoveArmFeedback()
00111 else:
00112 self.header = std_msgs.msg._Header.Header()
00113 self.status = actionlib_msgs.msg.GoalStatus()
00114 self.feedback = move_arm_msgs.msg.MoveArmFeedback()
00115
00116 def _get_types(self):
00117 """
00118 internal API method
00119 """
00120 return self._slot_types
00121
00122 def serialize(self, buff):
00123 """
00124 serialize message into buffer
00125 @param buff: buffer
00126 @type buff: StringIO
00127 """
00128 try:
00129 _x = self
00130 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00131 _x = self.header.frame_id
00132 length = len(_x)
00133 buff.write(struct.pack('<I%ss'%length, length, _x))
00134 _x = self
00135 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00136 _x = self.status.goal_id.id
00137 length = len(_x)
00138 buff.write(struct.pack('<I%ss'%length, length, _x))
00139 buff.write(_struct_B.pack(self.status.status))
00140 _x = self.status.text
00141 length = len(_x)
00142 buff.write(struct.pack('<I%ss'%length, length, _x))
00143 _x = self.feedback.state
00144 length = len(_x)
00145 buff.write(struct.pack('<I%ss'%length, length, _x))
00146 _x = self
00147 buff.write(_struct_2i.pack(_x.feedback.time_to_completion.secs, _x.feedback.time_to_completion.nsecs))
00148 except struct.error, se: self._check_types(se)
00149 except TypeError, te: self._check_types(te)
00150
00151 def deserialize(self, str):
00152 """
00153 unpack serialized message in str into this message instance
00154 @param str: byte array of serialized message
00155 @type str: str
00156 """
00157 try:
00158 if self.header is None:
00159 self.header = std_msgs.msg._Header.Header()
00160 if self.status is None:
00161 self.status = actionlib_msgs.msg.GoalStatus()
00162 if self.feedback is None:
00163 self.feedback = move_arm_msgs.msg.MoveArmFeedback()
00164 end = 0
00165 _x = self
00166 start = end
00167 end += 12
00168 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00169 start = end
00170 end += 4
00171 (length,) = _struct_I.unpack(str[start:end])
00172 start = end
00173 end += length
00174 self.header.frame_id = str[start:end]
00175 _x = self
00176 start = end
00177 end += 8
00178 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00179 start = end
00180 end += 4
00181 (length,) = _struct_I.unpack(str[start:end])
00182 start = end
00183 end += length
00184 self.status.goal_id.id = str[start:end]
00185 start = end
00186 end += 1
00187 (self.status.status,) = _struct_B.unpack(str[start:end])
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 start = end
00192 end += length
00193 self.status.text = str[start:end]
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 start = end
00198 end += length
00199 self.feedback.state = str[start:end]
00200 _x = self
00201 start = end
00202 end += 8
00203 (_x.feedback.time_to_completion.secs, _x.feedback.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00204 return self
00205 except struct.error, e:
00206 raise roslib.message.DeserializationError(e)
00207
00208
00209 def serialize_numpy(self, buff, numpy):
00210 """
00211 serialize message with numpy array types into buffer
00212 @param buff: buffer
00213 @type buff: StringIO
00214 @param numpy: numpy python module
00215 @type numpy module
00216 """
00217 try:
00218 _x = self
00219 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00220 _x = self.header.frame_id
00221 length = len(_x)
00222 buff.write(struct.pack('<I%ss'%length, length, _x))
00223 _x = self
00224 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00225 _x = self.status.goal_id.id
00226 length = len(_x)
00227 buff.write(struct.pack('<I%ss'%length, length, _x))
00228 buff.write(_struct_B.pack(self.status.status))
00229 _x = self.status.text
00230 length = len(_x)
00231 buff.write(struct.pack('<I%ss'%length, length, _x))
00232 _x = self.feedback.state
00233 length = len(_x)
00234 buff.write(struct.pack('<I%ss'%length, length, _x))
00235 _x = self
00236 buff.write(_struct_2i.pack(_x.feedback.time_to_completion.secs, _x.feedback.time_to_completion.nsecs))
00237 except struct.error, se: self._check_types(se)
00238 except TypeError, te: self._check_types(te)
00239
00240 def deserialize_numpy(self, str, numpy):
00241 """
00242 unpack serialized message in str into this message instance using numpy for array types
00243 @param str: byte array of serialized message
00244 @type str: str
00245 @param numpy: numpy python module
00246 @type numpy: module
00247 """
00248 try:
00249 if self.header is None:
00250 self.header = std_msgs.msg._Header.Header()
00251 if self.status is None:
00252 self.status = actionlib_msgs.msg.GoalStatus()
00253 if self.feedback is None:
00254 self.feedback = move_arm_msgs.msg.MoveArmFeedback()
00255 end = 0
00256 _x = self
00257 start = end
00258 end += 12
00259 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00260 start = end
00261 end += 4
00262 (length,) = _struct_I.unpack(str[start:end])
00263 start = end
00264 end += length
00265 self.header.frame_id = str[start:end]
00266 _x = self
00267 start = end
00268 end += 8
00269 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.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.status.goal_id.id = str[start:end]
00276 start = end
00277 end += 1
00278 (self.status.status,) = _struct_B.unpack(str[start:end])
00279 start = end
00280 end += 4
00281 (length,) = _struct_I.unpack(str[start:end])
00282 start = end
00283 end += length
00284 self.status.text = 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.feedback.state = str[start:end]
00291 _x = self
00292 start = end
00293 end += 8
00294 (_x.feedback.time_to_completion.secs, _x.feedback.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00295 return self
00296 except struct.error, e:
00297 raise roslib.message.DeserializationError(e)
00298
00299 _struct_I = roslib.message.struct_I
00300 _struct_3I = struct.Struct("<3I")
00301 _struct_B = struct.Struct("<B")
00302 _struct_2I = struct.Struct("<2I")
00303 _struct_2i = struct.Struct("<2i")