_GetPose.py
Go to the documentation of this file.
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 #flag to mark the presence of a Header object
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       #message fields cannot be None, assign default values for those that are
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       # - if encoded as a list instead, serialize as bytes instead of string
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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00152     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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       self.data.data = str[start:end]
00211       start = end
00212       end += 1
00213       (self.data.is_dense,) = _struct_B.unpack(str[start:end])
00214       self.data.is_dense = bool(self.data.is_dense)
00215       return self
00216     except struct.error as e:
00217       raise genpy.DeserializationError(e) #most likely buffer underfill
00218 
00219 
00220   def serialize_numpy(self, buff, numpy):
00221     """
00222     serialize message with numpy array types into buffer
00223     :param buff: buffer, ``StringIO``
00224     :param numpy: numpy python module
00225     """
00226     try:
00227       _x = self
00228       buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs))
00229       _x = self.data.header.frame_id
00230       length = len(_x)
00231       if python3 or type(_x) == unicode:
00232         _x = _x.encode('utf-8')
00233         length = len(_x)
00234       buff.write(struct.pack('<I%ss'%length, length, _x))
00235       _x = self
00236       buff.write(_struct_2I.pack(_x.data.height, _x.data.width))
00237       length = len(self.data.fields)
00238       buff.write(_struct_I.pack(length))
00239       for val1 in self.data.fields:
00240         _x = val1.name
00241         length = len(_x)
00242         if python3 or type(_x) == unicode:
00243           _x = _x.encode('utf-8')
00244           length = len(_x)
00245         buff.write(struct.pack('<I%ss'%length, length, _x))
00246         _x = val1
00247         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00248       _x = self
00249       buff.write(_struct_B2I.pack(_x.data.is_bigendian, _x.data.point_step, _x.data.row_step))
00250       _x = self.data.data
00251       length = len(_x)
00252       # - if encoded as a list instead, serialize as bytes instead of string
00253       if type(_x) in [list, tuple]:
00254         buff.write(struct.pack('<I%sB'%length, length, *_x))
00255       else:
00256         buff.write(struct.pack('<I%ss'%length, length, _x))
00257       buff.write(_struct_B.pack(self.data.is_dense))
00258     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00259     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00260 
00261   def deserialize_numpy(self, str, numpy):
00262     """
00263     unpack serialized message in str into this message instance using numpy for array types
00264     :param str: byte array of serialized message, ``str``
00265     :param numpy: numpy python module
00266     """
00267     try:
00268       if self.data is None:
00269         self.data = sensor_msgs.msg.PointCloud2()
00270       end = 0
00271       _x = self
00272       start = end
00273       end += 12
00274       (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00275       start = end
00276       end += 4
00277       (length,) = _struct_I.unpack(str[start:end])
00278       start = end
00279       end += length
00280       if python3:
00281         self.data.header.frame_id = str[start:end].decode('utf-8')
00282       else:
00283         self.data.header.frame_id = str[start:end]
00284       _x = self
00285       start = end
00286       end += 8
00287       (_x.data.height, _x.data.width,) = _struct_2I.unpack(str[start:end])
00288       start = end
00289       end += 4
00290       (length,) = _struct_I.unpack(str[start:end])
00291       self.data.fields = []
00292       for i in range(0, length):
00293         val1 = sensor_msgs.msg.PointField()
00294         start = end
00295         end += 4
00296         (length,) = _struct_I.unpack(str[start:end])
00297         start = end
00298         end += length
00299         if python3:
00300           val1.name = str[start:end].decode('utf-8')
00301         else:
00302           val1.name = str[start:end]
00303         _x = val1
00304         start = end
00305         end += 9
00306         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00307         self.data.fields.append(val1)
00308       _x = self
00309       start = end
00310       end += 9
00311       (_x.data.is_bigendian, _x.data.point_step, _x.data.row_step,) = _struct_B2I.unpack(str[start:end])
00312       self.data.is_bigendian = bool(self.data.is_bigendian)
00313       start = end
00314       end += 4
00315       (length,) = _struct_I.unpack(str[start:end])
00316       start = end
00317       end += length
00318       self.data.data = str[start:end]
00319       start = end
00320       end += 1
00321       (self.data.is_dense,) = _struct_B.unpack(str[start:end])
00322       self.data.is_dense = bool(self.data.is_dense)
00323       return self
00324     except struct.error as e:
00325       raise genpy.DeserializationError(e) #most likely buffer underfill
00326 
00327 _struct_I = genpy.struct_I
00328 _struct_IBI = struct.Struct("<IBI")
00329 _struct_3I = struct.Struct("<3I")
00330 _struct_B = struct.Struct("<B")
00331 _struct_2I = struct.Struct("<2I")
00332 _struct_B2I = struct.Struct("<B2I")
00333 """autogenerated by genpy from table_pose/GetPoseResponse.msg. Do not edit."""
00334 import sys
00335 python3 = True if sys.hexversion > 0x03000000 else False
00336 import genpy
00337 import struct
00338 
00339 import geometry_msgs.msg
00340 import std_msgs.msg
00341 
00342 class GetPoseResponse(genpy.Message):
00343   _md5sum = "f78936c7b8a2846339c5342aea067b14"
00344   _type = "table_pose/GetPoseResponse"
00345   _has_header = False #flag to mark the presence of a Header object
00346   _full_text = """geometry_msgs/PoseStamped table_pose
00347 
00348 
00349 
00350 ================================================================================
00351 MSG: geometry_msgs/PoseStamped
00352 # A Pose with reference coordinate frame and timestamp
00353 Header header
00354 Pose pose
00355 
00356 ================================================================================
00357 MSG: std_msgs/Header
00358 # Standard metadata for higher-level stamped data types.
00359 # This is generally used to communicate timestamped data 
00360 # in a particular coordinate frame.
00361 # 
00362 # sequence ID: consecutively increasing ID 
00363 uint32 seq
00364 #Two-integer timestamp that is expressed as:
00365 # * stamp.secs: seconds (stamp_secs) since epoch
00366 # * stamp.nsecs: nanoseconds since stamp_secs
00367 # time-handling sugar is provided by the client library
00368 time stamp
00369 #Frame this data is associated with
00370 # 0: no frame
00371 # 1: global frame
00372 string frame_id
00373 
00374 ================================================================================
00375 MSG: geometry_msgs/Pose
00376 # A representation of pose in free space, composed of postion and orientation. 
00377 Point position
00378 Quaternion orientation
00379 
00380 ================================================================================
00381 MSG: geometry_msgs/Point
00382 # This contains the position of a point in free space
00383 float64 x
00384 float64 y
00385 float64 z
00386 
00387 ================================================================================
00388 MSG: geometry_msgs/Quaternion
00389 # This represents an orientation in free space in quaternion form.
00390 
00391 float64 x
00392 float64 y
00393 float64 z
00394 float64 w
00395 
00396 """
00397   __slots__ = ['table_pose']
00398   _slot_types = ['geometry_msgs/PoseStamped']
00399 
00400   def __init__(self, *args, **kwds):
00401     """
00402     Constructor. Any message fields that are implicitly/explicitly
00403     set to None will be assigned a default value. The recommend
00404     use is keyword arguments as this is more robust to future message
00405     changes.  You cannot mix in-order arguments and keyword arguments.
00406 
00407     The available fields are:
00408        table_pose
00409 
00410     :param args: complete set of field values, in .msg order
00411     :param kwds: use keyword arguments corresponding to message field names
00412     to set specific fields.
00413     """
00414     if args or kwds:
00415       super(GetPoseResponse, self).__init__(*args, **kwds)
00416       #message fields cannot be None, assign default values for those that are
00417       if self.table_pose is None:
00418         self.table_pose = geometry_msgs.msg.PoseStamped()
00419     else:
00420       self.table_pose = geometry_msgs.msg.PoseStamped()
00421 
00422   def _get_types(self):
00423     """
00424     internal API method
00425     """
00426     return self._slot_types
00427 
00428   def serialize(self, buff):
00429     """
00430     serialize message into buffer
00431     :param buff: buffer, ``StringIO``
00432     """
00433     try:
00434       _x = self
00435       buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs))
00436       _x = self.table_pose.header.frame_id
00437       length = len(_x)
00438       if python3 or type(_x) == unicode:
00439         _x = _x.encode('utf-8')
00440         length = len(_x)
00441       buff.write(struct.pack('<I%ss'%length, length, _x))
00442       _x = self
00443       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))
00444     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00445     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00446 
00447   def deserialize(self, str):
00448     """
00449     unpack serialized message in str into this message instance
00450     :param str: byte array of serialized message, ``str``
00451     """
00452     try:
00453       if self.table_pose is None:
00454         self.table_pose = geometry_msgs.msg.PoseStamped()
00455       end = 0
00456       _x = self
00457       start = end
00458       end += 12
00459       (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00460       start = end
00461       end += 4
00462       (length,) = _struct_I.unpack(str[start:end])
00463       start = end
00464       end += length
00465       if python3:
00466         self.table_pose.header.frame_id = str[start:end].decode('utf-8')
00467       else:
00468         self.table_pose.header.frame_id = str[start:end]
00469       _x = self
00470       start = end
00471       end += 56
00472       (_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])
00473       return self
00474     except struct.error as e:
00475       raise genpy.DeserializationError(e) #most likely buffer underfill
00476 
00477 
00478   def serialize_numpy(self, buff, numpy):
00479     """
00480     serialize message with numpy array types into buffer
00481     :param buff: buffer, ``StringIO``
00482     :param numpy: numpy python module
00483     """
00484     try:
00485       _x = self
00486       buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs))
00487       _x = self.table_pose.header.frame_id
00488       length = len(_x)
00489       if python3 or type(_x) == unicode:
00490         _x = _x.encode('utf-8')
00491         length = len(_x)
00492       buff.write(struct.pack('<I%ss'%length, length, _x))
00493       _x = self
00494       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))
00495     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00496     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00497 
00498   def deserialize_numpy(self, str, numpy):
00499     """
00500     unpack serialized message in str into this message instance using numpy for array types
00501     :param str: byte array of serialized message, ``str``
00502     :param numpy: numpy python module
00503     """
00504     try:
00505       if self.table_pose is None:
00506         self.table_pose = geometry_msgs.msg.PoseStamped()
00507       end = 0
00508       _x = self
00509       start = end
00510       end += 12
00511       (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00512       start = end
00513       end += 4
00514       (length,) = _struct_I.unpack(str[start:end])
00515       start = end
00516       end += length
00517       if python3:
00518         self.table_pose.header.frame_id = str[start:end].decode('utf-8')
00519       else:
00520         self.table_pose.header.frame_id = str[start:end]
00521       _x = self
00522       start = end
00523       end += 56
00524       (_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])
00525       return self
00526     except struct.error as e:
00527       raise genpy.DeserializationError(e) #most likely buffer underfill
00528 
00529 _struct_I = genpy.struct_I
00530 _struct_3I = struct.Struct("<3I")
00531 _struct_7d = struct.Struct("<7d")
00532 class GetPose(object):
00533   _type          = 'table_pose/GetPose'
00534   _md5sum = '81e9d3aaa4af67d8dbbdf94ddcea579a'
00535   _request_class  = GetPoseRequest
00536   _response_class = GetPoseResponse


table_pose
Author(s): Radu Bogdan Rusu
autogenerated on Mon Oct 6 2014 08:51:22