Go to the documentation of this file.00001 """autogenerated by genpy from object_manipulation_msgs/GraspPlanningErrorCode.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 GraspPlanningErrorCode(genpy.Message):
00009 _md5sum = "d0cbf262cc3d8075a46b994eef1bdb2a"
00010 _type = "object_manipulation_msgs/GraspPlanningErrorCode"
00011 _has_header = False
00012 _full_text = """# Error codes for grasp and place planning
00013
00014 # plan completed as expected
00015 int32 SUCCESS = 0
00016
00017 # tf error encountered while transforming
00018 int32 TF_ERROR = 1
00019
00020 # some other error
00021 int32 OTHER_ERROR = 2
00022
00023 # the actual value of this error code
00024 int32 value
00025 """
00026
00027 SUCCESS = 0
00028 TF_ERROR = 1
00029 OTHER_ERROR = 2
00030
00031 __slots__ = ['value']
00032 _slot_types = ['int32']
00033
00034 def __init__(self, *args, **kwds):
00035 """
00036 Constructor. Any message fields that are implicitly/explicitly
00037 set to None will be assigned a default value. The recommend
00038 use is keyword arguments as this is more robust to future message
00039 changes. You cannot mix in-order arguments and keyword arguments.
00040
00041 The available fields are:
00042 value
00043
00044 :param args: complete set of field values, in .msg order
00045 :param kwds: use keyword arguments corresponding to message field names
00046 to set specific fields.
00047 """
00048 if args or kwds:
00049 super(GraspPlanningErrorCode, self).__init__(*args, **kwds)
00050
00051 if self.value is None:
00052 self.value = 0
00053 else:
00054 self.value = 0
00055
00056 def _get_types(self):
00057 """
00058 internal API method
00059 """
00060 return self._slot_types
00061
00062 def serialize(self, buff):
00063 """
00064 serialize message into buffer
00065 :param buff: buffer, ``StringIO``
00066 """
00067 try:
00068 buff.write(_struct_i.pack(self.value))
00069 except struct.error as se: self._check_types(se)
00070 except TypeError as te: self._check_types(te)
00071
00072 def deserialize(self, str):
00073 """
00074 unpack serialized message in str into this message instance
00075 :param str: byte array of serialized message, ``str``
00076 """
00077 try:
00078 end = 0
00079 start = end
00080 end += 4
00081 (self.value,) = _struct_i.unpack(str[start:end])
00082 return self
00083 except struct.error as e:
00084 raise genpy.DeserializationError(e)
00085
00086
00087 def serialize_numpy(self, buff, numpy):
00088 """
00089 serialize message with numpy array types into buffer
00090 :param buff: buffer, ``StringIO``
00091 :param numpy: numpy python module
00092 """
00093 try:
00094 buff.write(_struct_i.pack(self.value))
00095 except struct.error as se: self._check_types(se)
00096 except TypeError as te: self._check_types(te)
00097
00098 def deserialize_numpy(self, str, numpy):
00099 """
00100 unpack serialized message in str into this message instance using numpy for array types
00101 :param str: byte array of serialized message, ``str``
00102 :param numpy: numpy python module
00103 """
00104 try:
00105 end = 0
00106 start = end
00107 end += 4
00108 (self.value,) = _struct_i.unpack(str[start:end])
00109 return self
00110 except struct.error as e:
00111 raise genpy.DeserializationError(e)
00112
00113 _struct_I = genpy.struct_I
00114 _struct_i = struct.Struct("<i")