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


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 11:55:20