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