_BuildCloudAngle.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_laser_snapshotter/BuildCloudAngleRequest.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 BuildCloudAngleRequest(genpy.Message):
00009   _md5sum = "f30b95de7b6756e5f67b5d49f4f7affd"
00010   _type = "pr2_laser_snapshotter/BuildCloudAngleRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float64 angle_begin
00013 float64 angle_end
00014 float64 duration
00015 
00016 """
00017   __slots__ = ['angle_begin','angle_end','duration']
00018   _slot_types = ['float64','float64','float64']
00019 
00020   def __init__(self, *args, **kwds):
00021     """
00022     Constructor. Any message fields that are implicitly/explicitly
00023     set to None will be assigned a default value. The recommend
00024     use is keyword arguments as this is more robust to future message
00025     changes.  You cannot mix in-order arguments and keyword arguments.
00026 
00027     The available fields are:
00028        angle_begin,angle_end,duration
00029 
00030     :param args: complete set of field values, in .msg order
00031     :param kwds: use keyword arguments corresponding to message field names
00032     to set specific fields.
00033     """
00034     if args or kwds:
00035       super(BuildCloudAngleRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.angle_begin is None:
00038         self.angle_begin = 0.
00039       if self.angle_end is None:
00040         self.angle_end = 0.
00041       if self.duration is None:
00042         self.duration = 0.
00043     else:
00044       self.angle_begin = 0.
00045       self.angle_end = 0.
00046       self.duration = 0.
00047 
00048   def _get_types(self):
00049     """
00050     internal API method
00051     """
00052     return self._slot_types
00053 
00054   def serialize(self, buff):
00055     """
00056     serialize message into buffer
00057     :param buff: buffer, ``StringIO``
00058     """
00059     try:
00060       _x = self
00061       buff.write(_struct_3d.pack(_x.angle_begin, _x.angle_end, _x.duration))
00062     except struct.error as se: self._check_types(se)
00063     except TypeError as te: self._check_types(te)
00064 
00065   def deserialize(self, str):
00066     """
00067     unpack serialized message in str into this message instance
00068     :param str: byte array of serialized message, ``str``
00069     """
00070     try:
00071       end = 0
00072       _x = self
00073       start = end
00074       end += 24
00075       (_x.angle_begin, _x.angle_end, _x.duration,) = _struct_3d.unpack(str[start:end])
00076       return self
00077     except struct.error as e:
00078       raise genpy.DeserializationError(e) #most likely buffer underfill
00079 
00080 
00081   def serialize_numpy(self, buff, numpy):
00082     """
00083     serialize message with numpy array types into buffer
00084     :param buff: buffer, ``StringIO``
00085     :param numpy: numpy python module
00086     """
00087     try:
00088       _x = self
00089       buff.write(_struct_3d.pack(_x.angle_begin, _x.angle_end, _x.duration))
00090     except struct.error as se: self._check_types(se)
00091     except TypeError as te: self._check_types(te)
00092 
00093   def deserialize_numpy(self, str, numpy):
00094     """
00095     unpack serialized message in str into this message instance using numpy for array types
00096     :param str: byte array of serialized message, ``str``
00097     :param numpy: numpy python module
00098     """
00099     try:
00100       end = 0
00101       _x = self
00102       start = end
00103       end += 24
00104       (_x.angle_begin, _x.angle_end, _x.duration,) = _struct_3d.unpack(str[start:end])
00105       return self
00106     except struct.error as e:
00107       raise genpy.DeserializationError(e) #most likely buffer underfill
00108 
00109 _struct_I = genpy.struct_I
00110 _struct_3d = struct.Struct("<3d")
00111 """autogenerated by genpy from pr2_laser_snapshotter/BuildCloudAngleResponse.msg. Do not edit."""
00112 import sys
00113 python3 = True if sys.hexversion > 0x03000000 else False
00114 import genpy
00115 import struct
00116 
00117 import geometry_msgs.msg
00118 import std_msgs.msg
00119 import sensor_msgs.msg
00120 
00121 class BuildCloudAngleResponse(genpy.Message):
00122   _md5sum = "4217b28a903e4ad7869a83b3653110ff"
00123   _type = "pr2_laser_snapshotter/BuildCloudAngleResponse"
00124   _has_header = False #flag to mark the presence of a Header object
00125   _full_text = """sensor_msgs/PointCloud cloud
00126 
00127 
00128 ================================================================================
00129 MSG: sensor_msgs/PointCloud
00130 # This message holds a collection of 3d points, plus optional additional
00131 # information about each point.
00132 
00133 # Time of sensor data acquisition, coordinate frame ID.
00134 Header header
00135 
00136 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00137 # in the frame given in the header.
00138 geometry_msgs/Point32[] points
00139 
00140 # Each channel should have the same number of elements as points array,
00141 # and the data in each channel should correspond 1:1 with each point.
00142 # Channel names in common practice are listed in ChannelFloat32.msg.
00143 ChannelFloat32[] channels
00144 
00145 ================================================================================
00146 MSG: std_msgs/Header
00147 # Standard metadata for higher-level stamped data types.
00148 # This is generally used to communicate timestamped data 
00149 # in a particular coordinate frame.
00150 # 
00151 # sequence ID: consecutively increasing ID 
00152 uint32 seq
00153 #Two-integer timestamp that is expressed as:
00154 # * stamp.secs: seconds (stamp_secs) since epoch
00155 # * stamp.nsecs: nanoseconds since stamp_secs
00156 # time-handling sugar is provided by the client library
00157 time stamp
00158 #Frame this data is associated with
00159 # 0: no frame
00160 # 1: global frame
00161 string frame_id
00162 
00163 ================================================================================
00164 MSG: geometry_msgs/Point32
00165 # This contains the position of a point in free space(with 32 bits of precision).
00166 # It is recommeded to use Point wherever possible instead of Point32.  
00167 # 
00168 # This recommendation is to promote interoperability.  
00169 #
00170 # This message is designed to take up less space when sending
00171 # lots of points at once, as in the case of a PointCloud.  
00172 
00173 float32 x
00174 float32 y
00175 float32 z
00176 ================================================================================
00177 MSG: sensor_msgs/ChannelFloat32
00178 # This message is used by the PointCloud message to hold optional data
00179 # associated with each point in the cloud. The length of the values
00180 # array should be the same as the length of the points array in the
00181 # PointCloud, and each value should be associated with the corresponding
00182 # point.
00183 
00184 # Channel names in existing practice include:
00185 #   "u", "v" - row and column (respectively) in the left stereo image.
00186 #              This is opposite to usual conventions but remains for
00187 #              historical reasons. The newer PointCloud2 message has no
00188 #              such problem.
00189 #   "rgb" - For point clouds produced by color stereo cameras. uint8
00190 #           (R,G,B) values packed into the least significant 24 bits,
00191 #           in order.
00192 #   "intensity" - laser or pixel intensity.
00193 #   "distance"
00194 
00195 # The channel name should give semantics of the channel (e.g.
00196 # "intensity" instead of "value").
00197 string name
00198 
00199 # The values array should be 1-1 with the elements of the associated
00200 # PointCloud.
00201 float32[] values
00202 
00203 """
00204   __slots__ = ['cloud']
00205   _slot_types = ['sensor_msgs/PointCloud']
00206 
00207   def __init__(self, *args, **kwds):
00208     """
00209     Constructor. Any message fields that are implicitly/explicitly
00210     set to None will be assigned a default value. The recommend
00211     use is keyword arguments as this is more robust to future message
00212     changes.  You cannot mix in-order arguments and keyword arguments.
00213 
00214     The available fields are:
00215        cloud
00216 
00217     :param args: complete set of field values, in .msg order
00218     :param kwds: use keyword arguments corresponding to message field names
00219     to set specific fields.
00220     """
00221     if args or kwds:
00222       super(BuildCloudAngleResponse, self).__init__(*args, **kwds)
00223       #message fields cannot be None, assign default values for those that are
00224       if self.cloud is None:
00225         self.cloud = sensor_msgs.msg.PointCloud()
00226     else:
00227       self.cloud = sensor_msgs.msg.PointCloud()
00228 
00229   def _get_types(self):
00230     """
00231     internal API method
00232     """
00233     return self._slot_types
00234 
00235   def serialize(self, buff):
00236     """
00237     serialize message into buffer
00238     :param buff: buffer, ``StringIO``
00239     """
00240     try:
00241       _x = self
00242       buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00243       _x = self.cloud.header.frame_id
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       length = len(self.cloud.points)
00250       buff.write(_struct_I.pack(length))
00251       for val1 in self.cloud.points:
00252         _x = val1
00253         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00254       length = len(self.cloud.channels)
00255       buff.write(_struct_I.pack(length))
00256       for val1 in self.cloud.channels:
00257         _x = val1.name
00258         length = len(_x)
00259         if python3 or type(_x) == unicode:
00260           _x = _x.encode('utf-8')
00261           length = len(_x)
00262         buff.write(struct.pack('<I%ss'%length, length, _x))
00263         length = len(val1.values)
00264         buff.write(_struct_I.pack(length))
00265         pattern = '<%sf'%length
00266         buff.write(struct.pack(pattern, *val1.values))
00267     except struct.error as se: self._check_types(se)
00268     except TypeError as te: self._check_types(te)
00269 
00270   def deserialize(self, str):
00271     """
00272     unpack serialized message in str into this message instance
00273     :param str: byte array of serialized message, ``str``
00274     """
00275     try:
00276       if self.cloud is None:
00277         self.cloud = sensor_msgs.msg.PointCloud()
00278       end = 0
00279       _x = self
00280       start = end
00281       end += 12
00282       (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00283       start = end
00284       end += 4
00285       (length,) = _struct_I.unpack(str[start:end])
00286       start = end
00287       end += length
00288       if python3:
00289         self.cloud.header.frame_id = str[start:end].decode('utf-8')
00290       else:
00291         self.cloud.header.frame_id = str[start:end]
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       self.cloud.points = []
00296       for i in range(0, length):
00297         val1 = geometry_msgs.msg.Point32()
00298         _x = val1
00299         start = end
00300         end += 12
00301         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00302         self.cloud.points.append(val1)
00303       start = end
00304       end += 4
00305       (length,) = _struct_I.unpack(str[start:end])
00306       self.cloud.channels = []
00307       for i in range(0, length):
00308         val1 = sensor_msgs.msg.ChannelFloat32()
00309         start = end
00310         end += 4
00311         (length,) = _struct_I.unpack(str[start:end])
00312         start = end
00313         end += length
00314         if python3:
00315           val1.name = str[start:end].decode('utf-8')
00316         else:
00317           val1.name = str[start:end]
00318         start = end
00319         end += 4
00320         (length,) = _struct_I.unpack(str[start:end])
00321         pattern = '<%sf'%length
00322         start = end
00323         end += struct.calcsize(pattern)
00324         val1.values = struct.unpack(pattern, str[start:end])
00325         self.cloud.channels.append(val1)
00326       return self
00327     except struct.error as e:
00328       raise genpy.DeserializationError(e) #most likely buffer underfill
00329 
00330 
00331   def serialize_numpy(self, buff, numpy):
00332     """
00333     serialize message with numpy array types into buffer
00334     :param buff: buffer, ``StringIO``
00335     :param numpy: numpy python module
00336     """
00337     try:
00338       _x = self
00339       buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00340       _x = self.cloud.header.frame_id
00341       length = len(_x)
00342       if python3 or type(_x) == unicode:
00343         _x = _x.encode('utf-8')
00344         length = len(_x)
00345       buff.write(struct.pack('<I%ss'%length, length, _x))
00346       length = len(self.cloud.points)
00347       buff.write(_struct_I.pack(length))
00348       for val1 in self.cloud.points:
00349         _x = val1
00350         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00351       length = len(self.cloud.channels)
00352       buff.write(_struct_I.pack(length))
00353       for val1 in self.cloud.channels:
00354         _x = val1.name
00355         length = len(_x)
00356         if python3 or type(_x) == unicode:
00357           _x = _x.encode('utf-8')
00358           length = len(_x)
00359         buff.write(struct.pack('<I%ss'%length, length, _x))
00360         length = len(val1.values)
00361         buff.write(_struct_I.pack(length))
00362         pattern = '<%sf'%length
00363         buff.write(val1.values.tostring())
00364     except struct.error as se: self._check_types(se)
00365     except TypeError as te: self._check_types(te)
00366 
00367   def deserialize_numpy(self, str, numpy):
00368     """
00369     unpack serialized message in str into this message instance using numpy for array types
00370     :param str: byte array of serialized message, ``str``
00371     :param numpy: numpy python module
00372     """
00373     try:
00374       if self.cloud is None:
00375         self.cloud = sensor_msgs.msg.PointCloud()
00376       end = 0
00377       _x = self
00378       start = end
00379       end += 12
00380       (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00381       start = end
00382       end += 4
00383       (length,) = _struct_I.unpack(str[start:end])
00384       start = end
00385       end += length
00386       if python3:
00387         self.cloud.header.frame_id = str[start:end].decode('utf-8')
00388       else:
00389         self.cloud.header.frame_id = str[start:end]
00390       start = end
00391       end += 4
00392       (length,) = _struct_I.unpack(str[start:end])
00393       self.cloud.points = []
00394       for i in range(0, length):
00395         val1 = geometry_msgs.msg.Point32()
00396         _x = val1
00397         start = end
00398         end += 12
00399         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00400         self.cloud.points.append(val1)
00401       start = end
00402       end += 4
00403       (length,) = _struct_I.unpack(str[start:end])
00404       self.cloud.channels = []
00405       for i in range(0, length):
00406         val1 = sensor_msgs.msg.ChannelFloat32()
00407         start = end
00408         end += 4
00409         (length,) = _struct_I.unpack(str[start:end])
00410         start = end
00411         end += length
00412         if python3:
00413           val1.name = str[start:end].decode('utf-8')
00414         else:
00415           val1.name = str[start:end]
00416         start = end
00417         end += 4
00418         (length,) = _struct_I.unpack(str[start:end])
00419         pattern = '<%sf'%length
00420         start = end
00421         end += struct.calcsize(pattern)
00422         val1.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00423         self.cloud.channels.append(val1)
00424       return self
00425     except struct.error as e:
00426       raise genpy.DeserializationError(e) #most likely buffer underfill
00427 
00428 _struct_I = genpy.struct_I
00429 _struct_3I = struct.Struct("<3I")
00430 _struct_3f = struct.Struct("<3f")
00431 class BuildCloudAngle(object):
00432   _type          = 'pr2_laser_snapshotter/BuildCloudAngle'
00433   _md5sum = '7469d22e99d2e7f342cec297b7bb49d3'
00434   _request_class  = BuildCloudAngleRequest
00435   _response_class = BuildCloudAngleResponse


pr2_laser_snapshotter
Author(s): Vijay Pradeep
autogenerated on Wed Dec 11 2013 14:17:19