00001 """autogenerated by genpy from object_manipulation_msgs/GraspHandPostureExecutionActionResult.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import object_manipulation_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class GraspHandPostureExecutionActionResult(genpy.Message):
00013 _md5sum = "6434d1842053adb9e907efbf917fa72b"
00014 _type = "object_manipulation_msgs/GraspHandPostureExecutionActionResult"
00015 _has_header = True
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 GraspHandPostureExecutionResult result
00021
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data
00026 # in a particular coordinate frame.
00027 #
00028 # sequence ID: consecutively increasing ID
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039
00040 ================================================================================
00041 MSG: actionlib_msgs/GoalStatus
00042 GoalID goal_id
00043 uint8 status
00044 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00045 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00046 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00047 # and has since completed its execution (Terminal State)
00048 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00049 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00050 # to some failure (Terminal State)
00051 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00052 # because the goal was unattainable or invalid (Terminal State)
00053 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00054 # and has not yet completed execution
00055 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00056 # but the action server has not yet confirmed that the goal is canceled
00057 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00058 # and was successfully cancelled (Terminal State)
00059 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00060 # sent over the wire by an action server
00061
00062 #Allow for the user to associate a string with GoalStatus for debugging
00063 string text
00064
00065
00066 ================================================================================
00067 MSG: actionlib_msgs/GoalID
00068 # The stamp should store the time at which this goal was requested.
00069 # It is used by an action server when it tries to preempt all
00070 # goals that were requested before a certain time
00071 time stamp
00072
00073 # The id provides a way to associate feedback and
00074 # result message with specific goal requests. The id
00075 # specified must be unique.
00076 string id
00077
00078
00079 ================================================================================
00080 MSG: object_manipulation_msgs/GraspHandPostureExecutionResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 # the result of the action
00083 ManipulationResult result
00084
00085
00086 ================================================================================
00087 MSG: object_manipulation_msgs/ManipulationResult
00088 # Result codes for manipulation tasks
00089
00090 # task completed as expected
00091 # generally means you can proceed as planned
00092 int32 SUCCESS = 1
00093
00094 # task not possible (e.g. out of reach or obstacles in the way)
00095 # generally means that the world was not disturbed, so you can try another task
00096 int32 UNFEASIBLE = -1
00097
00098 # task was thought possible, but failed due to unexpected events during execution
00099 # it is likely that the world was disturbed, so you are encouraged to refresh
00100 # your sensed world model before proceeding to another task
00101 int32 FAILED = -2
00102
00103 # a lower level error prevented task completion (e.g. joint controller not responding)
00104 # generally requires human attention
00105 int32 ERROR = -3
00106
00107 # means that at some point during execution we ended up in a state that the collision-aware
00108 # arm navigation module will not move out of. The world was likely not disturbed, but you
00109 # probably need a new collision map to move the arm out of the stuck position
00110 int32 ARM_MOVEMENT_PREVENTED = -4
00111
00112 # specific to grasp actions
00113 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested
00114 # it is likely that the collision environment will see collisions between the hand/object and the support surface
00115 int32 LIFT_FAILED = -5
00116
00117 # specific to place actions
00118 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested
00119 # it is likely that the collision environment will see collisions between the hand and the object
00120 int32 RETREAT_FAILED = -6
00121
00122 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else"
00123 int32 CANCELLED = -7
00124
00125 # the actual value of this error code
00126 int32 value
00127
00128 """
00129 __slots__ = ['header','status','result']
00130 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/GraspHandPostureExecutionResult']
00131
00132 def __init__(self, *args, **kwds):
00133 """
00134 Constructor. Any message fields that are implicitly/explicitly
00135 set to None will be assigned a default value. The recommend
00136 use is keyword arguments as this is more robust to future message
00137 changes. You cannot mix in-order arguments and keyword arguments.
00138
00139 The available fields are:
00140 header,status,result
00141
00142 :param args: complete set of field values, in .msg order
00143 :param kwds: use keyword arguments corresponding to message field names
00144 to set specific fields.
00145 """
00146 if args or kwds:
00147 super(GraspHandPostureExecutionActionResult, self).__init__(*args, **kwds)
00148
00149 if self.header is None:
00150 self.header = std_msgs.msg.Header()
00151 if self.status is None:
00152 self.status = actionlib_msgs.msg.GoalStatus()
00153 if self.result is None:
00154 self.result = object_manipulation_msgs.msg.GraspHandPostureExecutionResult()
00155 else:
00156 self.header = std_msgs.msg.Header()
00157 self.status = actionlib_msgs.msg.GoalStatus()
00158 self.result = object_manipulation_msgs.msg.GraspHandPostureExecutionResult()
00159
00160 def _get_types(self):
00161 """
00162 internal API method
00163 """
00164 return self._slot_types
00165
00166 def serialize(self, buff):
00167 """
00168 serialize message into buffer
00169 :param buff: buffer, ``StringIO``
00170 """
00171 try:
00172 _x = self
00173 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00174 _x = self.header.frame_id
00175 length = len(_x)
00176 if python3 or type(_x) == unicode:
00177 _x = _x.encode('utf-8')
00178 length = len(_x)
00179 buff.write(struct.pack('<I%ss'%length, length, _x))
00180 _x = self
00181 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00182 _x = self.status.goal_id.id
00183 length = len(_x)
00184 if python3 or type(_x) == unicode:
00185 _x = _x.encode('utf-8')
00186 length = len(_x)
00187 buff.write(struct.pack('<I%ss'%length, length, _x))
00188 buff.write(_struct_B.pack(self.status.status))
00189 _x = self.status.text
00190 length = len(_x)
00191 if python3 or type(_x) == unicode:
00192 _x = _x.encode('utf-8')
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 buff.write(_struct_i.pack(self.result.result.value))
00196 except struct.error as se: self._check_types(se)
00197 except TypeError as te: self._check_types(te)
00198
00199 def deserialize(self, str):
00200 """
00201 unpack serialized message in str into this message instance
00202 :param str: byte array of serialized message, ``str``
00203 """
00204 try:
00205 if self.header is None:
00206 self.header = std_msgs.msg.Header()
00207 if self.status is None:
00208 self.status = actionlib_msgs.msg.GoalStatus()
00209 if self.result is None:
00210 self.result = object_manipulation_msgs.msg.GraspHandPostureExecutionResult()
00211 end = 0
00212 _x = self
00213 start = end
00214 end += 12
00215 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00216 start = end
00217 end += 4
00218 (length,) = _struct_I.unpack(str[start:end])
00219 start = end
00220 end += length
00221 if python3:
00222 self.header.frame_id = str[start:end].decode('utf-8')
00223 else:
00224 self.header.frame_id = str[start:end]
00225 _x = self
00226 start = end
00227 end += 8
00228 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 if python3:
00235 self.status.goal_id.id = str[start:end].decode('utf-8')
00236 else:
00237 self.status.goal_id.id = str[start:end]
00238 start = end
00239 end += 1
00240 (self.status.status,) = _struct_B.unpack(str[start:end])
00241 start = end
00242 end += 4
00243 (length,) = _struct_I.unpack(str[start:end])
00244 start = end
00245 end += length
00246 if python3:
00247 self.status.text = str[start:end].decode('utf-8')
00248 else:
00249 self.status.text = str[start:end]
00250 start = end
00251 end += 4
00252 (self.result.result.value,) = _struct_i.unpack(str[start:end])
00253 return self
00254 except struct.error as e:
00255 raise genpy.DeserializationError(e)
00256
00257
00258 def serialize_numpy(self, buff, numpy):
00259 """
00260 serialize message with numpy array types into buffer
00261 :param buff: buffer, ``StringIO``
00262 :param numpy: numpy python module
00263 """
00264 try:
00265 _x = self
00266 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00267 _x = self.header.frame_id
00268 length = len(_x)
00269 if python3 or type(_x) == unicode:
00270 _x = _x.encode('utf-8')
00271 length = len(_x)
00272 buff.write(struct.pack('<I%ss'%length, length, _x))
00273 _x = self
00274 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00275 _x = self.status.goal_id.id
00276 length = len(_x)
00277 if python3 or type(_x) == unicode:
00278 _x = _x.encode('utf-8')
00279 length = len(_x)
00280 buff.write(struct.pack('<I%ss'%length, length, _x))
00281 buff.write(_struct_B.pack(self.status.status))
00282 _x = self.status.text
00283 length = len(_x)
00284 if python3 or type(_x) == unicode:
00285 _x = _x.encode('utf-8')
00286 length = len(_x)
00287 buff.write(struct.pack('<I%ss'%length, length, _x))
00288 buff.write(_struct_i.pack(self.result.result.value))
00289 except struct.error as se: self._check_types(se)
00290 except TypeError as te: self._check_types(te)
00291
00292 def deserialize_numpy(self, str, numpy):
00293 """
00294 unpack serialized message in str into this message instance using numpy for array types
00295 :param str: byte array of serialized message, ``str``
00296 :param numpy: numpy python module
00297 """
00298 try:
00299 if self.header is None:
00300 self.header = std_msgs.msg.Header()
00301 if self.status is None:
00302 self.status = actionlib_msgs.msg.GoalStatus()
00303 if self.result is None:
00304 self.result = object_manipulation_msgs.msg.GraspHandPostureExecutionResult()
00305 end = 0
00306 _x = self
00307 start = end
00308 end += 12
00309 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 if python3:
00316 self.header.frame_id = str[start:end].decode('utf-8')
00317 else:
00318 self.header.frame_id = str[start:end]
00319 _x = self
00320 start = end
00321 end += 8
00322 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 if python3:
00329 self.status.goal_id.id = str[start:end].decode('utf-8')
00330 else:
00331 self.status.goal_id.id = str[start:end]
00332 start = end
00333 end += 1
00334 (self.status.status,) = _struct_B.unpack(str[start:end])
00335 start = end
00336 end += 4
00337 (length,) = _struct_I.unpack(str[start:end])
00338 start = end
00339 end += length
00340 if python3:
00341 self.status.text = str[start:end].decode('utf-8')
00342 else:
00343 self.status.text = str[start:end]
00344 start = end
00345 end += 4
00346 (self.result.result.value,) = _struct_i.unpack(str[start:end])
00347 return self
00348 except struct.error as e:
00349 raise genpy.DeserializationError(e)
00350
00351 _struct_I = genpy.struct_I
00352 _struct_i = struct.Struct("<i")
00353 _struct_3I = struct.Struct("<3I")
00354 _struct_B = struct.Struct("<B")
00355 _struct_2I = struct.Struct("<2I")