00001 """autogenerated by genpy from point_cloud_server/StoreCloudActionGoal.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 sensor_msgs.msg
00008 import point_cloud_server.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012
00013 class StoreCloudActionGoal(genpy.Message):
00014 _md5sum = "dd766e3b05af6403935d6aed4100baca"
00015 _type = "point_cloud_server/StoreCloudActionGoal"
00016 _has_header = True
00017 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 StoreCloudGoal goal
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/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052
00053
00054 ================================================================================
00055 MSG: point_cloud_server/StoreCloudGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 # The storage name of the point cloud.
00058 string name
00059
00060 # The topic on which to capture a point cloud message.
00061 # If this is empty, then 'cloud' will be used instead.
00062 string topic
00063
00064 # A point cloud to store.
00065 sensor_msgs/PointCloud2 cloud
00066
00067 # If not empty, transforms the cloud to this frame before storing.
00068 string storage_frame_id
00069
00070 # If not empty, transforms the cloud to this frame in the return result.
00071 string result_frame_id
00072
00073 # A flag to determine whether to reply with the cloud.
00074 int32 action
00075
00076 # Will get a message on topic, or store cloud.
00077 int32 STORE=0
00078
00079 # Will get a message on a topic if it is provided, save, and return it;
00080 # otherwise just returns the existing cloud.
00081 int32 GET=1
00082
00083 # Topic and cloud are ignored, just removes cloud from the server.
00084 int32 CLEAR=2
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','goal_id','goal']
00137 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','point_cloud_server/StoreCloudGoal']
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,goal_id,goal
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(StoreCloudActionGoal, self).__init__(*args, **kwds)
00155
00156 if self.header is None:
00157 self.header = std_msgs.msg.Header()
00158 if self.goal_id is None:
00159 self.goal_id = actionlib_msgs.msg.GoalID()
00160 if self.goal is None:
00161 self.goal = point_cloud_server.msg.StoreCloudGoal()
00162 else:
00163 self.header = std_msgs.msg.Header()
00164 self.goal_id = actionlib_msgs.msg.GoalID()
00165 self.goal = point_cloud_server.msg.StoreCloudGoal()
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.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00189 _x = self.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 _x = self.goal.name
00196 length = len(_x)
00197 if python3 or type(_x) == unicode:
00198 _x = _x.encode('utf-8')
00199 length = len(_x)
00200 buff.write(struct.pack('<I%ss'%length, length, _x))
00201 _x = self.goal.topic
00202 length = len(_x)
00203 if python3 or type(_x) == unicode:
00204 _x = _x.encode('utf-8')
00205 length = len(_x)
00206 buff.write(struct.pack('<I%ss'%length, length, _x))
00207 _x = self
00208 buff.write(_struct_3I.pack(_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs))
00209 _x = self.goal.cloud.header.frame_id
00210 length = len(_x)
00211 if python3 or type(_x) == unicode:
00212 _x = _x.encode('utf-8')
00213 length = len(_x)
00214 buff.write(struct.pack('<I%ss'%length, length, _x))
00215 _x = self
00216 buff.write(_struct_2I.pack(_x.goal.cloud.height, _x.goal.cloud.width))
00217 length = len(self.goal.cloud.fields)
00218 buff.write(_struct_I.pack(length))
00219 for val1 in self.goal.cloud.fields:
00220 _x = val1.name
00221 length = len(_x)
00222 if python3 or type(_x) == unicode:
00223 _x = _x.encode('utf-8')
00224 length = len(_x)
00225 buff.write(struct.pack('<I%ss'%length, length, _x))
00226 _x = val1
00227 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00228 _x = self
00229 buff.write(_struct_B2I.pack(_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step))
00230 _x = self.goal.cloud.data
00231 length = len(_x)
00232
00233 if type(_x) in [list, tuple]:
00234 buff.write(struct.pack('<I%sB'%length, length, *_x))
00235 else:
00236 buff.write(struct.pack('<I%ss'%length, length, _x))
00237 buff.write(_struct_B.pack(self.goal.cloud.is_dense))
00238 _x = self.goal.storage_frame_id
00239 length = len(_x)
00240 if python3 or type(_x) == unicode:
00241 _x = _x.encode('utf-8')
00242 length = len(_x)
00243 buff.write(struct.pack('<I%ss'%length, length, _x))
00244 _x = self.goal.result_frame_id
00245 length = len(_x)
00246 if python3 or type(_x) == unicode:
00247 _x = _x.encode('utf-8')
00248 length = len(_x)
00249 buff.write(struct.pack('<I%ss'%length, length, _x))
00250 buff.write(_struct_i.pack(self.goal.action))
00251 except struct.error as se: self._check_types(se)
00252 except TypeError as te: self._check_types(te)
00253
00254 def deserialize(self, str):
00255 """
00256 unpack serialized message in str into this message instance
00257 :param str: byte array of serialized message, ``str``
00258 """
00259 try:
00260 if self.header is None:
00261 self.header = std_msgs.msg.Header()
00262 if self.goal_id is None:
00263 self.goal_id = actionlib_msgs.msg.GoalID()
00264 if self.goal is None:
00265 self.goal = point_cloud_server.msg.StoreCloudGoal()
00266 end = 0
00267 _x = self
00268 start = end
00269 end += 12
00270 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 start = end
00275 end += length
00276 if python3:
00277 self.header.frame_id = str[start:end].decode('utf-8')
00278 else:
00279 self.header.frame_id = str[start:end]
00280 _x = self
00281 start = end
00282 end += 8
00283 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 start = end
00288 end += length
00289 if python3:
00290 self.goal_id.id = str[start:end].decode('utf-8')
00291 else:
00292 self.goal_id.id = str[start:end]
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 if python3:
00299 self.goal.name = str[start:end].decode('utf-8')
00300 else:
00301 self.goal.name = str[start:end]
00302 start = end
00303 end += 4
00304 (length,) = _struct_I.unpack(str[start:end])
00305 start = end
00306 end += length
00307 if python3:
00308 self.goal.topic = str[start:end].decode('utf-8')
00309 else:
00310 self.goal.topic = str[start:end]
00311 _x = self
00312 start = end
00313 end += 12
00314 (_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00315 start = end
00316 end += 4
00317 (length,) = _struct_I.unpack(str[start:end])
00318 start = end
00319 end += length
00320 if python3:
00321 self.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00322 else:
00323 self.goal.cloud.header.frame_id = str[start:end]
00324 _x = self
00325 start = end
00326 end += 8
00327 (_x.goal.cloud.height, _x.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00328 start = end
00329 end += 4
00330 (length,) = _struct_I.unpack(str[start:end])
00331 self.goal.cloud.fields = []
00332 for i in range(0, length):
00333 val1 = sensor_msgs.msg.PointField()
00334 start = end
00335 end += 4
00336 (length,) = _struct_I.unpack(str[start:end])
00337 start = end
00338 end += length
00339 if python3:
00340 val1.name = str[start:end].decode('utf-8')
00341 else:
00342 val1.name = str[start:end]
00343 _x = val1
00344 start = end
00345 end += 9
00346 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00347 self.goal.cloud.fields.append(val1)
00348 _x = self
00349 start = end
00350 end += 9
00351 (_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00352 self.goal.cloud.is_bigendian = bool(self.goal.cloud.is_bigendian)
00353 start = end
00354 end += 4
00355 (length,) = _struct_I.unpack(str[start:end])
00356 start = end
00357 end += length
00358 if python3:
00359 self.goal.cloud.data = str[start:end].decode('utf-8')
00360 else:
00361 self.goal.cloud.data = str[start:end]
00362 start = end
00363 end += 1
00364 (self.goal.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00365 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00366 start = end
00367 end += 4
00368 (length,) = _struct_I.unpack(str[start:end])
00369 start = end
00370 end += length
00371 if python3:
00372 self.goal.storage_frame_id = str[start:end].decode('utf-8')
00373 else:
00374 self.goal.storage_frame_id = str[start:end]
00375 start = end
00376 end += 4
00377 (length,) = _struct_I.unpack(str[start:end])
00378 start = end
00379 end += length
00380 if python3:
00381 self.goal.result_frame_id = str[start:end].decode('utf-8')
00382 else:
00383 self.goal.result_frame_id = str[start:end]
00384 start = end
00385 end += 4
00386 (self.goal.action,) = _struct_i.unpack(str[start:end])
00387 return self
00388 except struct.error as e:
00389 raise genpy.DeserializationError(e)
00390
00391
00392 def serialize_numpy(self, buff, numpy):
00393 """
00394 serialize message with numpy array types into buffer
00395 :param buff: buffer, ``StringIO``
00396 :param numpy: numpy python module
00397 """
00398 try:
00399 _x = self
00400 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00401 _x = self.header.frame_id
00402 length = len(_x)
00403 if python3 or type(_x) == unicode:
00404 _x = _x.encode('utf-8')
00405 length = len(_x)
00406 buff.write(struct.pack('<I%ss'%length, length, _x))
00407 _x = self
00408 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00409 _x = self.goal_id.id
00410 length = len(_x)
00411 if python3 or type(_x) == unicode:
00412 _x = _x.encode('utf-8')
00413 length = len(_x)
00414 buff.write(struct.pack('<I%ss'%length, length, _x))
00415 _x = self.goal.name
00416 length = len(_x)
00417 if python3 or type(_x) == unicode:
00418 _x = _x.encode('utf-8')
00419 length = len(_x)
00420 buff.write(struct.pack('<I%ss'%length, length, _x))
00421 _x = self.goal.topic
00422 length = len(_x)
00423 if python3 or type(_x) == unicode:
00424 _x = _x.encode('utf-8')
00425 length = len(_x)
00426 buff.write(struct.pack('<I%ss'%length, length, _x))
00427 _x = self
00428 buff.write(_struct_3I.pack(_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs))
00429 _x = self.goal.cloud.header.frame_id
00430 length = len(_x)
00431 if python3 or type(_x) == unicode:
00432 _x = _x.encode('utf-8')
00433 length = len(_x)
00434 buff.write(struct.pack('<I%ss'%length, length, _x))
00435 _x = self
00436 buff.write(_struct_2I.pack(_x.goal.cloud.height, _x.goal.cloud.width))
00437 length = len(self.goal.cloud.fields)
00438 buff.write(_struct_I.pack(length))
00439 for val1 in self.goal.cloud.fields:
00440 _x = val1.name
00441 length = len(_x)
00442 if python3 or type(_x) == unicode:
00443 _x = _x.encode('utf-8')
00444 length = len(_x)
00445 buff.write(struct.pack('<I%ss'%length, length, _x))
00446 _x = val1
00447 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00448 _x = self
00449 buff.write(_struct_B2I.pack(_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step))
00450 _x = self.goal.cloud.data
00451 length = len(_x)
00452
00453 if type(_x) in [list, tuple]:
00454 buff.write(struct.pack('<I%sB'%length, length, *_x))
00455 else:
00456 buff.write(struct.pack('<I%ss'%length, length, _x))
00457 buff.write(_struct_B.pack(self.goal.cloud.is_dense))
00458 _x = self.goal.storage_frame_id
00459 length = len(_x)
00460 if python3 or type(_x) == unicode:
00461 _x = _x.encode('utf-8')
00462 length = len(_x)
00463 buff.write(struct.pack('<I%ss'%length, length, _x))
00464 _x = self.goal.result_frame_id
00465 length = len(_x)
00466 if python3 or type(_x) == unicode:
00467 _x = _x.encode('utf-8')
00468 length = len(_x)
00469 buff.write(struct.pack('<I%ss'%length, length, _x))
00470 buff.write(_struct_i.pack(self.goal.action))
00471 except struct.error as se: self._check_types(se)
00472 except TypeError as te: self._check_types(te)
00473
00474 def deserialize_numpy(self, str, numpy):
00475 """
00476 unpack serialized message in str into this message instance using numpy for array types
00477 :param str: byte array of serialized message, ``str``
00478 :param numpy: numpy python module
00479 """
00480 try:
00481 if self.header is None:
00482 self.header = std_msgs.msg.Header()
00483 if self.goal_id is None:
00484 self.goal_id = actionlib_msgs.msg.GoalID()
00485 if self.goal is None:
00486 self.goal = point_cloud_server.msg.StoreCloudGoal()
00487 end = 0
00488 _x = self
00489 start = end
00490 end += 12
00491 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 start = end
00496 end += length
00497 if python3:
00498 self.header.frame_id = str[start:end].decode('utf-8')
00499 else:
00500 self.header.frame_id = str[start:end]
00501 _x = self
00502 start = end
00503 end += 8
00504 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
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.goal_id.id = str[start:end].decode('utf-8')
00512 else:
00513 self.goal_id.id = str[start:end]
00514 start = end
00515 end += 4
00516 (length,) = _struct_I.unpack(str[start:end])
00517 start = end
00518 end += length
00519 if python3:
00520 self.goal.name = str[start:end].decode('utf-8')
00521 else:
00522 self.goal.name = str[start:end]
00523 start = end
00524 end += 4
00525 (length,) = _struct_I.unpack(str[start:end])
00526 start = end
00527 end += length
00528 if python3:
00529 self.goal.topic = str[start:end].decode('utf-8')
00530 else:
00531 self.goal.topic = str[start:end]
00532 _x = self
00533 start = end
00534 end += 12
00535 (_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00536 start = end
00537 end += 4
00538 (length,) = _struct_I.unpack(str[start:end])
00539 start = end
00540 end += length
00541 if python3:
00542 self.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00543 else:
00544 self.goal.cloud.header.frame_id = str[start:end]
00545 _x = self
00546 start = end
00547 end += 8
00548 (_x.goal.cloud.height, _x.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00549 start = end
00550 end += 4
00551 (length,) = _struct_I.unpack(str[start:end])
00552 self.goal.cloud.fields = []
00553 for i in range(0, length):
00554 val1 = sensor_msgs.msg.PointField()
00555 start = end
00556 end += 4
00557 (length,) = _struct_I.unpack(str[start:end])
00558 start = end
00559 end += length
00560 if python3:
00561 val1.name = str[start:end].decode('utf-8')
00562 else:
00563 val1.name = str[start:end]
00564 _x = val1
00565 start = end
00566 end += 9
00567 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00568 self.goal.cloud.fields.append(val1)
00569 _x = self
00570 start = end
00571 end += 9
00572 (_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00573 self.goal.cloud.is_bigendian = bool(self.goal.cloud.is_bigendian)
00574 start = end
00575 end += 4
00576 (length,) = _struct_I.unpack(str[start:end])
00577 start = end
00578 end += length
00579 if python3:
00580 self.goal.cloud.data = str[start:end].decode('utf-8')
00581 else:
00582 self.goal.cloud.data = str[start:end]
00583 start = end
00584 end += 1
00585 (self.goal.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00586 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00587 start = end
00588 end += 4
00589 (length,) = _struct_I.unpack(str[start:end])
00590 start = end
00591 end += length
00592 if python3:
00593 self.goal.storage_frame_id = str[start:end].decode('utf-8')
00594 else:
00595 self.goal.storage_frame_id = str[start:end]
00596 start = end
00597 end += 4
00598 (length,) = _struct_I.unpack(str[start:end])
00599 start = end
00600 end += length
00601 if python3:
00602 self.goal.result_frame_id = str[start:end].decode('utf-8')
00603 else:
00604 self.goal.result_frame_id = str[start:end]
00605 start = end
00606 end += 4
00607 (self.goal.action,) = _struct_i.unpack(str[start:end])
00608 return self
00609 except struct.error as e:
00610 raise genpy.DeserializationError(e)
00611
00612 _struct_I = genpy.struct_I
00613 _struct_IBI = struct.Struct("<IBI")
00614 _struct_B = struct.Struct("<B")
00615 _struct_i = struct.Struct("<i")
00616 _struct_3I = struct.Struct("<3I")
00617 _struct_B2I = struct.Struct("<B2I")
00618 _struct_2I = struct.Struct("<2I")