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