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


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 02:58:11