00001 """autogenerated by genpy from hrl_object_fetching/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 = "hrl_object_fetching/DetectTableRequest"
00011 _has_header = False
00012 _full_text = """
00013 """
00014 __slots__ = []
00015 _slot_types = []
00016
00017 def __init__(self, *args, **kwds):
00018 """
00019 Constructor. Any message fields that are implicitly/explicitly
00020 set to None will be assigned a default value. The recommend
00021 use is keyword arguments as this is more robust to future message
00022 changes. You cannot mix in-order arguments and keyword arguments.
00023
00024 The available fields are:
00025
00026
00027 :param args: complete set of field values, in .msg order
00028 :param kwds: use keyword arguments corresponding to message field names
00029 to set specific fields.
00030 """
00031 if args or kwds:
00032 super(DetectTableRequest, self).__init__(*args, **kwds)
00033
00034 def _get_types(self):
00035 """
00036 internal API method
00037 """
00038 return self._slot_types
00039
00040 def serialize(self, buff):
00041 """
00042 serialize message into buffer
00043 :param buff: buffer, ``StringIO``
00044 """
00045 try:
00046 pass
00047 except struct.error as se: self._check_types(se)
00048 except TypeError as 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, ``str``
00054 """
00055 try:
00056 end = 0
00057 return self
00058 except struct.error as e:
00059 raise genpy.DeserializationError(e)
00060
00061
00062 def serialize_numpy(self, buff, numpy):
00063 """
00064 serialize message with numpy array types into buffer
00065 :param buff: buffer, ``StringIO``
00066 :param numpy: numpy python module
00067 """
00068 try:
00069 pass
00070 except struct.error as se: self._check_types(se)
00071 except TypeError as te: self._check_types(te)
00072
00073 def deserialize_numpy(self, str, numpy):
00074 """
00075 unpack serialized message in str into this message instance using numpy for array types
00076 :param str: byte array of serialized message, ``str``
00077 :param numpy: numpy python module
00078 """
00079 try:
00080 end = 0
00081 return self
00082 except struct.error as e:
00083 raise genpy.DeserializationError(e)
00084
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from hrl_object_fetching/DetectTableResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091
00092 import geometry_msgs.msg
00093 import std_msgs.msg
00094
00095 class DetectTableResponse(genpy.Message):
00096 _md5sum = "b3784c7803c355e4af5442a09c3b4db7"
00097 _type = "hrl_object_fetching/DetectTableResponse"
00098 _has_header = False
00099 _full_text = """geometry_msgs/PoseArray grasp_points
00100
00101
00102 ================================================================================
00103 MSG: geometry_msgs/PoseArray
00104 # An array of poses with a header for global reference.
00105
00106 Header header
00107
00108 Pose[] poses
00109
00110 ================================================================================
00111 MSG: std_msgs/Header
00112 # Standard metadata for higher-level stamped data types.
00113 # This is generally used to communicate timestamped data
00114 # in a particular coordinate frame.
00115 #
00116 # sequence ID: consecutively increasing ID
00117 uint32 seq
00118 #Two-integer timestamp that is expressed as:
00119 # * stamp.secs: seconds (stamp_secs) since epoch
00120 # * stamp.nsecs: nanoseconds since stamp_secs
00121 # time-handling sugar is provided by the client library
00122 time stamp
00123 #Frame this data is associated with
00124 # 0: no frame
00125 # 1: global frame
00126 string frame_id
00127
00128 ================================================================================
00129 MSG: geometry_msgs/Pose
00130 # A representation of pose in free space, composed of postion and orientation.
00131 Point position
00132 Quaternion orientation
00133
00134 ================================================================================
00135 MSG: geometry_msgs/Point
00136 # This contains the position of a point in free space
00137 float64 x
00138 float64 y
00139 float64 z
00140
00141 ================================================================================
00142 MSG: geometry_msgs/Quaternion
00143 # This represents an orientation in free space in quaternion form.
00144
00145 float64 x
00146 float64 y
00147 float64 z
00148 float64 w
00149
00150 """
00151 __slots__ = ['grasp_points']
00152 _slot_types = ['geometry_msgs/PoseArray']
00153
00154 def __init__(self, *args, **kwds):
00155 """
00156 Constructor. Any message fields that are implicitly/explicitly
00157 set to None will be assigned a default value. The recommend
00158 use is keyword arguments as this is more robust to future message
00159 changes. You cannot mix in-order arguments and keyword arguments.
00160
00161 The available fields are:
00162 grasp_points
00163
00164 :param args: complete set of field values, in .msg order
00165 :param kwds: use keyword arguments corresponding to message field names
00166 to set specific fields.
00167 """
00168 if args or kwds:
00169 super(DetectTableResponse, self).__init__(*args, **kwds)
00170
00171 if self.grasp_points is None:
00172 self.grasp_points = geometry_msgs.msg.PoseArray()
00173 else:
00174 self.grasp_points = geometry_msgs.msg.PoseArray()
00175
00176 def _get_types(self):
00177 """
00178 internal API method
00179 """
00180 return self._slot_types
00181
00182 def serialize(self, buff):
00183 """
00184 serialize message into buffer
00185 :param buff: buffer, ``StringIO``
00186 """
00187 try:
00188 _x = self
00189 buff.write(_struct_3I.pack(_x.grasp_points.header.seq, _x.grasp_points.header.stamp.secs, _x.grasp_points.header.stamp.nsecs))
00190 _x = self.grasp_points.header.frame_id
00191 length = len(_x)
00192 if python3 or type(_x) == unicode:
00193 _x = _x.encode('utf-8')
00194 length = len(_x)
00195 buff.write(struct.pack('<I%ss'%length, length, _x))
00196 length = len(self.grasp_points.poses)
00197 buff.write(_struct_I.pack(length))
00198 for val1 in self.grasp_points.poses:
00199 _v1 = val1.position
00200 _x = _v1
00201 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00202 _v2 = val1.orientation
00203 _x = _v2
00204 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00205 except struct.error as se: self._check_types(se)
00206 except TypeError as te: self._check_types(te)
00207
00208 def deserialize(self, str):
00209 """
00210 unpack serialized message in str into this message instance
00211 :param str: byte array of serialized message, ``str``
00212 """
00213 try:
00214 if self.grasp_points is None:
00215 self.grasp_points = geometry_msgs.msg.PoseArray()
00216 end = 0
00217 _x = self
00218 start = end
00219 end += 12
00220 (_x.grasp_points.header.seq, _x.grasp_points.header.stamp.secs, _x.grasp_points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00221 start = end
00222 end += 4
00223 (length,) = _struct_I.unpack(str[start:end])
00224 start = end
00225 end += length
00226 if python3:
00227 self.grasp_points.header.frame_id = str[start:end].decode('utf-8')
00228 else:
00229 self.grasp_points.header.frame_id = str[start:end]
00230 start = end
00231 end += 4
00232 (length,) = _struct_I.unpack(str[start:end])
00233 self.grasp_points.poses = []
00234 for i in range(0, length):
00235 val1 = geometry_msgs.msg.Pose()
00236 _v3 = val1.position
00237 _x = _v3
00238 start = end
00239 end += 24
00240 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00241 _v4 = val1.orientation
00242 _x = _v4
00243 start = end
00244 end += 32
00245 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00246 self.grasp_points.poses.append(val1)
00247 return self
00248 except struct.error as e:
00249 raise genpy.DeserializationError(e)
00250
00251
00252 def serialize_numpy(self, buff, numpy):
00253 """
00254 serialize message with numpy array types into buffer
00255 :param buff: buffer, ``StringIO``
00256 :param numpy: numpy python module
00257 """
00258 try:
00259 _x = self
00260 buff.write(_struct_3I.pack(_x.grasp_points.header.seq, _x.grasp_points.header.stamp.secs, _x.grasp_points.header.stamp.nsecs))
00261 _x = self.grasp_points.header.frame_id
00262 length = len(_x)
00263 if python3 or type(_x) == unicode:
00264 _x = _x.encode('utf-8')
00265 length = len(_x)
00266 buff.write(struct.pack('<I%ss'%length, length, _x))
00267 length = len(self.grasp_points.poses)
00268 buff.write(_struct_I.pack(length))
00269 for val1 in self.grasp_points.poses:
00270 _v5 = val1.position
00271 _x = _v5
00272 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00273 _v6 = val1.orientation
00274 _x = _v6
00275 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00276 except struct.error as se: self._check_types(se)
00277 except TypeError as te: self._check_types(te)
00278
00279 def deserialize_numpy(self, str, numpy):
00280 """
00281 unpack serialized message in str into this message instance using numpy for array types
00282 :param str: byte array of serialized message, ``str``
00283 :param numpy: numpy python module
00284 """
00285 try:
00286 if self.grasp_points is None:
00287 self.grasp_points = geometry_msgs.msg.PoseArray()
00288 end = 0
00289 _x = self
00290 start = end
00291 end += 12
00292 (_x.grasp_points.header.seq, _x.grasp_points.header.stamp.secs, _x.grasp_points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 if python3:
00299 self.grasp_points.header.frame_id = str[start:end].decode('utf-8')
00300 else:
00301 self.grasp_points.header.frame_id = str[start:end]
00302 start = end
00303 end += 4
00304 (length,) = _struct_I.unpack(str[start:end])
00305 self.grasp_points.poses = []
00306 for i in range(0, length):
00307 val1 = geometry_msgs.msg.Pose()
00308 _v7 = val1.position
00309 _x = _v7
00310 start = end
00311 end += 24
00312 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00313 _v8 = val1.orientation
00314 _x = _v8
00315 start = end
00316 end += 32
00317 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00318 self.grasp_points.poses.append(val1)
00319 return self
00320 except struct.error as e:
00321 raise genpy.DeserializationError(e)
00322
00323 _struct_I = genpy.struct_I
00324 _struct_3I = struct.Struct("<3I")
00325 _struct_4d = struct.Struct("<4d")
00326 _struct_3d = struct.Struct("<3d")
00327 class DetectTable(object):
00328 _type = 'hrl_object_fetching/DetectTable'
00329 _md5sum = 'b3784c7803c355e4af5442a09c3b4db7'
00330 _request_class = DetectTableRequest
00331 _response_class = DetectTableResponse