00001 """autogenerated by genpy from pr2_pick_and_place_service/DetectTableRequest.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 DetectTableRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "pr2_pick_and_place_service/DetectTableRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014 """
00015 __slots__ = []
00016 _slot_types = []
00017
00018 def __init__(self, *args, **kwds):
00019 """
00020 Constructor. Any message fields that are implicitly/explicitly
00021 set to None will be assigned a default value. The recommend
00022 use is keyword arguments as this is more robust to future message
00023 changes. You cannot mix in-order arguments and keyword arguments.
00024
00025 The available fields are:
00026
00027
00028 :param args: complete set of field values, in .msg order
00029 :param kwds: use keyword arguments corresponding to message field names
00030 to set specific fields.
00031 """
00032 if args or kwds:
00033 super(DetectTableRequest, self).__init__(*args, **kwds)
00034
00035 def _get_types(self):
00036 """
00037 internal API method
00038 """
00039 return self._slot_types
00040
00041 def serialize(self, buff):
00042 """
00043 serialize message into buffer
00044 :param buff: buffer, ``StringIO``
00045 """
00046 try:
00047 pass
00048 except struct.error as se: self._check_types(se)
00049 except TypeError as te: self._check_types(te)
00050
00051 def deserialize(self, str):
00052 """
00053 unpack serialized message in str into this message instance
00054 :param str: byte array of serialized message, ``str``
00055 """
00056 try:
00057 end = 0
00058 return self
00059 except struct.error as e:
00060 raise genpy.DeserializationError(e)
00061
00062
00063 def serialize_numpy(self, buff, numpy):
00064 """
00065 serialize message with numpy array types into buffer
00066 :param buff: buffer, ``StringIO``
00067 :param numpy: numpy python module
00068 """
00069 try:
00070 pass
00071 except struct.error as se: self._check_types(se)
00072 except TypeError as te: self._check_types(te)
00073
00074 def deserialize_numpy(self, str, numpy):
00075 """
00076 unpack serialized message in str into this message instance using numpy for array types
00077 :param str: byte array of serialized message, ``str``
00078 :param numpy: numpy python module
00079 """
00080 try:
00081 end = 0
00082 return self
00083 except struct.error as e:
00084 raise genpy.DeserializationError(e)
00085
00086 _struct_I = genpy.struct_I
00087 """autogenerated by genpy from pr2_pick_and_place_service/DetectTableResponse.msg. Do not edit."""
00088 import sys
00089 python3 = True if sys.hexversion > 0x03000000 else False
00090 import genpy
00091 import struct
00092
00093
00094 class DetectTableResponse(genpy.Message):
00095 _md5sum = "c996c717660df0fe7c59c4ce9803862c"
00096 _type = "pr2_pick_and_place_service/DetectTableResponse"
00097 _has_header = False
00098 _full_text = """int32 table_height
00099 int32 table_front_edge
00100 int32[] place_rectangle_dims
00101
00102
00103 """
00104 __slots__ = ['table_height','table_front_edge','place_rectangle_dims']
00105 _slot_types = ['int32','int32','int32[]']
00106
00107 def __init__(self, *args, **kwds):
00108 """
00109 Constructor. Any message fields that are implicitly/explicitly
00110 set to None will be assigned a default value. The recommend
00111 use is keyword arguments as this is more robust to future message
00112 changes. You cannot mix in-order arguments and keyword arguments.
00113
00114 The available fields are:
00115 table_height,table_front_edge,place_rectangle_dims
00116
00117 :param args: complete set of field values, in .msg order
00118 :param kwds: use keyword arguments corresponding to message field names
00119 to set specific fields.
00120 """
00121 if args or kwds:
00122 super(DetectTableResponse, self).__init__(*args, **kwds)
00123
00124 if self.table_height is None:
00125 self.table_height = 0
00126 if self.table_front_edge is None:
00127 self.table_front_edge = 0
00128 if self.place_rectangle_dims is None:
00129 self.place_rectangle_dims = []
00130 else:
00131 self.table_height = 0
00132 self.table_front_edge = 0
00133 self.place_rectangle_dims = []
00134
00135 def _get_types(self):
00136 """
00137 internal API method
00138 """
00139 return self._slot_types
00140
00141 def serialize(self, buff):
00142 """
00143 serialize message into buffer
00144 :param buff: buffer, ``StringIO``
00145 """
00146 try:
00147 _x = self
00148 buff.write(_struct_2i.pack(_x.table_height, _x.table_front_edge))
00149 length = len(self.place_rectangle_dims)
00150 buff.write(_struct_I.pack(length))
00151 pattern = '<%si'%length
00152 buff.write(struct.pack(pattern, *self.place_rectangle_dims))
00153 except struct.error as se: self._check_types(se)
00154 except TypeError as te: self._check_types(te)
00155
00156 def deserialize(self, str):
00157 """
00158 unpack serialized message in str into this message instance
00159 :param str: byte array of serialized message, ``str``
00160 """
00161 try:
00162 end = 0
00163 _x = self
00164 start = end
00165 end += 8
00166 (_x.table_height, _x.table_front_edge,) = _struct_2i.unpack(str[start:end])
00167 start = end
00168 end += 4
00169 (length,) = _struct_I.unpack(str[start:end])
00170 pattern = '<%si'%length
00171 start = end
00172 end += struct.calcsize(pattern)
00173 self.place_rectangle_dims = struct.unpack(pattern, str[start:end])
00174 return self
00175 except struct.error as e:
00176 raise genpy.DeserializationError(e)
00177
00178
00179 def serialize_numpy(self, buff, numpy):
00180 """
00181 serialize message with numpy array types into buffer
00182 :param buff: buffer, ``StringIO``
00183 :param numpy: numpy python module
00184 """
00185 try:
00186 _x = self
00187 buff.write(_struct_2i.pack(_x.table_height, _x.table_front_edge))
00188 length = len(self.place_rectangle_dims)
00189 buff.write(_struct_I.pack(length))
00190 pattern = '<%si'%length
00191 buff.write(self.place_rectangle_dims.tostring())
00192 except struct.error as se: self._check_types(se)
00193 except TypeError as te: self._check_types(te)
00194
00195 def deserialize_numpy(self, str, numpy):
00196 """
00197 unpack serialized message in str into this message instance using numpy for array types
00198 :param str: byte array of serialized message, ``str``
00199 :param numpy: numpy python module
00200 """
00201 try:
00202 end = 0
00203 _x = self
00204 start = end
00205 end += 8
00206 (_x.table_height, _x.table_front_edge,) = _struct_2i.unpack(str[start:end])
00207 start = end
00208 end += 4
00209 (length,) = _struct_I.unpack(str[start:end])
00210 pattern = '<%si'%length
00211 start = end
00212 end += struct.calcsize(pattern)
00213 self.place_rectangle_dims = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00214 return self
00215 except struct.error as e:
00216 raise genpy.DeserializationError(e)
00217
00218 _struct_I = genpy.struct_I
00219 _struct_2i = struct.Struct("<2i")
00220 class DetectTable(object):
00221 _type = 'pr2_pick_and_place_service/DetectTable'
00222 _md5sum = 'c996c717660df0fe7c59c4ce9803862c'
00223 _request_class = DetectTableRequest
00224 _response_class = DetectTableResponse