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