00001 """autogenerated by genmsg_py from PickupActionFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import object_manipulation_msgs.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class PickupActionFeedback(roslib.message.Message):
00011 _md5sum = "be33395c7e67a04f3caf7b074b79f09e"
00012 _type = "object_manipulation_msgs/PickupActionFeedback"
00013 _has_header = True
00014 _full_text = """Header header
00015 actionlib_msgs/GoalStatus status
00016 PickupFeedback feedback
00017
00018 ================================================================================
00019 MSG: std_msgs/Header
00020 # Standard metadata for higher-level stamped data types.
00021 # This is generally used to communicate timestamped data
00022 # in a particular coordinate frame.
00023 #
00024 # sequence ID: consecutively increasing ID
00025 uint32 seq
00026 #Two-integer timestamp that is expressed as:
00027 # * stamp.secs: seconds (stamp_secs) since epoch
00028 # * stamp.nsecs: nanoseconds since stamp_secs
00029 # time-handling sugar is provided by the client library
00030 time stamp
00031 #Frame this data is associated with
00032 # 0: no frame
00033 # 1: global frame
00034 string frame_id
00035
00036 ================================================================================
00037 MSG: actionlib_msgs/GoalStatus
00038 GoalID goal_id
00039 uint8 status
00040 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00041 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00042 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00043 # and has since completed its execution (Terminal State)
00044 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00045 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00046 # to some failure (Terminal State)
00047 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00048 # because the goal was unattainable or invalid (Terminal State)
00049 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00050 # and has not yet completed execution
00051 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00052 # but the action server has not yet confirmed that the goal is canceled
00053 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00054 # and was successfully cancelled (Terminal State)
00055 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00056 # sent over the wire by an action server
00057
00058 #Allow for the user to associate a string with GoalStatus for debugging
00059 string text
00060
00061
00062 ================================================================================
00063 MSG: actionlib_msgs/GoalID
00064 # The stamp should store the time at which this goal was requested.
00065 # It is used by an action server when it tries to preempt all
00066 # goals that were requested before a certain time
00067 time stamp
00068
00069 # The id provides a way to associate feedback and
00070 # result message with specific goal requests. The id
00071 # specified must be unique.
00072 string id
00073
00074
00075 ================================================================================
00076 MSG: object_manipulation_msgs/PickupFeedback
00077 # The number of the grasp currently being attempted
00078 int32 current_grasp
00079
00080 # The total number of grasps that will be attempted
00081 int32 total_grasps
00082
00083
00084
00085 """
00086 __slots__ = ['header','status','feedback']
00087 _slot_types = ['Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/PickupFeedback']
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(PickupActionFeedback, 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 = object_manipulation_msgs.msg.PickupFeedback()
00112 else:
00113 self.header = std_msgs.msg._Header.Header()
00114 self.status = actionlib_msgs.msg.GoalStatus()
00115 self.feedback = object_manipulation_msgs.msg.PickupFeedback()
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 _x = self
00145 buff.write(_struct_2i.pack(_x.feedback.current_grasp, _x.feedback.total_grasps))
00146 except struct.error, se: self._check_types(se)
00147 except TypeError, te: self._check_types(te)
00148
00149 def deserialize(self, str):
00150 """
00151 unpack serialized message in str into this message instance
00152 @param str: byte array of serialized message
00153 @type str: str
00154 """
00155 try:
00156 if self.header is None:
00157 self.header = std_msgs.msg._Header.Header()
00158 if self.status is None:
00159 self.status = actionlib_msgs.msg.GoalStatus()
00160 if self.feedback is None:
00161 self.feedback = object_manipulation_msgs.msg.PickupFeedback()
00162 end = 0
00163 _x = self
00164 start = end
00165 end += 12
00166 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00167 start = end
00168 end += 4
00169 (length,) = _struct_I.unpack(str[start:end])
00170 start = end
00171 end += length
00172 self.header.frame_id = str[start:end]
00173 _x = self
00174 start = end
00175 end += 8
00176 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00177 start = end
00178 end += 4
00179 (length,) = _struct_I.unpack(str[start:end])
00180 start = end
00181 end += length
00182 self.status.goal_id.id = str[start:end]
00183 start = end
00184 end += 1
00185 (self.status.status,) = _struct_B.unpack(str[start:end])
00186 start = end
00187 end += 4
00188 (length,) = _struct_I.unpack(str[start:end])
00189 start = end
00190 end += length
00191 self.status.text = str[start:end]
00192 _x = self
00193 start = end
00194 end += 8
00195 (_x.feedback.current_grasp, _x.feedback.total_grasps,) = _struct_2i.unpack(str[start:end])
00196 return self
00197 except struct.error, e:
00198 raise roslib.message.DeserializationError(e)
00199
00200
00201 def serialize_numpy(self, buff, numpy):
00202 """
00203 serialize message with numpy array types into buffer
00204 @param buff: buffer
00205 @type buff: StringIO
00206 @param numpy: numpy python module
00207 @type numpy module
00208 """
00209 try:
00210 _x = self
00211 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00212 _x = self.header.frame_id
00213 length = len(_x)
00214 buff.write(struct.pack('<I%ss'%length, length, _x))
00215 _x = self
00216 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00217 _x = self.status.goal_id.id
00218 length = len(_x)
00219 buff.write(struct.pack('<I%ss'%length, length, _x))
00220 buff.write(_struct_B.pack(self.status.status))
00221 _x = self.status.text
00222 length = len(_x)
00223 buff.write(struct.pack('<I%ss'%length, length, _x))
00224 _x = self
00225 buff.write(_struct_2i.pack(_x.feedback.current_grasp, _x.feedback.total_grasps))
00226 except struct.error, se: self._check_types(se)
00227 except TypeError, te: self._check_types(te)
00228
00229 def deserialize_numpy(self, str, numpy):
00230 """
00231 unpack serialized message in str into this message instance using numpy for array types
00232 @param str: byte array of serialized message
00233 @type str: str
00234 @param numpy: numpy python module
00235 @type numpy: module
00236 """
00237 try:
00238 if self.header is None:
00239 self.header = std_msgs.msg._Header.Header()
00240 if self.status is None:
00241 self.status = actionlib_msgs.msg.GoalStatus()
00242 if self.feedback is None:
00243 self.feedback = object_manipulation_msgs.msg.PickupFeedback()
00244 end = 0
00245 _x = self
00246 start = end
00247 end += 12
00248 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00249 start = end
00250 end += 4
00251 (length,) = _struct_I.unpack(str[start:end])
00252 start = end
00253 end += length
00254 self.header.frame_id = str[start:end]
00255 _x = self
00256 start = end
00257 end += 8
00258 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 start = end
00263 end += length
00264 self.status.goal_id.id = str[start:end]
00265 start = end
00266 end += 1
00267 (self.status.status,) = _struct_B.unpack(str[start:end])
00268 start = end
00269 end += 4
00270 (length,) = _struct_I.unpack(str[start:end])
00271 start = end
00272 end += length
00273 self.status.text = str[start:end]
00274 _x = self
00275 start = end
00276 end += 8
00277 (_x.feedback.current_grasp, _x.feedback.total_grasps,) = _struct_2i.unpack(str[start:end])
00278 return self
00279 except struct.error, e:
00280 raise roslib.message.DeserializationError(e)
00281
00282 _struct_I = roslib.message.struct_I
00283 _struct_3I = struct.Struct("<3I")
00284 _struct_B = struct.Struct("<B")
00285 _struct_2I = struct.Struct("<2I")
00286 _struct_2i = struct.Struct("<2i")