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