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