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