_ReactiveGraspResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/ReactiveGraspResult.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 
00009 class ReactiveGraspResult(genpy.Message):
00010   _md5sum = "659cc9c343e1df3a6e418ad380f5e7c4"
00011   _type = "object_manipulation_msgs/ReactiveGraspResult"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 
00015 # the result of the reactive grasp attempt
00016 
00017 ManipulationResult manipulation_result
00018 
00019 
00020 ================================================================================
00021 MSG: object_manipulation_msgs/ManipulationResult
00022 # Result codes for manipulation tasks
00023 
00024 # task completed as expected
00025 # generally means you can proceed as planned
00026 int32 SUCCESS = 1
00027 
00028 # task not possible (e.g. out of reach or obstacles in the way)
00029 # generally means that the world was not disturbed, so you can try another task
00030 int32 UNFEASIBLE = -1
00031 
00032 # task was thought possible, but failed due to unexpected events during execution
00033 # it is likely that the world was disturbed, so you are encouraged to refresh
00034 # your sensed world model before proceeding to another task
00035 int32 FAILED = -2
00036 
00037 # a lower level error prevented task completion (e.g. joint controller not responding)
00038 # generally requires human attention
00039 int32 ERROR = -3
00040 
00041 # means that at some point during execution we ended up in a state that the collision-aware
00042 # arm navigation module will not move out of. The world was likely not disturbed, but you 
00043 # probably need a new collision map to move the arm out of the stuck position
00044 int32 ARM_MOVEMENT_PREVENTED = -4
00045 
00046 # specific to grasp actions
00047 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested
00048 # it is likely that the collision environment will see collisions between the hand/object and the support surface
00049 int32 LIFT_FAILED = -5
00050 
00051 # specific to place actions
00052 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested
00053 # it is likely that the collision environment will see collisions between the hand and the object
00054 int32 RETREAT_FAILED = -6
00055 
00056 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else"
00057 int32 CANCELLED = -7
00058 
00059 # the actual value of this error code
00060 int32 value
00061 
00062 """
00063   __slots__ = ['manipulation_result']
00064   _slot_types = ['object_manipulation_msgs/ManipulationResult']
00065 
00066   def __init__(self, *args, **kwds):
00067     """
00068     Constructor. Any message fields that are implicitly/explicitly
00069     set to None will be assigned a default value. The recommend
00070     use is keyword arguments as this is more robust to future message
00071     changes.  You cannot mix in-order arguments and keyword arguments.
00072 
00073     The available fields are:
00074        manipulation_result
00075 
00076     :param args: complete set of field values, in .msg order
00077     :param kwds: use keyword arguments corresponding to message field names
00078     to set specific fields.
00079     """
00080     if args or kwds:
00081       super(ReactiveGraspResult, self).__init__(*args, **kwds)
00082       #message fields cannot be None, assign default values for those that are
00083       if self.manipulation_result is None:
00084         self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult()
00085     else:
00086       self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult()
00087 
00088   def _get_types(self):
00089     """
00090     internal API method
00091     """
00092     return self._slot_types
00093 
00094   def serialize(self, buff):
00095     """
00096     serialize message into buffer
00097     :param buff: buffer, ``StringIO``
00098     """
00099     try:
00100       buff.write(_struct_i.pack(self.manipulation_result.value))
00101     except struct.error as se: self._check_types(se)
00102     except TypeError as te: self._check_types(te)
00103 
00104   def deserialize(self, str):
00105     """
00106     unpack serialized message in str into this message instance
00107     :param str: byte array of serialized message, ``str``
00108     """
00109     try:
00110       if self.manipulation_result is None:
00111         self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult()
00112       end = 0
00113       start = end
00114       end += 4
00115       (self.manipulation_result.value,) = _struct_i.unpack(str[start:end])
00116       return self
00117     except struct.error as e:
00118       raise genpy.DeserializationError(e) #most likely buffer underfill
00119 
00120 
00121   def serialize_numpy(self, buff, numpy):
00122     """
00123     serialize message with numpy array types into buffer
00124     :param buff: buffer, ``StringIO``
00125     :param numpy: numpy python module
00126     """
00127     try:
00128       buff.write(_struct_i.pack(self.manipulation_result.value))
00129     except struct.error as se: self._check_types(se)
00130     except TypeError as te: self._check_types(te)
00131 
00132   def deserialize_numpy(self, str, numpy):
00133     """
00134     unpack serialized message in str into this message instance using numpy for array types
00135     :param str: byte array of serialized message, ``str``
00136     :param numpy: numpy python module
00137     """
00138     try:
00139       if self.manipulation_result is None:
00140         self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult()
00141       end = 0
00142       start = end
00143       end += 4
00144       (self.manipulation_result.value,) = _struct_i.unpack(str[start:end])
00145       return self
00146     except struct.error as e:
00147       raise genpy.DeserializationError(e) #most likely buffer underfill
00148 
00149 _struct_I = genpy.struct_I
00150 _struct_i = struct.Struct("<i")


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