00001 """autogenerated by genpy from table_pose/GetPoseRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import std_msgs.msg
00008 import sensor_msgs.msg
00009
00010 class GetPoseRequest(genpy.Message):
00011 _md5sum = "d5d036aeaa020e7f5e0ddd6aeae0e7d8"
00012 _type = "table_pose/GetPoseRequest"
00013 _has_header = False
00014 _full_text = """sensor_msgs/PointCloud2 data
00015
00016 ================================================================================
00017 MSG: sensor_msgs/PointCloud2
00018 # This message holds a collection of N-dimensional points, which may
00019 # contain additional information such as normals, intensity, etc. The
00020 # point data is stored as a binary blob, its layout described by the
00021 # contents of the "fields" array.
00022
00023 # The point cloud data may be organized 2d (image-like) or 1d
00024 # (unordered). Point clouds organized as 2d images may be produced by
00025 # camera depth sensors such as stereo or time-of-flight.
00026
00027 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00028 # points).
00029 Header header
00030
00031 # 2D structure of the point cloud. If the cloud is unordered, height is
00032 # 1 and width is the length of the point cloud.
00033 uint32 height
00034 uint32 width
00035
00036 # Describes the channels and their layout in the binary data blob.
00037 PointField[] fields
00038
00039 bool is_bigendian # Is this data bigendian?
00040 uint32 point_step # Length of a point in bytes
00041 uint32 row_step # Length of a row in bytes
00042 uint8[] data # Actual point data, size is (row_step*height)
00043
00044 bool is_dense # True if there are no invalid points
00045
00046 ================================================================================
00047 MSG: std_msgs/Header
00048 # Standard metadata for higher-level stamped data types.
00049 # This is generally used to communicate timestamped data
00050 # in a particular coordinate frame.
00051 #
00052 # sequence ID: consecutively increasing ID
00053 uint32 seq
00054 #Two-integer timestamp that is expressed as:
00055 # * stamp.secs: seconds (stamp_secs) since epoch
00056 # * stamp.nsecs: nanoseconds since stamp_secs
00057 # time-handling sugar is provided by the client library
00058 time stamp
00059 #Frame this data is associated with
00060 # 0: no frame
00061 # 1: global frame
00062 string frame_id
00063
00064 ================================================================================
00065 MSG: sensor_msgs/PointField
00066 # This message holds the description of one point entry in the
00067 # PointCloud2 message format.
00068 uint8 INT8 = 1
00069 uint8 UINT8 = 2
00070 uint8 INT16 = 3
00071 uint8 UINT16 = 4
00072 uint8 INT32 = 5
00073 uint8 UINT32 = 6
00074 uint8 FLOAT32 = 7
00075 uint8 FLOAT64 = 8
00076
00077 string name # Name of field
00078 uint32 offset # Offset from start of point struct
00079 uint8 datatype # Datatype enumeration, see above
00080 uint32 count # How many elements in the field
00081
00082 """
00083 __slots__ = ['data']
00084 _slot_types = ['sensor_msgs/PointCloud2']
00085
00086 def __init__(self, *args, **kwds):
00087 """
00088 Constructor. Any message fields that are implicitly/explicitly
00089 set to None will be assigned a default value. The recommend
00090 use is keyword arguments as this is more robust to future message
00091 changes. You cannot mix in-order arguments and keyword arguments.
00092
00093 The available fields are:
00094 data
00095
00096 :param args: complete set of field values, in .msg order
00097 :param kwds: use keyword arguments corresponding to message field names
00098 to set specific fields.
00099 """
00100 if args or kwds:
00101 super(GetPoseRequest, self).__init__(*args, **kwds)
00102
00103 if self.data is None:
00104 self.data = sensor_msgs.msg.PointCloud2()
00105 else:
00106 self.data = sensor_msgs.msg.PointCloud2()
00107
00108 def _get_types(self):
00109 """
00110 internal API method
00111 """
00112 return self._slot_types
00113
00114 def serialize(self, buff):
00115 """
00116 serialize message into buffer
00117 :param buff: buffer, ``StringIO``
00118 """
00119 try:
00120 _x = self
00121 buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
00122 _x = self.data.header.frame_id
00123 length = len(_x)
00124 if python3 or type(_x) == unicode:
00125 _x = _x.encode('utf-8')
00126 length = len(_x)
00127 buff.write(struct.pack('<I%ss'%length, length, _x))
00128 _x = self
00129 buff.write(_struct_2I.pack(_x.data.height, _x.data.width))
00130 length = len(self.data.fields)
00131 buff.write(_struct_I.pack(length))
00132 for val1 in self.data.fields:
00133 _x = val1.name
00134 length = len(_x)
00135 if python3 or type(_x) == unicode:
00136 _x = _x.encode('utf-8')
00137 length = len(_x)
00138 buff.write(struct.pack('<I%ss'%length, length, _x))
00139 _x = val1
00140 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00141 _x = self
00142 buff.write(_struct_B2I.pack(_x.data.is_bigendian, _x.data.point_step, _x.data.row_step))
00143 _x = self.data.data
00144 length = len(_x)
00145
00146 if type(_x) in [list, tuple]:
00147 buff.write(struct.pack('<I%sB'%length, length, *_x))
00148 else:
00149 buff.write(struct.pack('<I%ss'%length, length, _x))
00150 buff.write(_struct_B.pack(self.data.is_dense))
00151 except struct.error as se: self._check_types(se)
00152 except TypeError as te: self._check_types(te)
00153
00154 def deserialize(self, str):
00155 """
00156 unpack serialized message in str into this message instance
00157 :param str: byte array of serialized message, ``str``
00158 """
00159 try:
00160 if self.data is None:
00161 self.data = sensor_msgs.msg.PointCloud2()
00162 end = 0
00163 _x = self
00164 start = end
00165 end += 12
00166 (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00167 start = end
00168 end += 4
00169 (length,) = _struct_I.unpack(str[start:end])
00170 start = end
00171 end += length
00172 if python3:
00173 self.data.header.frame_id = str[start:end].decode('utf-8')
00174 else:
00175 self.data.header.frame_id = str[start:end]
00176 _x = self
00177 start = end
00178 end += 8
00179 (_x.data.height, _x.data.width,) = _struct_2I.unpack(str[start:end])
00180 start = end
00181 end += 4
00182 (length,) = _struct_I.unpack(str[start:end])
00183 self.data.fields = []
00184 for i in range(0, length):
00185 val1 = sensor_msgs.msg.PointField()
00186 start = end
00187 end += 4
00188 (length,) = _struct_I.unpack(str[start:end])
00189 start = end
00190 end += length
00191 if python3:
00192 val1.name = str[start:end].decode('utf-8')
00193 else:
00194 val1.name = str[start:end]
00195 _x = val1
00196 start = end
00197 end += 9
00198 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00199 self.data.fields.append(val1)
00200 _x = self
00201 start = end
00202 end += 9
00203 (_x.data.is_bigendian, _x.data.point_step, _x.data.row_step,) = _struct_B2I.unpack(str[start:end])
00204 self.data.is_bigendian = bool(self.data.is_bigendian)
00205 start = end
00206 end += 4
00207 (length,) = _struct_I.unpack(str[start:end])
00208 start = end
00209 end += length
00210 if python3:
00211 self.data.data = str[start:end].decode('utf-8')
00212 else:
00213 self.data.data = str[start:end]
00214 start = end
00215 end += 1
00216 (self.data.is_dense,) = _struct_B.unpack(str[start:end])
00217 self.data.is_dense = bool(self.data.is_dense)
00218 return self
00219 except struct.error as e:
00220 raise genpy.DeserializationError(e)
00221
00222
00223 def serialize_numpy(self, buff, numpy):
00224 """
00225 serialize message with numpy array types into buffer
00226 :param buff: buffer, ``StringIO``
00227 :param numpy: numpy python module
00228 """
00229 try:
00230 _x = self
00231 buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
00232 _x = self.data.header.frame_id
00233 length = len(_x)
00234 if python3 or type(_x) == unicode:
00235 _x = _x.encode('utf-8')
00236 length = len(_x)
00237 buff.write(struct.pack('<I%ss'%length, length, _x))
00238 _x = self
00239 buff.write(_struct_2I.pack(_x.data.height, _x.data.width))
00240 length = len(self.data.fields)
00241 buff.write(_struct_I.pack(length))
00242 for val1 in self.data.fields:
00243 _x = val1.name
00244 length = len(_x)
00245 if python3 or type(_x) == unicode:
00246 _x = _x.encode('utf-8')
00247 length = len(_x)
00248 buff.write(struct.pack('<I%ss'%length, length, _x))
00249 _x = val1
00250 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00251 _x = self
00252 buff.write(_struct_B2I.pack(_x.data.is_bigendian, _x.data.point_step, _x.data.row_step))
00253 _x = self.data.data
00254 length = len(_x)
00255
00256 if type(_x) in [list, tuple]:
00257 buff.write(struct.pack('<I%sB'%length, length, *_x))
00258 else:
00259 buff.write(struct.pack('<I%ss'%length, length, _x))
00260 buff.write(_struct_B.pack(self.data.is_dense))
00261 except struct.error as se: self._check_types(se)
00262 except TypeError as te: self._check_types(te)
00263
00264 def deserialize_numpy(self, str, numpy):
00265 """
00266 unpack serialized message in str into this message instance using numpy for array types
00267 :param str: byte array of serialized message, ``str``
00268 :param numpy: numpy python module
00269 """
00270 try:
00271 if self.data is None:
00272 self.data = sensor_msgs.msg.PointCloud2()
00273 end = 0
00274 _x = self
00275 start = end
00276 end += 12
00277 (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00278 start = end
00279 end += 4
00280 (length,) = _struct_I.unpack(str[start:end])
00281 start = end
00282 end += length
00283 if python3:
00284 self.data.header.frame_id = str[start:end].decode('utf-8')
00285 else:
00286 self.data.header.frame_id = str[start:end]
00287 _x = self
00288 start = end
00289 end += 8
00290 (_x.data.height, _x.data.width,) = _struct_2I.unpack(str[start:end])
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 self.data.fields = []
00295 for i in range(0, length):
00296 val1 = sensor_msgs.msg.PointField()
00297 start = end
00298 end += 4
00299 (length,) = _struct_I.unpack(str[start:end])
00300 start = end
00301 end += length
00302 if python3:
00303 val1.name = str[start:end].decode('utf-8')
00304 else:
00305 val1.name = str[start:end]
00306 _x = val1
00307 start = end
00308 end += 9
00309 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00310 self.data.fields.append(val1)
00311 _x = self
00312 start = end
00313 end += 9
00314 (_x.data.is_bigendian, _x.data.point_step, _x.data.row_step,) = _struct_B2I.unpack(str[start:end])
00315 self.data.is_bigendian = bool(self.data.is_bigendian)
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 if python3:
00322 self.data.data = str[start:end].decode('utf-8')
00323 else:
00324 self.data.data = str[start:end]
00325 start = end
00326 end += 1
00327 (self.data.is_dense,) = _struct_B.unpack(str[start:end])
00328 self.data.is_dense = bool(self.data.is_dense)
00329 return self
00330 except struct.error as e:
00331 raise genpy.DeserializationError(e)
00332
00333 _struct_I = genpy.struct_I
00334 _struct_IBI = struct.Struct("<IBI")
00335 _struct_3I = struct.Struct("<3I")
00336 _struct_B = struct.Struct("<B")
00337 _struct_2I = struct.Struct("<2I")
00338 _struct_B2I = struct.Struct("<B2I")
00339 """autogenerated by genpy from table_pose/GetPoseResponse.msg. Do not edit."""
00340 import sys
00341 python3 = True if sys.hexversion > 0x03000000 else False
00342 import genpy
00343 import struct
00344
00345 import geometry_msgs.msg
00346 import std_msgs.msg
00347
00348 class GetPoseResponse(genpy.Message):
00349 _md5sum = "f78936c7b8a2846339c5342aea067b14"
00350 _type = "table_pose/GetPoseResponse"
00351 _has_header = False
00352 _full_text = """geometry_msgs/PoseStamped table_pose
00353
00354
00355
00356 ================================================================================
00357 MSG: geometry_msgs/PoseStamped
00358 # A Pose with reference coordinate frame and timestamp
00359 Header header
00360 Pose pose
00361
00362 ================================================================================
00363 MSG: std_msgs/Header
00364 # Standard metadata for higher-level stamped data types.
00365 # This is generally used to communicate timestamped data
00366 # in a particular coordinate frame.
00367 #
00368 # sequence ID: consecutively increasing ID
00369 uint32 seq
00370 #Two-integer timestamp that is expressed as:
00371 # * stamp.secs: seconds (stamp_secs) since epoch
00372 # * stamp.nsecs: nanoseconds since stamp_secs
00373 # time-handling sugar is provided by the client library
00374 time stamp
00375 #Frame this data is associated with
00376 # 0: no frame
00377 # 1: global frame
00378 string frame_id
00379
00380 ================================================================================
00381 MSG: geometry_msgs/Pose
00382 # A representation of pose in free space, composed of postion and orientation.
00383 Point position
00384 Quaternion orientation
00385
00386 ================================================================================
00387 MSG: geometry_msgs/Point
00388 # This contains the position of a point in free space
00389 float64 x
00390 float64 y
00391 float64 z
00392
00393 ================================================================================
00394 MSG: geometry_msgs/Quaternion
00395 # This represents an orientation in free space in quaternion form.
00396
00397 float64 x
00398 float64 y
00399 float64 z
00400 float64 w
00401
00402 """
00403 __slots__ = ['table_pose']
00404 _slot_types = ['geometry_msgs/PoseStamped']
00405
00406 def __init__(self, *args, **kwds):
00407 """
00408 Constructor. Any message fields that are implicitly/explicitly
00409 set to None will be assigned a default value. The recommend
00410 use is keyword arguments as this is more robust to future message
00411 changes. You cannot mix in-order arguments and keyword arguments.
00412
00413 The available fields are:
00414 table_pose
00415
00416 :param args: complete set of field values, in .msg order
00417 :param kwds: use keyword arguments corresponding to message field names
00418 to set specific fields.
00419 """
00420 if args or kwds:
00421 super(GetPoseResponse, self).__init__(*args, **kwds)
00422
00423 if self.table_pose is None:
00424 self.table_pose = geometry_msgs.msg.PoseStamped()
00425 else:
00426 self.table_pose = geometry_msgs.msg.PoseStamped()
00427
00428 def _get_types(self):
00429 """
00430 internal API method
00431 """
00432 return self._slot_types
00433
00434 def serialize(self, buff):
00435 """
00436 serialize message into buffer
00437 :param buff: buffer, ``StringIO``
00438 """
00439 try:
00440 _x = self
00441 buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs))
00442 _x = self.table_pose.header.frame_id
00443 length = len(_x)
00444 if python3 or type(_x) == unicode:
00445 _x = _x.encode('utf-8')
00446 length = len(_x)
00447 buff.write(struct.pack('<I%ss'%length, length, _x))
00448 _x = self
00449 buff.write(_struct_7d.pack(_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w))
00450 except struct.error as se: self._check_types(se)
00451 except TypeError as te: self._check_types(te)
00452
00453 def deserialize(self, str):
00454 """
00455 unpack serialized message in str into this message instance
00456 :param str: byte array of serialized message, ``str``
00457 """
00458 try:
00459 if self.table_pose is None:
00460 self.table_pose = geometry_msgs.msg.PoseStamped()
00461 end = 0
00462 _x = self
00463 start = end
00464 end += 12
00465 (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00466 start = end
00467 end += 4
00468 (length,) = _struct_I.unpack(str[start:end])
00469 start = end
00470 end += length
00471 if python3:
00472 self.table_pose.header.frame_id = str[start:end].decode('utf-8')
00473 else:
00474 self.table_pose.header.frame_id = str[start:end]
00475 _x = self
00476 start = end
00477 end += 56
00478 (_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00479 return self
00480 except struct.error as e:
00481 raise genpy.DeserializationError(e)
00482
00483
00484 def serialize_numpy(self, buff, numpy):
00485 """
00486 serialize message with numpy array types into buffer
00487 :param buff: buffer, ``StringIO``
00488 :param numpy: numpy python module
00489 """
00490 try:
00491 _x = self
00492 buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs))
00493 _x = self.table_pose.header.frame_id
00494 length = len(_x)
00495 if python3 or type(_x) == unicode:
00496 _x = _x.encode('utf-8')
00497 length = len(_x)
00498 buff.write(struct.pack('<I%ss'%length, length, _x))
00499 _x = self
00500 buff.write(_struct_7d.pack(_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w))
00501 except struct.error as se: self._check_types(se)
00502 except TypeError as te: self._check_types(te)
00503
00504 def deserialize_numpy(self, str, numpy):
00505 """
00506 unpack serialized message in str into this message instance using numpy for array types
00507 :param str: byte array of serialized message, ``str``
00508 :param numpy: numpy python module
00509 """
00510 try:
00511 if self.table_pose is None:
00512 self.table_pose = geometry_msgs.msg.PoseStamped()
00513 end = 0
00514 _x = self
00515 start = end
00516 end += 12
00517 (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00518 start = end
00519 end += 4
00520 (length,) = _struct_I.unpack(str[start:end])
00521 start = end
00522 end += length
00523 if python3:
00524 self.table_pose.header.frame_id = str[start:end].decode('utf-8')
00525 else:
00526 self.table_pose.header.frame_id = str[start:end]
00527 _x = self
00528 start = end
00529 end += 56
00530 (_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00531 return self
00532 except struct.error as e:
00533 raise genpy.DeserializationError(e)
00534
00535 _struct_I = genpy.struct_I
00536 _struct_3I = struct.Struct("<3I")
00537 _struct_7d = struct.Struct("<7d")
00538 class GetPose(object):
00539 _type = 'table_pose/GetPose'
00540 _md5sum = '81e9d3aaa4af67d8dbbdf94ddcea579a'
00541 _request_class = GetPoseRequest
00542 _response_class = GetPoseResponse