_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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00234     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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       self.result.cloud.data = str[start:end]
00335       start = end
00336       end += 1
00337       (self.result.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00338       self.result.cloud.is_dense = bool(self.result.cloud.is_dense)
00339       return self
00340     except struct.error as e:
00341       raise genpy.DeserializationError(e) #most likely buffer underfill
00342 
00343 
00344   def serialize_numpy(self, buff, numpy):
00345     """
00346     serialize message with numpy array types into buffer
00347     :param buff: buffer, ``StringIO``
00348     :param numpy: numpy python module
00349     """
00350     try:
00351       _x = self
00352       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00353       _x = self.header.frame_id
00354       length = len(_x)
00355       if python3 or type(_x) == unicode:
00356         _x = _x.encode('utf-8')
00357         length = len(_x)
00358       buff.write(struct.pack('<I%ss'%length, length, _x))
00359       _x = self
00360       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00361       _x = self.status.goal_id.id
00362       length = len(_x)
00363       if python3 or type(_x) == unicode:
00364         _x = _x.encode('utf-8')
00365         length = len(_x)
00366       buff.write(struct.pack('<I%ss'%length, length, _x))
00367       buff.write(_struct_B.pack(self.status.status))
00368       _x = self.status.text
00369       length = len(_x)
00370       if python3 or type(_x) == unicode:
00371         _x = _x.encode('utf-8')
00372         length = len(_x)
00373       buff.write(struct.pack('<I%ss'%length, length, _x))
00374       _x = self
00375       buff.write(_struct_3I.pack(_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs))
00376       _x = self.result.cloud.header.frame_id
00377       length = len(_x)
00378       if python3 or type(_x) == unicode:
00379         _x = _x.encode('utf-8')
00380         length = len(_x)
00381       buff.write(struct.pack('<I%ss'%length, length, _x))
00382       _x = self
00383       buff.write(_struct_2I.pack(_x.result.cloud.height, _x.result.cloud.width))
00384       length = len(self.result.cloud.fields)
00385       buff.write(_struct_I.pack(length))
00386       for val1 in self.result.cloud.fields:
00387         _x = val1.name
00388         length = len(_x)
00389         if python3 or type(_x) == unicode:
00390           _x = _x.encode('utf-8')
00391           length = len(_x)
00392         buff.write(struct.pack('<I%ss'%length, length, _x))
00393         _x = val1
00394         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00395       _x = self
00396       buff.write(_struct_B2I.pack(_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step))
00397       _x = self.result.cloud.data
00398       length = len(_x)
00399       # - if encoded as a list instead, serialize as bytes instead of string
00400       if type(_x) in [list, tuple]:
00401         buff.write(struct.pack('<I%sB'%length, length, *_x))
00402       else:
00403         buff.write(struct.pack('<I%ss'%length, length, _x))
00404       buff.write(_struct_B.pack(self.result.cloud.is_dense))
00405     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00406     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00407 
00408   def deserialize_numpy(self, str, numpy):
00409     """
00410     unpack serialized message in str into this message instance using numpy for array types
00411     :param str: byte array of serialized message, ``str``
00412     :param numpy: numpy python module
00413     """
00414     try:
00415       if self.header is None:
00416         self.header = std_msgs.msg.Header()
00417       if self.status is None:
00418         self.status = actionlib_msgs.msg.GoalStatus()
00419       if self.result is None:
00420         self.result = pr2_tilt_laser_interface.msg.GetSnapshotResult()
00421       end = 0
00422       _x = self
00423       start = end
00424       end += 12
00425       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00426       start = end
00427       end += 4
00428       (length,) = _struct_I.unpack(str[start:end])
00429       start = end
00430       end += length
00431       if python3:
00432         self.header.frame_id = str[start:end].decode('utf-8')
00433       else:
00434         self.header.frame_id = str[start:end]
00435       _x = self
00436       start = end
00437       end += 8
00438       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00439       start = end
00440       end += 4
00441       (length,) = _struct_I.unpack(str[start:end])
00442       start = end
00443       end += length
00444       if python3:
00445         self.status.goal_id.id = str[start:end].decode('utf-8')
00446       else:
00447         self.status.goal_id.id = str[start:end]
00448       start = end
00449       end += 1
00450       (self.status.status,) = _struct_B.unpack(str[start:end])
00451       start = end
00452       end += 4
00453       (length,) = _struct_I.unpack(str[start:end])
00454       start = end
00455       end += length
00456       if python3:
00457         self.status.text = str[start:end].decode('utf-8')
00458       else:
00459         self.status.text = str[start:end]
00460       _x = self
00461       start = end
00462       end += 12
00463       (_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00464       start = end
00465       end += 4
00466       (length,) = _struct_I.unpack(str[start:end])
00467       start = end
00468       end += length
00469       if python3:
00470         self.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00471       else:
00472         self.result.cloud.header.frame_id = str[start:end]
00473       _x = self
00474       start = end
00475       end += 8
00476       (_x.result.cloud.height, _x.result.cloud.width,) = _struct_2I.unpack(str[start:end])
00477       start = end
00478       end += 4
00479       (length,) = _struct_I.unpack(str[start:end])
00480       self.result.cloud.fields = []
00481       for i in range(0, length):
00482         val1 = sensor_msgs.msg.PointField()
00483         start = end
00484         end += 4
00485         (length,) = _struct_I.unpack(str[start:end])
00486         start = end
00487         end += length
00488         if python3:
00489           val1.name = str[start:end].decode('utf-8')
00490         else:
00491           val1.name = str[start:end]
00492         _x = val1
00493         start = end
00494         end += 9
00495         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00496         self.result.cloud.fields.append(val1)
00497       _x = self
00498       start = end
00499       end += 9
00500       (_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00501       self.result.cloud.is_bigendian = bool(self.result.cloud.is_bigendian)
00502       start = end
00503       end += 4
00504       (length,) = _struct_I.unpack(str[start:end])
00505       start = end
00506       end += length
00507       self.result.cloud.data = str[start:end]
00508       start = end
00509       end += 1
00510       (self.result.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00511       self.result.cloud.is_dense = bool(self.result.cloud.is_dense)
00512       return self
00513     except struct.error as e:
00514       raise genpy.DeserializationError(e) #most likely buffer underfill
00515 
00516 _struct_I = genpy.struct_I
00517 _struct_IBI = struct.Struct("<IBI")
00518 _struct_3I = struct.Struct("<3I")
00519 _struct_B = struct.Struct("<B")
00520 _struct_2I = struct.Struct("<2I")
00521 _struct_B2I = struct.Struct("<B2I")


pr2_tilt_laser_interface
Author(s): Radu Rusu, Wim Meeussen, Vijay Pradeep
autogenerated on Tue Apr 22 2014 19:30:53