$search
00001 """autogenerated by genmsg_py from CompressedPointCloud.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class CompressedPointCloud(roslib.message.Message): 00008 _md5sum = "c99a9440709e4d4a9716d55b8270d5e7" 00009 _type = "compressed_pointcloud_transport/CompressedPointCloud" 00010 _has_header = True #flag to mark the presence of a Header object 00011 _full_text = """Header header 00012 string data 00013 00014 00015 ================================================================================ 00016 MSG: std_msgs/Header 00017 # Standard metadata for higher-level stamped data types. 00018 # This is generally used to communicate timestamped data 00019 # in a particular coordinate frame. 00020 # 00021 # sequence ID: consecutively increasing ID 00022 uint32 seq 00023 #Two-integer timestamp that is expressed as: 00024 # * stamp.secs: seconds (stamp_secs) since epoch 00025 # * stamp.nsecs: nanoseconds since stamp_secs 00026 # time-handling sugar is provided by the client library 00027 time stamp 00028 #Frame this data is associated with 00029 # 0: no frame 00030 # 1: global frame 00031 string frame_id 00032 00033 """ 00034 __slots__ = ['header','data'] 00035 _slot_types = ['Header','string'] 00036 00037 def __init__(self, *args, **kwds): 00038 """ 00039 Constructor. Any message fields that are implicitly/explicitly 00040 set to None will be assigned a default value. The recommend 00041 use is keyword arguments as this is more robust to future message 00042 changes. You cannot mix in-order arguments and keyword arguments. 00043 00044 The available fields are: 00045 header,data 00046 00047 @param args: complete set of field values, in .msg order 00048 @param kwds: use keyword arguments corresponding to message field names 00049 to set specific fields. 00050 """ 00051 if args or kwds: 00052 super(CompressedPointCloud, self).__init__(*args, **kwds) 00053 #message fields cannot be None, assign default values for those that are 00054 if self.header is None: 00055 self.header = std_msgs.msg._Header.Header() 00056 if self.data is None: 00057 self.data = '' 00058 else: 00059 self.header = std_msgs.msg._Header.Header() 00060 self.data = '' 00061 00062 def _get_types(self): 00063 """ 00064 internal API method 00065 """ 00066 return self._slot_types 00067 00068 def serialize(self, buff): 00069 """ 00070 serialize message into buffer 00071 @param buff: buffer 00072 @type buff: StringIO 00073 """ 00074 try: 00075 _x = self 00076 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00077 _x = self.header.frame_id 00078 length = len(_x) 00079 buff.write(struct.pack('<I%ss'%length, length, _x)) 00080 _x = self.data 00081 length = len(_x) 00082 buff.write(struct.pack('<I%ss'%length, length, _x)) 00083 except struct.error as se: self._check_types(se) 00084 except TypeError as te: self._check_types(te) 00085 00086 def deserialize(self, str): 00087 """ 00088 unpack serialized message in str into this message instance 00089 @param str: byte array of serialized message 00090 @type str: str 00091 """ 00092 try: 00093 if self.header is None: 00094 self.header = std_msgs.msg._Header.Header() 00095 end = 0 00096 _x = self 00097 start = end 00098 end += 12 00099 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00100 start = end 00101 end += 4 00102 (length,) = _struct_I.unpack(str[start:end]) 00103 start = end 00104 end += length 00105 self.header.frame_id = str[start:end] 00106 start = end 00107 end += 4 00108 (length,) = _struct_I.unpack(str[start:end]) 00109 start = end 00110 end += length 00111 self.data = str[start:end] 00112 return self 00113 except struct.error as e: 00114 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00115 00116 00117 def serialize_numpy(self, buff, numpy): 00118 """ 00119 serialize message with numpy array types into buffer 00120 @param buff: buffer 00121 @type buff: StringIO 00122 @param numpy: numpy python module 00123 @type numpy module 00124 """ 00125 try: 00126 _x = self 00127 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00128 _x = self.header.frame_id 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 _x = self.data 00132 length = len(_x) 00133 buff.write(struct.pack('<I%ss'%length, length, _x)) 00134 except struct.error as se: self._check_types(se) 00135 except TypeError as te: self._check_types(te) 00136 00137 def deserialize_numpy(self, str, numpy): 00138 """ 00139 unpack serialized message in str into this message instance using numpy for array types 00140 @param str: byte array of serialized message 00141 @type str: str 00142 @param numpy: numpy python module 00143 @type numpy: module 00144 """ 00145 try: 00146 if self.header is None: 00147 self.header = std_msgs.msg._Header.Header() 00148 end = 0 00149 _x = self 00150 start = end 00151 end += 12 00152 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00153 start = end 00154 end += 4 00155 (length,) = _struct_I.unpack(str[start:end]) 00156 start = end 00157 end += length 00158 self.header.frame_id = str[start:end] 00159 start = end 00160 end += 4 00161 (length,) = _struct_I.unpack(str[start:end]) 00162 start = end 00163 end += length 00164 self.data = str[start:end] 00165 return self 00166 except struct.error as e: 00167 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00168 00169 _struct_I = roslib.message.struct_I 00170 _struct_3I = struct.Struct("<3I")