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


pr2_grasp_adjust
Author(s): Adam Leeper
autogenerated on Wed Jan 23 2013 15:27:20