00001 """autogenerated by genmsg_py from ArmHandActionFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import cogman_msgs.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class ArmHandActionFeedback(roslib.message.Message):
00011 _md5sum = "f7e3665563b46a7f7b5b93678d46a65b"
00012 _type = "cogman_msgs/ArmHandActionFeedback"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalStatus status
00018 ArmHandFeedback feedback
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/GoalStatus
00040 GoalID goal_id
00041 uint8 status
00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00045 # and has since completed its execution (Terminal State)
00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00048 # to some failure (Terminal State)
00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00050 # because the goal was unattainable or invalid (Terminal State)
00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00052 # and has not yet completed execution
00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00054 # but the action server has not yet confirmed that the goal is canceled
00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00056 # and was successfully cancelled (Terminal State)
00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00058 # sent over the wire by an action server
00059
00060 #Allow for the user to associate a string with GoalStatus for debugging
00061 string text
00062
00063
00064 ================================================================================
00065 MSG: actionlib_msgs/GoalID
00066 # The stamp should store the time at which this goal was requested.
00067 # It is used by an action server when it tries to preempt all
00068 # goals that were requested before a certain time
00069 time stamp
00070
00071 # The id provides a way to associate feedback and
00072 # result message with specific goal requests. The id
00073 # specified must be unique.
00074 string id
00075
00076
00077 ================================================================================
00078 MSG: cogman_msgs/ArmHandFeedback
00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00080 #feedback
00081 float32 distance_to_goal
00082
00083
00084
00085 """
00086 __slots__ = ['header','status','feedback']
00087 _slot_types = ['Header','actionlib_msgs/GoalStatus','cogman_msgs/ArmHandFeedback']
00088
00089 def __init__(self, *args, **kwds):
00090 """
00091 Constructor. Any message fields that are implicitly/explicitly
00092 set to None will be assigned a default value. The recommend
00093 use is keyword arguments as this is more robust to future message
00094 changes. You cannot mix in-order arguments and keyword arguments.
00095
00096 The available fields are:
00097 header,status,feedback
00098
00099 @param args: complete set of field values, in .msg order
00100 @param kwds: use keyword arguments corresponding to message field names
00101 to set specific fields.
00102 """
00103 if args or kwds:
00104 super(ArmHandActionFeedback, self).__init__(*args, **kwds)
00105
00106 if self.header is None:
00107 self.header = std_msgs.msg._Header.Header()
00108 if self.status is None:
00109 self.status = actionlib_msgs.msg.GoalStatus()
00110 if self.feedback is None:
00111 self.feedback = cogman_msgs.msg.ArmHandFeedback()
00112 else:
00113 self.header = std_msgs.msg._Header.Header()
00114 self.status = actionlib_msgs.msg.GoalStatus()
00115 self.feedback = cogman_msgs.msg.ArmHandFeedback()
00116
00117 def _get_types(self):
00118 """
00119 internal API method
00120 """
00121 return self._slot_types
00122
00123 def serialize(self, buff):
00124 """
00125 serialize message into buffer
00126 @param buff: buffer
00127 @type buff: StringIO
00128 """
00129 try:
00130 _x = self
00131 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00132 _x = self.header.frame_id
00133 length = len(_x)
00134 buff.write(struct.pack('<I%ss'%length, length, _x))
00135 _x = self
00136 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00137 _x = self.status.goal_id.id
00138 length = len(_x)
00139 buff.write(struct.pack('<I%ss'%length, length, _x))
00140 buff.write(_struct_B.pack(self.status.status))
00141 _x = self.status.text
00142 length = len(_x)
00143 buff.write(struct.pack('<I%ss'%length, length, _x))
00144 buff.write(_struct_f.pack(self.feedback.distance_to_goal))
00145 except struct.error, se: self._check_types(se)
00146 except TypeError, te: self._check_types(te)
00147
00148 def deserialize(self, str):
00149 """
00150 unpack serialized message in str into this message instance
00151 @param str: byte array of serialized message
00152 @type str: str
00153 """
00154 try:
00155 if self.header is None:
00156 self.header = std_msgs.msg._Header.Header()
00157 if self.status is None:
00158 self.status = actionlib_msgs.msg.GoalStatus()
00159 if self.feedback is None:
00160 self.feedback = cogman_msgs.msg.ArmHandFeedback()
00161 end = 0
00162 _x = self
00163 start = end
00164 end += 12
00165 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end]
00172 _x = self
00173 start = end
00174 end += 8
00175 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00176 start = end
00177 end += 4
00178 (length,) = _struct_I.unpack(str[start:end])
00179 start = end
00180 end += length
00181 self.status.goal_id.id = str[start:end]
00182 start = end
00183 end += 1
00184 (self.status.status,) = _struct_B.unpack(str[start:end])
00185 start = end
00186 end += 4
00187 (length,) = _struct_I.unpack(str[start:end])
00188 start = end
00189 end += length
00190 self.status.text = str[start:end]
00191 start = end
00192 end += 4
00193 (self.feedback.distance_to_goal,) = _struct_f.unpack(str[start:end])
00194 return self
00195 except struct.error, e:
00196 raise roslib.message.DeserializationError(e)
00197
00198
00199 def serialize_numpy(self, buff, numpy):
00200 """
00201 serialize message with numpy array types into buffer
00202 @param buff: buffer
00203 @type buff: StringIO
00204 @param numpy: numpy python module
00205 @type numpy module
00206 """
00207 try:
00208 _x = self
00209 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00210 _x = self.header.frame_id
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 _x = self
00214 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00215 _x = self.status.goal_id.id
00216 length = len(_x)
00217 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 buff.write(_struct_B.pack(self.status.status))
00219 _x = self.status.text
00220 length = len(_x)
00221 buff.write(struct.pack('<I%ss'%length, length, _x))
00222 buff.write(_struct_f.pack(self.feedback.distance_to_goal))
00223 except struct.error, se: self._check_types(se)
00224 except TypeError, te: self._check_types(te)
00225
00226 def deserialize_numpy(self, str, numpy):
00227 """
00228 unpack serialized message in str into this message instance using numpy for array types
00229 @param str: byte array of serialized message
00230 @type str: str
00231 @param numpy: numpy python module
00232 @type numpy: module
00233 """
00234 try:
00235 if self.header is None:
00236 self.header = std_msgs.msg._Header.Header()
00237 if self.status is None:
00238 self.status = actionlib_msgs.msg.GoalStatus()
00239 if self.feedback is None:
00240 self.feedback = cogman_msgs.msg.ArmHandFeedback()
00241 end = 0
00242 _x = self
00243 start = end
00244 end += 12
00245 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end]
00252 _x = self
00253 start = end
00254 end += 8
00255 (_x.status.goal_id.stamp.secs, _x.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.status.goal_id.id = str[start:end]
00262 start = end
00263 end += 1
00264 (self.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.status.text = str[start:end]
00271 start = end
00272 end += 4
00273 (self.feedback.distance_to_goal,) = _struct_f.unpack(str[start:end])
00274 return self
00275 except struct.error, e:
00276 raise roslib.message.DeserializationError(e)
00277
00278 _struct_I = roslib.message.struct_I
00279 _struct_3I = struct.Struct("<3I")
00280 _struct_B = struct.Struct("<B")
00281 _struct_2I = struct.Struct("<2I")
00282 _struct_f = struct.Struct("<f")