00001 """autogenerated by genmsg_py from ModelObjectInHandFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ModelObjectInHandFeedback(roslib.message.Message):
00007 _md5sum = "cfc629925fff8facecf764939ad9a751"
00008 _type = "pr2_create_object_model/ModelObjectInHandFeedback"
00009 _has_header = False
00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00011
00012 # which phase the process is in
00013 int32 phase
00014 int32 BEFORE_MOVE=0
00015 int32 CLEAR_MOVE=1
00016 int32 MOVE_TO_ROTATE_POSE=2
00017 int32 ROTATING=3
00018 int32 DONE=4
00019
00020 # how many rotate-poses have we gone to/are we in now
00021 int32 rotate_ind
00022
00023
00024 """
00025
00026 BEFORE_MOVE = 0
00027 CLEAR_MOVE = 1
00028 MOVE_TO_ROTATE_POSE = 2
00029 ROTATING = 3
00030 DONE = 4
00031
00032 __slots__ = ['phase','rotate_ind']
00033 _slot_types = ['int32','int32']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 phase,rotate_ind
00044
00045 @param args: complete set of field values, in .msg order
00046 @param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(ModelObjectInHandFeedback, self).__init__(*args, **kwds)
00051
00052 if self.phase is None:
00053 self.phase = 0
00054 if self.rotate_ind is None:
00055 self.rotate_ind = 0
00056 else:
00057 self.phase = 0
00058 self.rotate_ind = 0
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 @param buff: buffer
00070 @type buff: StringIO
00071 """
00072 try:
00073 _x = self
00074 buff.write(_struct_2i.pack(_x.phase, _x.rotate_ind))
00075 except struct.error as se: self._check_types(se)
00076 except TypeError as te: self._check_types(te)
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 @param str: byte array of serialized message
00082 @type str: str
00083 """
00084 try:
00085 end = 0
00086 _x = self
00087 start = end
00088 end += 8
00089 (_x.phase, _x.rotate_ind,) = _struct_2i.unpack(str[start:end])
00090 return self
00091 except struct.error as e:
00092 raise roslib.message.DeserializationError(e)
00093
00094
00095 def serialize_numpy(self, buff, numpy):
00096 """
00097 serialize message with numpy array types into buffer
00098 @param buff: buffer
00099 @type buff: StringIO
00100 @param numpy: numpy python module
00101 @type numpy module
00102 """
00103 try:
00104 _x = self
00105 buff.write(_struct_2i.pack(_x.phase, _x.rotate_ind))
00106 except struct.error as se: self._check_types(se)
00107 except TypeError as te: self._check_types(te)
00108
00109 def deserialize_numpy(self, str, numpy):
00110 """
00111 unpack serialized message in str into this message instance using numpy for array types
00112 @param str: byte array of serialized message
00113 @type str: str
00114 @param numpy: numpy python module
00115 @type numpy: module
00116 """
00117 try:
00118 end = 0
00119 _x = self
00120 start = end
00121 end += 8
00122 (_x.phase, _x.rotate_ind,) = _struct_2i.unpack(str[start:end])
00123 return self
00124 except struct.error as e:
00125 raise roslib.message.DeserializationError(e)
00126
00127 _struct_I = roslib.message.struct_I
00128 _struct_2i = struct.Struct("<2i")