_ReactiveLiftActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/ReactiveLiftActionResult.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 ReactiveLiftActionResult(genpy.Message):
00013   _md5sum = "1d0d051ec44b5b01ea719228a077e443"
00014   _type = "object_manipulation_msgs/ReactiveLiftActionResult"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 ReactiveLiftResult 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/ReactiveLiftResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 
00083 # The result of the lift attempt
00084 ManipulationResult manipulation_result
00085 
00086 
00087 ================================================================================
00088 MSG: object_manipulation_msgs/ManipulationResult
00089 # Result codes for manipulation tasks
00090 
00091 # task completed as expected
00092 # generally means you can proceed as planned
00093 int32 SUCCESS = 1
00094 
00095 # task not possible (e.g. out of reach or obstacles in the way)
00096 # generally means that the world was not disturbed, so you can try another task
00097 int32 UNFEASIBLE = -1
00098 
00099 # task was thought possible, but failed due to unexpected events during execution
00100 # it is likely that the world was disturbed, so you are encouraged to refresh
00101 # your sensed world model before proceeding to another task
00102 int32 FAILED = -2
00103 
00104 # a lower level error prevented task completion (e.g. joint controller not responding)
00105 # generally requires human attention
00106 int32 ERROR = -3
00107 
00108 # means that at some point during execution we ended up in a state that the collision-aware
00109 # arm navigation module will not move out of. The world was likely not disturbed, but you 
00110 # probably need a new collision map to move the arm out of the stuck position
00111 int32 ARM_MOVEMENT_PREVENTED = -4
00112 
00113 # specific to grasp actions
00114 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested
00115 # it is likely that the collision environment will see collisions between the hand/object and the support surface
00116 int32 LIFT_FAILED = -5
00117 
00118 # specific to place actions
00119 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested
00120 # it is likely that the collision environment will see collisions between the hand and the object
00121 int32 RETREAT_FAILED = -6
00122 
00123 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else"
00124 int32 CANCELLED = -7
00125 
00126 # the actual value of this error code
00127 int32 value
00128 
00129 """
00130   __slots__ = ['header','status','result']
00131   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/ReactiveLiftResult']
00132 
00133   def __init__(self, *args, **kwds):
00134     """
00135     Constructor. Any message fields that are implicitly/explicitly
00136     set to None will be assigned a default value. The recommend
00137     use is keyword arguments as this is more robust to future message
00138     changes.  You cannot mix in-order arguments and keyword arguments.
00139 
00140     The available fields are:
00141        header,status,result
00142 
00143     :param args: complete set of field values, in .msg order
00144     :param kwds: use keyword arguments corresponding to message field names
00145     to set specific fields.
00146     """
00147     if args or kwds:
00148       super(ReactiveLiftActionResult, self).__init__(*args, **kwds)
00149       #message fields cannot be None, assign default values for those that are
00150       if self.header is None:
00151         self.header = std_msgs.msg.Header()
00152       if self.status is None:
00153         self.status = actionlib_msgs.msg.GoalStatus()
00154       if self.result is None:
00155         self.result = object_manipulation_msgs.msg.ReactiveLiftResult()
00156     else:
00157       self.header = std_msgs.msg.Header()
00158       self.status = actionlib_msgs.msg.GoalStatus()
00159       self.result = object_manipulation_msgs.msg.ReactiveLiftResult()
00160 
00161   def _get_types(self):
00162     """
00163     internal API method
00164     """
00165     return self._slot_types
00166 
00167   def serialize(self, buff):
00168     """
00169     serialize message into buffer
00170     :param buff: buffer, ``StringIO``
00171     """
00172     try:
00173       _x = self
00174       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00175       _x = self.header.frame_id
00176       length = len(_x)
00177       if python3 or type(_x) == unicode:
00178         _x = _x.encode('utf-8')
00179         length = len(_x)
00180       buff.write(struct.pack('<I%ss'%length, length, _x))
00181       _x = self
00182       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00183       _x = self.status.goal_id.id
00184       length = len(_x)
00185       if python3 or type(_x) == unicode:
00186         _x = _x.encode('utf-8')
00187         length = len(_x)
00188       buff.write(struct.pack('<I%ss'%length, length, _x))
00189       buff.write(_struct_B.pack(self.status.status))
00190       _x = self.status.text
00191       length = len(_x)
00192       if python3 or type(_x) == unicode:
00193         _x = _x.encode('utf-8')
00194         length = len(_x)
00195       buff.write(struct.pack('<I%ss'%length, length, _x))
00196       buff.write(_struct_i.pack(self.result.manipulation_result.value))
00197     except struct.error as se: self._check_types(se)
00198     except TypeError as te: self._check_types(te)
00199 
00200   def deserialize(self, str):
00201     """
00202     unpack serialized message in str into this message instance
00203     :param str: byte array of serialized message, ``str``
00204     """
00205     try:
00206       if self.header is None:
00207         self.header = std_msgs.msg.Header()
00208       if self.status is None:
00209         self.status = actionlib_msgs.msg.GoalStatus()
00210       if self.result is None:
00211         self.result = object_manipulation_msgs.msg.ReactiveLiftResult()
00212       end = 0
00213       _x = self
00214       start = end
00215       end += 12
00216       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00217       start = end
00218       end += 4
00219       (length,) = _struct_I.unpack(str[start:end])
00220       start = end
00221       end += length
00222       if python3:
00223         self.header.frame_id = str[start:end].decode('utf-8')
00224       else:
00225         self.header.frame_id = str[start:end]
00226       _x = self
00227       start = end
00228       end += 8
00229       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       start = end
00234       end += length
00235       if python3:
00236         self.status.goal_id.id = str[start:end].decode('utf-8')
00237       else:
00238         self.status.goal_id.id = str[start:end]
00239       start = end
00240       end += 1
00241       (self.status.status,) = _struct_B.unpack(str[start:end])
00242       start = end
00243       end += 4
00244       (length,) = _struct_I.unpack(str[start:end])
00245       start = end
00246       end += length
00247       if python3:
00248         self.status.text = str[start:end].decode('utf-8')
00249       else:
00250         self.status.text = str[start:end]
00251       start = end
00252       end += 4
00253       (self.result.manipulation_result.value,) = _struct_i.unpack(str[start:end])
00254       return self
00255     except struct.error as e:
00256       raise genpy.DeserializationError(e) #most likely buffer underfill
00257 
00258 
00259   def serialize_numpy(self, buff, numpy):
00260     """
00261     serialize message with numpy array types into buffer
00262     :param buff: buffer, ``StringIO``
00263     :param numpy: numpy python module
00264     """
00265     try:
00266       _x = self
00267       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00268       _x = self.header.frame_id
00269       length = len(_x)
00270       if python3 or type(_x) == unicode:
00271         _x = _x.encode('utf-8')
00272         length = len(_x)
00273       buff.write(struct.pack('<I%ss'%length, length, _x))
00274       _x = self
00275       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00276       _x = self.status.goal_id.id
00277       length = len(_x)
00278       if python3 or type(_x) == unicode:
00279         _x = _x.encode('utf-8')
00280         length = len(_x)
00281       buff.write(struct.pack('<I%ss'%length, length, _x))
00282       buff.write(_struct_B.pack(self.status.status))
00283       _x = self.status.text
00284       length = len(_x)
00285       if python3 or type(_x) == unicode:
00286         _x = _x.encode('utf-8')
00287         length = len(_x)
00288       buff.write(struct.pack('<I%ss'%length, length, _x))
00289       buff.write(_struct_i.pack(self.result.manipulation_result.value))
00290     except struct.error as se: self._check_types(se)
00291     except TypeError as te: self._check_types(te)
00292 
00293   def deserialize_numpy(self, str, numpy):
00294     """
00295     unpack serialized message in str into this message instance using numpy for array types
00296     :param str: byte array of serialized message, ``str``
00297     :param numpy: numpy python module
00298     """
00299     try:
00300       if self.header is None:
00301         self.header = std_msgs.msg.Header()
00302       if self.status is None:
00303         self.status = actionlib_msgs.msg.GoalStatus()
00304       if self.result is None:
00305         self.result = object_manipulation_msgs.msg.ReactiveLiftResult()
00306       end = 0
00307       _x = self
00308       start = end
00309       end += 12
00310       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00311       start = end
00312       end += 4
00313       (length,) = _struct_I.unpack(str[start:end])
00314       start = end
00315       end += length
00316       if python3:
00317         self.header.frame_id = str[start:end].decode('utf-8')
00318       else:
00319         self.header.frame_id = str[start:end]
00320       _x = self
00321       start = end
00322       end += 8
00323       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00324       start = end
00325       end += 4
00326       (length,) = _struct_I.unpack(str[start:end])
00327       start = end
00328       end += length
00329       if python3:
00330         self.status.goal_id.id = str[start:end].decode('utf-8')
00331       else:
00332         self.status.goal_id.id = str[start:end]
00333       start = end
00334       end += 1
00335       (self.status.status,) = _struct_B.unpack(str[start:end])
00336       start = end
00337       end += 4
00338       (length,) = _struct_I.unpack(str[start:end])
00339       start = end
00340       end += length
00341       if python3:
00342         self.status.text = str[start:end].decode('utf-8')
00343       else:
00344         self.status.text = str[start:end]
00345       start = end
00346       end += 4
00347       (self.result.manipulation_result.value,) = _struct_i.unpack(str[start:end])
00348       return self
00349     except struct.error as e:
00350       raise genpy.DeserializationError(e) #most likely buffer underfill
00351 
00352 _struct_I = genpy.struct_I
00353 _struct_i = struct.Struct("<i")
00354 _struct_3I = struct.Struct("<3I")
00355 _struct_B = struct.Struct("<B")
00356 _struct_2I = struct.Struct("<2I")


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Thu Jan 2 2014 11:38:12