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