00001 """autogenerated by genmsg_py from ManipulationResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ManipulationResult(roslib.message.Message):
00007 _md5sum = "85f8d010e045fcb335637fc8fc59184b"
00008 _type = "object_manipulation_msgs/ManipulationResult"
00009 _has_header = False
00010 _full_text = """# Result codes for manipulation tasks
00011
00012 # task completed as expected
00013 # generally means you can proceed as planned
00014 int32 SUCCESS = 1
00015
00016 # task not possible (e.g. out of reach or obstacles in the way)
00017 # generally means that the world was not disturbed, so you can try another task
00018 int32 UNFEASIBLE = -1
00019
00020 # task was thought possible, but failed due to unexpected events during execution
00021 # it is likely that the world was disturbed, so you are encouraged to refresh
00022 # your sensed world model before proceeding to another task
00023 int32 FAILED = -2
00024
00025 # a lower level error prevented task completion (e.g. joint controller not responding)
00026 # generally requires human attention
00027 int32 ERROR = -3
00028
00029 # means that at some point during execution we ended up in a state that the collision-aware
00030 # arm navigation module will not move out of. The world was likely not disturbed, but you
00031 # probably need a new collision map to move the arm out of the stuck position
00032 int32 ARM_MOVEMENT_PREVENTED = -4
00033
00034 # specific to grasp actions
00035 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested
00036 # it is likely that the collision environment will see collisions between the hand/object and the support surface
00037 int32 LIFT_FAILED = -5
00038
00039 # specific to place actions
00040 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested
00041 # it is likely that the collision environment will see collisions between the hand and the object
00042 int32 RETREAT_FAILED = -6
00043
00044 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else"
00045 int32 CANCELLED = -7
00046
00047 # the actual value of this error code
00048 int32 value
00049
00050 """
00051
00052 SUCCESS = 1
00053 UNFEASIBLE = -1
00054 FAILED = -2
00055 ERROR = -3
00056 ARM_MOVEMENT_PREVENTED = -4
00057 LIFT_FAILED = -5
00058 RETREAT_FAILED = -6
00059 CANCELLED = -7
00060
00061 __slots__ = ['value']
00062 _slot_types = ['int32']
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 value
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(ManipulationResult, self).__init__(*args, **kwds)
00080
00081 if self.value is None:
00082 self.value = 0
00083 else:
00084 self.value = 0
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
00096 @type buff: StringIO
00097 """
00098 try:
00099 buff.write(_struct_i.pack(self.value))
00100 except struct.error, se: self._check_types(se)
00101 except TypeError, te: self._check_types(te)
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
00107 @type str: str
00108 """
00109 try:
00110 end = 0
00111 start = end
00112 end += 4
00113 (self.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.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 end = 0
00142 start = end
00143 end += 4
00144 (self.value,) = _struct_i.unpack(str[start:end])
00145 return self
00146 except struct.error, e:
00147 raise roslib.message.DeserializationError(e)
00148
00149 _struct_I = roslib.message.struct_I
00150 _struct_i = struct.Struct("<i")