Go to the documentation of this file.00001 """autogenerated by genpy from pr2_interactive_object_detection/UserCommandGoal.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 UserCommandGoal(genpy.Message):
00009 _md5sum = "c4a081a4406d3a53c6fc74271793a116"
00010 _type = "pr2_interactive_object_detection/UserCommandGoal"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 #request constants
00014 int8 LOOK_AT_TABLE=0
00015
00016 int8 SEGMENT=1
00017 int8 RECOGNIZE=2
00018 int8 DETECT=3
00019 int8 RESET=4
00020
00021 int8 request
00022 bool interactive
00023
00024 """
00025
00026 LOOK_AT_TABLE = 0
00027 SEGMENT = 1
00028 RECOGNIZE = 2
00029 DETECT = 3
00030 RESET = 4
00031
00032 __slots__ = ['request','interactive']
00033 _slot_types = ['int8','bool']
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 request,interactive
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(UserCommandGoal, self).__init__(*args, **kwds)
00051
00052 if self.request is None:
00053 self.request = 0
00054 if self.interactive is None:
00055 self.interactive = False
00056 else:
00057 self.request = 0
00058 self.interactive = False
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, ``StringIO``
00070 """
00071 try:
00072 _x = self
00073 buff.write(_struct_bB.pack(_x.request, _x.interactive))
00074 except struct.error as se: self._check_types(se)
00075 except TypeError as te: self._check_types(te)
00076
00077 def deserialize(self, str):
00078 """
00079 unpack serialized message in str into this message instance
00080 :param str: byte array of serialized message, ``str``
00081 """
00082 try:
00083 end = 0
00084 _x = self
00085 start = end
00086 end += 2
00087 (_x.request, _x.interactive,) = _struct_bB.unpack(str[start:end])
00088 self.interactive = bool(self.interactive)
00089 return self
00090 except struct.error as e:
00091 raise genpy.DeserializationError(e)
00092
00093
00094 def serialize_numpy(self, buff, numpy):
00095 """
00096 serialize message with numpy array types into buffer
00097 :param buff: buffer, ``StringIO``
00098 :param numpy: numpy python module
00099 """
00100 try:
00101 _x = self
00102 buff.write(_struct_bB.pack(_x.request, _x.interactive))
00103 except struct.error as se: self._check_types(se)
00104 except TypeError as 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, ``str``
00110 :param numpy: numpy python module
00111 """
00112 try:
00113 end = 0
00114 _x = self
00115 start = end
00116 end += 2
00117 (_x.request, _x.interactive,) = _struct_bB.unpack(str[start:end])
00118 self.interactive = bool(self.interactive)
00119 return self
00120 except struct.error as e:
00121 raise genpy.DeserializationError(e)
00122
00123 _struct_I = genpy.struct_I
00124 _struct_bB = struct.Struct("<bB")