00001 """autogenerated by genmsg_py from ReactiveLiftActionFeedback.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 ReactiveLiftActionFeedback(roslib.message.Message):
00011 _md5sum = "b66dacddaccf02055a978b3aeb693a24"
00012 _type = "object_manipulation_msgs/ReactiveLiftActionFeedback"
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 ReactiveLiftFeedback 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: object_manipulation_msgs/ReactiveLiftFeedback
00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00080
00081 # Which phase the lift is in
00082
00083 ManipulationPhase manipulation_phase
00084
00085
00086
00087 ================================================================================
00088 MSG: object_manipulation_msgs/ManipulationPhase
00089 int32 CHECKING_FEASIBILITY = 0
00090 int32 MOVING_TO_PREGRASP = 1
00091 int32 MOVING_TO_GRASP = 2
00092 int32 CLOSING = 3
00093 int32 ADJUSTING_GRASP = 4
00094 int32 LIFTING = 5
00095 int32 MOVING_WITH_OBJECT = 6
00096 int32 MOVING_TO_PLACE = 7
00097 int32 PLACING = 8
00098 int32 OPENING = 9
00099 int32 RETREATING = 10
00100 int32 MOVING_WITHOUT_OBJECT = 11
00101 int32 SHAKING = 12
00102 int32 SUCCEEDED = 13
00103 int32 FAILED = 14
00104 int32 ABORTED = 15
00105 int32 HOLDING_OBJECT = 16
00106
00107 int32 phase
00108 """
00109 __slots__ = ['header','status','feedback']
00110 _slot_types = ['Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/ReactiveLiftFeedback']
00111
00112 def __init__(self, *args, **kwds):
00113 """
00114 Constructor. Any message fields that are implicitly/explicitly
00115 set to None will be assigned a default value. The recommend
00116 use is keyword arguments as this is more robust to future message
00117 changes. You cannot mix in-order arguments and keyword arguments.
00118
00119 The available fields are:
00120 header,status,feedback
00121
00122 @param args: complete set of field values, in .msg order
00123 @param kwds: use keyword arguments corresponding to message field names
00124 to set specific fields.
00125 """
00126 if args or kwds:
00127 super(ReactiveLiftActionFeedback, self).__init__(*args, **kwds)
00128
00129 if self.header is None:
00130 self.header = std_msgs.msg._Header.Header()
00131 if self.status is None:
00132 self.status = actionlib_msgs.msg.GoalStatus()
00133 if self.feedback is None:
00134 self.feedback = object_manipulation_msgs.msg.ReactiveLiftFeedback()
00135 else:
00136 self.header = std_msgs.msg._Header.Header()
00137 self.status = actionlib_msgs.msg.GoalStatus()
00138 self.feedback = object_manipulation_msgs.msg.ReactiveLiftFeedback()
00139
00140 def _get_types(self):
00141 """
00142 internal API method
00143 """
00144 return self._slot_types
00145
00146 def serialize(self, buff):
00147 """
00148 serialize message into buffer
00149 @param buff: buffer
00150 @type buff: StringIO
00151 """
00152 try:
00153 _x = self
00154 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00155 _x = self.header.frame_id
00156 length = len(_x)
00157 buff.write(struct.pack('<I%ss'%length, length, _x))
00158 _x = self
00159 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00160 _x = self.status.goal_id.id
00161 length = len(_x)
00162 buff.write(struct.pack('<I%ss'%length, length, _x))
00163 buff.write(_struct_B.pack(self.status.status))
00164 _x = self.status.text
00165 length = len(_x)
00166 buff.write(struct.pack('<I%ss'%length, length, _x))
00167 buff.write(_struct_i.pack(self.feedback.manipulation_phase.phase))
00168 except struct.error, se: self._check_types(se)
00169 except TypeError, te: self._check_types(te)
00170
00171 def deserialize(self, str):
00172 """
00173 unpack serialized message in str into this message instance
00174 @param str: byte array of serialized message
00175 @type str: str
00176 """
00177 try:
00178 if self.header is None:
00179 self.header = std_msgs.msg._Header.Header()
00180 if self.status is None:
00181 self.status = actionlib_msgs.msg.GoalStatus()
00182 if self.feedback is None:
00183 self.feedback = object_manipulation_msgs.msg.ReactiveLiftFeedback()
00184 end = 0
00185 _x = self
00186 start = end
00187 end += 12
00188 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00189 start = end
00190 end += 4
00191 (length,) = _struct_I.unpack(str[start:end])
00192 start = end
00193 end += length
00194 self.header.frame_id = str[start:end]
00195 _x = self
00196 start = end
00197 end += 8
00198 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00199 start = end
00200 end += 4
00201 (length,) = _struct_I.unpack(str[start:end])
00202 start = end
00203 end += length
00204 self.status.goal_id.id = str[start:end]
00205 start = end
00206 end += 1
00207 (self.status.status,) = _struct_B.unpack(str[start:end])
00208 start = end
00209 end += 4
00210 (length,) = _struct_I.unpack(str[start:end])
00211 start = end
00212 end += length
00213 self.status.text = str[start:end]
00214 start = end
00215 end += 4
00216 (self.feedback.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00217 return self
00218 except struct.error, e:
00219 raise roslib.message.DeserializationError(e)
00220
00221
00222 def serialize_numpy(self, buff, numpy):
00223 """
00224 serialize message with numpy array types into buffer
00225 @param buff: buffer
00226 @type buff: StringIO
00227 @param numpy: numpy python module
00228 @type numpy module
00229 """
00230 try:
00231 _x = self
00232 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00233 _x = self.header.frame_id
00234 length = len(_x)
00235 buff.write(struct.pack('<I%ss'%length, length, _x))
00236 _x = self
00237 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00238 _x = self.status.goal_id.id
00239 length = len(_x)
00240 buff.write(struct.pack('<I%ss'%length, length, _x))
00241 buff.write(_struct_B.pack(self.status.status))
00242 _x = self.status.text
00243 length = len(_x)
00244 buff.write(struct.pack('<I%ss'%length, length, _x))
00245 buff.write(_struct_i.pack(self.feedback.manipulation_phase.phase))
00246 except struct.error, se: self._check_types(se)
00247 except TypeError, te: self._check_types(te)
00248
00249 def deserialize_numpy(self, str, numpy):
00250 """
00251 unpack serialized message in str into this message instance using numpy for array types
00252 @param str: byte array of serialized message
00253 @type str: str
00254 @param numpy: numpy python module
00255 @type numpy: module
00256 """
00257 try:
00258 if self.header is None:
00259 self.header = std_msgs.msg._Header.Header()
00260 if self.status is None:
00261 self.status = actionlib_msgs.msg.GoalStatus()
00262 if self.feedback is None:
00263 self.feedback = object_manipulation_msgs.msg.ReactiveLiftFeedback()
00264 end = 0
00265 _x = self
00266 start = end
00267 end += 12
00268 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 start = end
00273 end += length
00274 self.header.frame_id = str[start:end]
00275 _x = self
00276 start = end
00277 end += 8
00278 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00285 start = end
00286 end += 1
00287 (self.status.status,) = _struct_B.unpack(str[start:end])
00288 start = end
00289 end += 4
00290 (length,) = _struct_I.unpack(str[start:end])
00291 start = end
00292 end += length
00293 self.status.text = str[start:end]
00294 start = end
00295 end += 4
00296 (self.feedback.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00297 return self
00298 except struct.error, e:
00299 raise roslib.message.DeserializationError(e)
00300
00301 _struct_I = roslib.message.struct_I
00302 _struct_i = struct.Struct("<i")
00303 _struct_3I = struct.Struct("<3I")
00304 _struct_B = struct.Struct("<B")
00305 _struct_2I = struct.Struct("<2I")