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


pr2_tilt_laser_interface
Author(s): Radu Rusu, Wim Meeussen, Vijay Pradeep
autogenerated on Sat Dec 28 2013 17:25:13