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