00001 """autogenerated by genpy from point_cloud_server/StoreCloudAction.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 std_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import point_cloud_server.msg
00012
00013 class StoreCloudAction(genpy.Message):
00014 _md5sum = "43d67f5d9598c562f5f1a43d8bdadb77"
00015 _type = "point_cloud_server/StoreCloudAction"
00016 _has_header = False
00017 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018
00019 StoreCloudActionGoal action_goal
00020 StoreCloudActionResult action_result
00021 StoreCloudActionFeedback action_feedback
00022
00023 ================================================================================
00024 MSG: point_cloud_server/StoreCloudActionGoal
00025 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00026
00027 Header header
00028 actionlib_msgs/GoalID goal_id
00029 StoreCloudGoal goal
00030
00031 ================================================================================
00032 MSG: std_msgs/Header
00033 # Standard metadata for higher-level stamped data types.
00034 # This is generally used to communicate timestamped data
00035 # in a particular coordinate frame.
00036 #
00037 # sequence ID: consecutively increasing ID
00038 uint32 seq
00039 #Two-integer timestamp that is expressed as:
00040 # * stamp.secs: seconds (stamp_secs) since epoch
00041 # * stamp.nsecs: nanoseconds since stamp_secs
00042 # time-handling sugar is provided by the client library
00043 time stamp
00044 #Frame this data is associated with
00045 # 0: no frame
00046 # 1: global frame
00047 string frame_id
00048
00049 ================================================================================
00050 MSG: actionlib_msgs/GoalID
00051 # The stamp should store the time at which this goal was requested.
00052 # It is used by an action server when it tries to preempt all
00053 # goals that were requested before a certain time
00054 time stamp
00055
00056 # The id provides a way to associate feedback and
00057 # result message with specific goal requests. The id
00058 # specified must be unique.
00059 string id
00060
00061
00062 ================================================================================
00063 MSG: point_cloud_server/StoreCloudGoal
00064 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00065 # The storage name of the point cloud.
00066 string name
00067
00068 # The topic on which to capture a point cloud message.
00069 # If this is empty, then 'cloud' will be used instead.
00070 string topic
00071
00072 # A point cloud to store.
00073 sensor_msgs/PointCloud2 cloud
00074
00075 # If not empty, transforms the cloud to this frame before storing.
00076 string storage_frame_id
00077
00078 # If not empty, transforms the cloud to this frame in the return result.
00079 string result_frame_id
00080
00081 # A flag to determine whether to reply with the cloud.
00082 int32 action
00083
00084 # Will get a message on topic, or store cloud.
00085 int32 STORE=0
00086
00087 # Will get a message on a topic if it is provided, save, and return it;
00088 # otherwise just returns the existing cloud.
00089 int32 GET=1
00090
00091 # Topic and cloud are ignored, just removes cloud from the server.
00092 int32 CLEAR=2
00093
00094
00095 ================================================================================
00096 MSG: sensor_msgs/PointCloud2
00097 # This message holds a collection of N-dimensional points, which may
00098 # contain additional information such as normals, intensity, etc. The
00099 # point data is stored as a binary blob, its layout described by the
00100 # contents of the "fields" array.
00101
00102 # The point cloud data may be organized 2d (image-like) or 1d
00103 # (unordered). Point clouds organized as 2d images may be produced by
00104 # camera depth sensors such as stereo or time-of-flight.
00105
00106 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00107 # points).
00108 Header header
00109
00110 # 2D structure of the point cloud. If the cloud is unordered, height is
00111 # 1 and width is the length of the point cloud.
00112 uint32 height
00113 uint32 width
00114
00115 # Describes the channels and their layout in the binary data blob.
00116 PointField[] fields
00117
00118 bool is_bigendian # Is this data bigendian?
00119 uint32 point_step # Length of a point in bytes
00120 uint32 row_step # Length of a row in bytes
00121 uint8[] data # Actual point data, size is (row_step*height)
00122
00123 bool is_dense # True if there are no invalid points
00124
00125 ================================================================================
00126 MSG: sensor_msgs/PointField
00127 # This message holds the description of one point entry in the
00128 # PointCloud2 message format.
00129 uint8 INT8 = 1
00130 uint8 UINT8 = 2
00131 uint8 INT16 = 3
00132 uint8 UINT16 = 4
00133 uint8 INT32 = 5
00134 uint8 UINT32 = 6
00135 uint8 FLOAT32 = 7
00136 uint8 FLOAT64 = 8
00137
00138 string name # Name of field
00139 uint32 offset # Offset from start of point struct
00140 uint8 datatype # Datatype enumeration, see above
00141 uint32 count # How many elements in the field
00142
00143 ================================================================================
00144 MSG: point_cloud_server/StoreCloudActionResult
00145 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00146
00147 Header header
00148 actionlib_msgs/GoalStatus status
00149 StoreCloudResult result
00150
00151 ================================================================================
00152 MSG: actionlib_msgs/GoalStatus
00153 GoalID goal_id
00154 uint8 status
00155 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00156 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00157 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00158 # and has since completed its execution (Terminal State)
00159 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00160 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00161 # to some failure (Terminal State)
00162 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00163 # because the goal was unattainable or invalid (Terminal State)
00164 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00165 # and has not yet completed execution
00166 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00167 # but the action server has not yet confirmed that the goal is canceled
00168 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00169 # and was successfully cancelled (Terminal State)
00170 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00171 # sent over the wire by an action server
00172
00173 #Allow for the user to associate a string with GoalStatus for debugging
00174 string text
00175
00176
00177 ================================================================================
00178 MSG: point_cloud_server/StoreCloudResult
00179 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00180
00181 # The cloud that was stored (if return_cloud was true)
00182 sensor_msgs/PointCloud2 cloud
00183
00184 # Any text that might be needed...
00185 int32 result
00186
00187 int32 SUCCESS = 0
00188 int32 NAME_ERROR = 1
00189 int32 TOPIC_ERROR = 2
00190 int32 TF_ERROR = 3
00191 int32 OTHER_ERROR = 4
00192
00193
00194 ================================================================================
00195 MSG: point_cloud_server/StoreCloudActionFeedback
00196 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00197
00198 Header header
00199 actionlib_msgs/GoalStatus status
00200 StoreCloudFeedback feedback
00201
00202 ================================================================================
00203 MSG: point_cloud_server/StoreCloudFeedback
00204 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00205
00206
00207 """
00208 __slots__ = ['action_goal','action_result','action_feedback']
00209 _slot_types = ['point_cloud_server/StoreCloudActionGoal','point_cloud_server/StoreCloudActionResult','point_cloud_server/StoreCloudActionFeedback']
00210
00211 def __init__(self, *args, **kwds):
00212 """
00213 Constructor. Any message fields that are implicitly/explicitly
00214 set to None will be assigned a default value. The recommend
00215 use is keyword arguments as this is more robust to future message
00216 changes. You cannot mix in-order arguments and keyword arguments.
00217
00218 The available fields are:
00219 action_goal,action_result,action_feedback
00220
00221 :param args: complete set of field values, in .msg order
00222 :param kwds: use keyword arguments corresponding to message field names
00223 to set specific fields.
00224 """
00225 if args or kwds:
00226 super(StoreCloudAction, self).__init__(*args, **kwds)
00227
00228 if self.action_goal is None:
00229 self.action_goal = point_cloud_server.msg.StoreCloudActionGoal()
00230 if self.action_result is None:
00231 self.action_result = point_cloud_server.msg.StoreCloudActionResult()
00232 if self.action_feedback is None:
00233 self.action_feedback = point_cloud_server.msg.StoreCloudActionFeedback()
00234 else:
00235 self.action_goal = point_cloud_server.msg.StoreCloudActionGoal()
00236 self.action_result = point_cloud_server.msg.StoreCloudActionResult()
00237 self.action_feedback = point_cloud_server.msg.StoreCloudActionFeedback()
00238
00239 def _get_types(self):
00240 """
00241 internal API method
00242 """
00243 return self._slot_types
00244
00245 def serialize(self, buff):
00246 """
00247 serialize message into buffer
00248 :param buff: buffer, ``StringIO``
00249 """
00250 try:
00251 _x = self
00252 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00253 _x = self.action_goal.header.frame_id
00254 length = len(_x)
00255 if python3 or type(_x) == unicode:
00256 _x = _x.encode('utf-8')
00257 length = len(_x)
00258 buff.write(struct.pack('<I%ss'%length, length, _x))
00259 _x = self
00260 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00261 _x = self.action_goal.goal_id.id
00262 length = len(_x)
00263 if python3 or type(_x) == unicode:
00264 _x = _x.encode('utf-8')
00265 length = len(_x)
00266 buff.write(struct.pack('<I%ss'%length, length, _x))
00267 _x = self.action_goal.goal.name
00268 length = len(_x)
00269 if python3 or type(_x) == unicode:
00270 _x = _x.encode('utf-8')
00271 length = len(_x)
00272 buff.write(struct.pack('<I%ss'%length, length, _x))
00273 _x = self.action_goal.goal.topic
00274 length = len(_x)
00275 if python3 or type(_x) == unicode:
00276 _x = _x.encode('utf-8')
00277 length = len(_x)
00278 buff.write(struct.pack('<I%ss'%length, length, _x))
00279 _x = self
00280 buff.write(_struct_3I.pack(_x.action_goal.goal.cloud.header.seq, _x.action_goal.goal.cloud.header.stamp.secs, _x.action_goal.goal.cloud.header.stamp.nsecs))
00281 _x = self.action_goal.goal.cloud.header.frame_id
00282 length = len(_x)
00283 if python3 or type(_x) == unicode:
00284 _x = _x.encode('utf-8')
00285 length = len(_x)
00286 buff.write(struct.pack('<I%ss'%length, length, _x))
00287 _x = self
00288 buff.write(_struct_2I.pack(_x.action_goal.goal.cloud.height, _x.action_goal.goal.cloud.width))
00289 length = len(self.action_goal.goal.cloud.fields)
00290 buff.write(_struct_I.pack(length))
00291 for val1 in self.action_goal.goal.cloud.fields:
00292 _x = val1.name
00293 length = len(_x)
00294 if python3 or type(_x) == unicode:
00295 _x = _x.encode('utf-8')
00296 length = len(_x)
00297 buff.write(struct.pack('<I%ss'%length, length, _x))
00298 _x = val1
00299 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00300 _x = self
00301 buff.write(_struct_B2I.pack(_x.action_goal.goal.cloud.is_bigendian, _x.action_goal.goal.cloud.point_step, _x.action_goal.goal.cloud.row_step))
00302 _x = self.action_goal.goal.cloud.data
00303 length = len(_x)
00304
00305 if type(_x) in [list, tuple]:
00306 buff.write(struct.pack('<I%sB'%length, length, *_x))
00307 else:
00308 buff.write(struct.pack('<I%ss'%length, length, _x))
00309 buff.write(_struct_B.pack(self.action_goal.goal.cloud.is_dense))
00310 _x = self.action_goal.goal.storage_frame_id
00311 length = len(_x)
00312 if python3 or type(_x) == unicode:
00313 _x = _x.encode('utf-8')
00314 length = len(_x)
00315 buff.write(struct.pack('<I%ss'%length, length, _x))
00316 _x = self.action_goal.goal.result_frame_id
00317 length = len(_x)
00318 if python3 or type(_x) == unicode:
00319 _x = _x.encode('utf-8')
00320 length = len(_x)
00321 buff.write(struct.pack('<I%ss'%length, length, _x))
00322 _x = self
00323 buff.write(_struct_i3I.pack(_x.action_goal.goal.action, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00324 _x = self.action_result.header.frame_id
00325 length = len(_x)
00326 if python3 or type(_x) == unicode:
00327 _x = _x.encode('utf-8')
00328 length = len(_x)
00329 buff.write(struct.pack('<I%ss'%length, length, _x))
00330 _x = self
00331 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00332 _x = self.action_result.status.goal_id.id
00333 length = len(_x)
00334 if python3 or type(_x) == unicode:
00335 _x = _x.encode('utf-8')
00336 length = len(_x)
00337 buff.write(struct.pack('<I%ss'%length, length, _x))
00338 buff.write(_struct_B.pack(self.action_result.status.status))
00339 _x = self.action_result.status.text
00340 length = len(_x)
00341 if python3 or type(_x) == unicode:
00342 _x = _x.encode('utf-8')
00343 length = len(_x)
00344 buff.write(struct.pack('<I%ss'%length, length, _x))
00345 _x = self
00346 buff.write(_struct_3I.pack(_x.action_result.result.cloud.header.seq, _x.action_result.result.cloud.header.stamp.secs, _x.action_result.result.cloud.header.stamp.nsecs))
00347 _x = self.action_result.result.cloud.header.frame_id
00348 length = len(_x)
00349 if python3 or type(_x) == unicode:
00350 _x = _x.encode('utf-8')
00351 length = len(_x)
00352 buff.write(struct.pack('<I%ss'%length, length, _x))
00353 _x = self
00354 buff.write(_struct_2I.pack(_x.action_result.result.cloud.height, _x.action_result.result.cloud.width))
00355 length = len(self.action_result.result.cloud.fields)
00356 buff.write(_struct_I.pack(length))
00357 for val1 in self.action_result.result.cloud.fields:
00358 _x = val1.name
00359 length = len(_x)
00360 if python3 or type(_x) == unicode:
00361 _x = _x.encode('utf-8')
00362 length = len(_x)
00363 buff.write(struct.pack('<I%ss'%length, length, _x))
00364 _x = val1
00365 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00366 _x = self
00367 buff.write(_struct_B2I.pack(_x.action_result.result.cloud.is_bigendian, _x.action_result.result.cloud.point_step, _x.action_result.result.cloud.row_step))
00368 _x = self.action_result.result.cloud.data
00369 length = len(_x)
00370
00371 if type(_x) in [list, tuple]:
00372 buff.write(struct.pack('<I%sB'%length, length, *_x))
00373 else:
00374 buff.write(struct.pack('<I%ss'%length, length, _x))
00375 _x = self
00376 buff.write(_struct_Bi3I.pack(_x.action_result.result.cloud.is_dense, _x.action_result.result.result, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00377 _x = self.action_feedback.header.frame_id
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = self
00384 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00385 _x = self.action_feedback.status.goal_id.id
00386 length = len(_x)
00387 if python3 or type(_x) == unicode:
00388 _x = _x.encode('utf-8')
00389 length = len(_x)
00390 buff.write(struct.pack('<I%ss'%length, length, _x))
00391 buff.write(_struct_B.pack(self.action_feedback.status.status))
00392 _x = self.action_feedback.status.text
00393 length = len(_x)
00394 if python3 or type(_x) == unicode:
00395 _x = _x.encode('utf-8')
00396 length = len(_x)
00397 buff.write(struct.pack('<I%ss'%length, length, _x))
00398 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00399 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00400
00401 def deserialize(self, str):
00402 """
00403 unpack serialized message in str into this message instance
00404 :param str: byte array of serialized message, ``str``
00405 """
00406 try:
00407 if self.action_goal is None:
00408 self.action_goal = point_cloud_server.msg.StoreCloudActionGoal()
00409 if self.action_result is None:
00410 self.action_result = point_cloud_server.msg.StoreCloudActionResult()
00411 if self.action_feedback is None:
00412 self.action_feedback = point_cloud_server.msg.StoreCloudActionFeedback()
00413 end = 0
00414 _x = self
00415 start = end
00416 end += 12
00417 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00418 start = end
00419 end += 4
00420 (length,) = _struct_I.unpack(str[start:end])
00421 start = end
00422 end += length
00423 if python3:
00424 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00425 else:
00426 self.action_goal.header.frame_id = str[start:end]
00427 _x = self
00428 start = end
00429 end += 8
00430 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.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 if python3:
00437 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00438 else:
00439 self.action_goal.goal_id.id = str[start:end]
00440 start = end
00441 end += 4
00442 (length,) = _struct_I.unpack(str[start:end])
00443 start = end
00444 end += length
00445 if python3:
00446 self.action_goal.goal.name = str[start:end].decode('utf-8')
00447 else:
00448 self.action_goal.goal.name = str[start:end]
00449 start = end
00450 end += 4
00451 (length,) = _struct_I.unpack(str[start:end])
00452 start = end
00453 end += length
00454 if python3:
00455 self.action_goal.goal.topic = str[start:end].decode('utf-8')
00456 else:
00457 self.action_goal.goal.topic = str[start:end]
00458 _x = self
00459 start = end
00460 end += 12
00461 (_x.action_goal.goal.cloud.header.seq, _x.action_goal.goal.cloud.header.stamp.secs, _x.action_goal.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00462 start = end
00463 end += 4
00464 (length,) = _struct_I.unpack(str[start:end])
00465 start = end
00466 end += length
00467 if python3:
00468 self.action_goal.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00469 else:
00470 self.action_goal.goal.cloud.header.frame_id = str[start:end]
00471 _x = self
00472 start = end
00473 end += 8
00474 (_x.action_goal.goal.cloud.height, _x.action_goal.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00475 start = end
00476 end += 4
00477 (length,) = _struct_I.unpack(str[start:end])
00478 self.action_goal.goal.cloud.fields = []
00479 for i in range(0, length):
00480 val1 = sensor_msgs.msg.PointField()
00481 start = end
00482 end += 4
00483 (length,) = _struct_I.unpack(str[start:end])
00484 start = end
00485 end += length
00486 if python3:
00487 val1.name = str[start:end].decode('utf-8')
00488 else:
00489 val1.name = str[start:end]
00490 _x = val1
00491 start = end
00492 end += 9
00493 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00494 self.action_goal.goal.cloud.fields.append(val1)
00495 _x = self
00496 start = end
00497 end += 9
00498 (_x.action_goal.goal.cloud.is_bigendian, _x.action_goal.goal.cloud.point_step, _x.action_goal.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00499 self.action_goal.goal.cloud.is_bigendian = bool(self.action_goal.goal.cloud.is_bigendian)
00500 start = end
00501 end += 4
00502 (length,) = _struct_I.unpack(str[start:end])
00503 start = end
00504 end += length
00505 self.action_goal.goal.cloud.data = str[start:end]
00506 start = end
00507 end += 1
00508 (self.action_goal.goal.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00509 self.action_goal.goal.cloud.is_dense = bool(self.action_goal.goal.cloud.is_dense)
00510 start = end
00511 end += 4
00512 (length,) = _struct_I.unpack(str[start:end])
00513 start = end
00514 end += length
00515 if python3:
00516 self.action_goal.goal.storage_frame_id = str[start:end].decode('utf-8')
00517 else:
00518 self.action_goal.goal.storage_frame_id = str[start:end]
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 start = end
00523 end += length
00524 if python3:
00525 self.action_goal.goal.result_frame_id = str[start:end].decode('utf-8')
00526 else:
00527 self.action_goal.goal.result_frame_id = str[start:end]
00528 _x = self
00529 start = end
00530 end += 16
00531 (_x.action_goal.goal.action, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00532 start = end
00533 end += 4
00534 (length,) = _struct_I.unpack(str[start:end])
00535 start = end
00536 end += length
00537 if python3:
00538 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00539 else:
00540 self.action_result.header.frame_id = str[start:end]
00541 _x = self
00542 start = end
00543 end += 8
00544 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00545 start = end
00546 end += 4
00547 (length,) = _struct_I.unpack(str[start:end])
00548 start = end
00549 end += length
00550 if python3:
00551 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00552 else:
00553 self.action_result.status.goal_id.id = str[start:end]
00554 start = end
00555 end += 1
00556 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00557 start = end
00558 end += 4
00559 (length,) = _struct_I.unpack(str[start:end])
00560 start = end
00561 end += length
00562 if python3:
00563 self.action_result.status.text = str[start:end].decode('utf-8')
00564 else:
00565 self.action_result.status.text = str[start:end]
00566 _x = self
00567 start = end
00568 end += 12
00569 (_x.action_result.result.cloud.header.seq, _x.action_result.result.cloud.header.stamp.secs, _x.action_result.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00570 start = end
00571 end += 4
00572 (length,) = _struct_I.unpack(str[start:end])
00573 start = end
00574 end += length
00575 if python3:
00576 self.action_result.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00577 else:
00578 self.action_result.result.cloud.header.frame_id = str[start:end]
00579 _x = self
00580 start = end
00581 end += 8
00582 (_x.action_result.result.cloud.height, _x.action_result.result.cloud.width,) = _struct_2I.unpack(str[start:end])
00583 start = end
00584 end += 4
00585 (length,) = _struct_I.unpack(str[start:end])
00586 self.action_result.result.cloud.fields = []
00587 for i in range(0, length):
00588 val1 = sensor_msgs.msg.PointField()
00589 start = end
00590 end += 4
00591 (length,) = _struct_I.unpack(str[start:end])
00592 start = end
00593 end += length
00594 if python3:
00595 val1.name = str[start:end].decode('utf-8')
00596 else:
00597 val1.name = str[start:end]
00598 _x = val1
00599 start = end
00600 end += 9
00601 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00602 self.action_result.result.cloud.fields.append(val1)
00603 _x = self
00604 start = end
00605 end += 9
00606 (_x.action_result.result.cloud.is_bigendian, _x.action_result.result.cloud.point_step, _x.action_result.result.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00607 self.action_result.result.cloud.is_bigendian = bool(self.action_result.result.cloud.is_bigendian)
00608 start = end
00609 end += 4
00610 (length,) = _struct_I.unpack(str[start:end])
00611 start = end
00612 end += length
00613 self.action_result.result.cloud.data = str[start:end]
00614 _x = self
00615 start = end
00616 end += 17
00617 (_x.action_result.result.cloud.is_dense, _x.action_result.result.result, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_Bi3I.unpack(str[start:end])
00618 self.action_result.result.cloud.is_dense = bool(self.action_result.result.cloud.is_dense)
00619 start = end
00620 end += 4
00621 (length,) = _struct_I.unpack(str[start:end])
00622 start = end
00623 end += length
00624 if python3:
00625 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00626 else:
00627 self.action_feedback.header.frame_id = str[start:end]
00628 _x = self
00629 start = end
00630 end += 8
00631 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00632 start = end
00633 end += 4
00634 (length,) = _struct_I.unpack(str[start:end])
00635 start = end
00636 end += length
00637 if python3:
00638 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00639 else:
00640 self.action_feedback.status.goal_id.id = str[start:end]
00641 start = end
00642 end += 1
00643 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00644 start = end
00645 end += 4
00646 (length,) = _struct_I.unpack(str[start:end])
00647 start = end
00648 end += length
00649 if python3:
00650 self.action_feedback.status.text = str[start:end].decode('utf-8')
00651 else:
00652 self.action_feedback.status.text = str[start:end]
00653 return self
00654 except struct.error as e:
00655 raise genpy.DeserializationError(e)
00656
00657
00658 def serialize_numpy(self, buff, numpy):
00659 """
00660 serialize message with numpy array types into buffer
00661 :param buff: buffer, ``StringIO``
00662 :param numpy: numpy python module
00663 """
00664 try:
00665 _x = self
00666 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00667 _x = self.action_goal.header.frame_id
00668 length = len(_x)
00669 if python3 or type(_x) == unicode:
00670 _x = _x.encode('utf-8')
00671 length = len(_x)
00672 buff.write(struct.pack('<I%ss'%length, length, _x))
00673 _x = self
00674 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00675 _x = self.action_goal.goal_id.id
00676 length = len(_x)
00677 if python3 or type(_x) == unicode:
00678 _x = _x.encode('utf-8')
00679 length = len(_x)
00680 buff.write(struct.pack('<I%ss'%length, length, _x))
00681 _x = self.action_goal.goal.name
00682 length = len(_x)
00683 if python3 or type(_x) == unicode:
00684 _x = _x.encode('utf-8')
00685 length = len(_x)
00686 buff.write(struct.pack('<I%ss'%length, length, _x))
00687 _x = self.action_goal.goal.topic
00688 length = len(_x)
00689 if python3 or type(_x) == unicode:
00690 _x = _x.encode('utf-8')
00691 length = len(_x)
00692 buff.write(struct.pack('<I%ss'%length, length, _x))
00693 _x = self
00694 buff.write(_struct_3I.pack(_x.action_goal.goal.cloud.header.seq, _x.action_goal.goal.cloud.header.stamp.secs, _x.action_goal.goal.cloud.header.stamp.nsecs))
00695 _x = self.action_goal.goal.cloud.header.frame_id
00696 length = len(_x)
00697 if python3 or type(_x) == unicode:
00698 _x = _x.encode('utf-8')
00699 length = len(_x)
00700 buff.write(struct.pack('<I%ss'%length, length, _x))
00701 _x = self
00702 buff.write(_struct_2I.pack(_x.action_goal.goal.cloud.height, _x.action_goal.goal.cloud.width))
00703 length = len(self.action_goal.goal.cloud.fields)
00704 buff.write(_struct_I.pack(length))
00705 for val1 in self.action_goal.goal.cloud.fields:
00706 _x = val1.name
00707 length = len(_x)
00708 if python3 or type(_x) == unicode:
00709 _x = _x.encode('utf-8')
00710 length = len(_x)
00711 buff.write(struct.pack('<I%ss'%length, length, _x))
00712 _x = val1
00713 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00714 _x = self
00715 buff.write(_struct_B2I.pack(_x.action_goal.goal.cloud.is_bigendian, _x.action_goal.goal.cloud.point_step, _x.action_goal.goal.cloud.row_step))
00716 _x = self.action_goal.goal.cloud.data
00717 length = len(_x)
00718
00719 if type(_x) in [list, tuple]:
00720 buff.write(struct.pack('<I%sB'%length, length, *_x))
00721 else:
00722 buff.write(struct.pack('<I%ss'%length, length, _x))
00723 buff.write(_struct_B.pack(self.action_goal.goal.cloud.is_dense))
00724 _x = self.action_goal.goal.storage_frame_id
00725 length = len(_x)
00726 if python3 or type(_x) == unicode:
00727 _x = _x.encode('utf-8')
00728 length = len(_x)
00729 buff.write(struct.pack('<I%ss'%length, length, _x))
00730 _x = self.action_goal.goal.result_frame_id
00731 length = len(_x)
00732 if python3 or type(_x) == unicode:
00733 _x = _x.encode('utf-8')
00734 length = len(_x)
00735 buff.write(struct.pack('<I%ss'%length, length, _x))
00736 _x = self
00737 buff.write(_struct_i3I.pack(_x.action_goal.goal.action, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00738 _x = self.action_result.header.frame_id
00739 length = len(_x)
00740 if python3 or type(_x) == unicode:
00741 _x = _x.encode('utf-8')
00742 length = len(_x)
00743 buff.write(struct.pack('<I%ss'%length, length, _x))
00744 _x = self
00745 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00746 _x = self.action_result.status.goal_id.id
00747 length = len(_x)
00748 if python3 or type(_x) == unicode:
00749 _x = _x.encode('utf-8')
00750 length = len(_x)
00751 buff.write(struct.pack('<I%ss'%length, length, _x))
00752 buff.write(_struct_B.pack(self.action_result.status.status))
00753 _x = self.action_result.status.text
00754 length = len(_x)
00755 if python3 or type(_x) == unicode:
00756 _x = _x.encode('utf-8')
00757 length = len(_x)
00758 buff.write(struct.pack('<I%ss'%length, length, _x))
00759 _x = self
00760 buff.write(_struct_3I.pack(_x.action_result.result.cloud.header.seq, _x.action_result.result.cloud.header.stamp.secs, _x.action_result.result.cloud.header.stamp.nsecs))
00761 _x = self.action_result.result.cloud.header.frame_id
00762 length = len(_x)
00763 if python3 or type(_x) == unicode:
00764 _x = _x.encode('utf-8')
00765 length = len(_x)
00766 buff.write(struct.pack('<I%ss'%length, length, _x))
00767 _x = self
00768 buff.write(_struct_2I.pack(_x.action_result.result.cloud.height, _x.action_result.result.cloud.width))
00769 length = len(self.action_result.result.cloud.fields)
00770 buff.write(_struct_I.pack(length))
00771 for val1 in self.action_result.result.cloud.fields:
00772 _x = val1.name
00773 length = len(_x)
00774 if python3 or type(_x) == unicode:
00775 _x = _x.encode('utf-8')
00776 length = len(_x)
00777 buff.write(struct.pack('<I%ss'%length, length, _x))
00778 _x = val1
00779 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00780 _x = self
00781 buff.write(_struct_B2I.pack(_x.action_result.result.cloud.is_bigendian, _x.action_result.result.cloud.point_step, _x.action_result.result.cloud.row_step))
00782 _x = self.action_result.result.cloud.data
00783 length = len(_x)
00784
00785 if type(_x) in [list, tuple]:
00786 buff.write(struct.pack('<I%sB'%length, length, *_x))
00787 else:
00788 buff.write(struct.pack('<I%ss'%length, length, _x))
00789 _x = self
00790 buff.write(_struct_Bi3I.pack(_x.action_result.result.cloud.is_dense, _x.action_result.result.result, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00791 _x = self.action_feedback.header.frame_id
00792 length = len(_x)
00793 if python3 or type(_x) == unicode:
00794 _x = _x.encode('utf-8')
00795 length = len(_x)
00796 buff.write(struct.pack('<I%ss'%length, length, _x))
00797 _x = self
00798 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00799 _x = self.action_feedback.status.goal_id.id
00800 length = len(_x)
00801 if python3 or type(_x) == unicode:
00802 _x = _x.encode('utf-8')
00803 length = len(_x)
00804 buff.write(struct.pack('<I%ss'%length, length, _x))
00805 buff.write(_struct_B.pack(self.action_feedback.status.status))
00806 _x = self.action_feedback.status.text
00807 length = len(_x)
00808 if python3 or type(_x) == unicode:
00809 _x = _x.encode('utf-8')
00810 length = len(_x)
00811 buff.write(struct.pack('<I%ss'%length, length, _x))
00812 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00813 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00814
00815 def deserialize_numpy(self, str, numpy):
00816 """
00817 unpack serialized message in str into this message instance using numpy for array types
00818 :param str: byte array of serialized message, ``str``
00819 :param numpy: numpy python module
00820 """
00821 try:
00822 if self.action_goal is None:
00823 self.action_goal = point_cloud_server.msg.StoreCloudActionGoal()
00824 if self.action_result is None:
00825 self.action_result = point_cloud_server.msg.StoreCloudActionResult()
00826 if self.action_feedback is None:
00827 self.action_feedback = point_cloud_server.msg.StoreCloudActionFeedback()
00828 end = 0
00829 _x = self
00830 start = end
00831 end += 12
00832 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00833 start = end
00834 end += 4
00835 (length,) = _struct_I.unpack(str[start:end])
00836 start = end
00837 end += length
00838 if python3:
00839 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00840 else:
00841 self.action_goal.header.frame_id = str[start:end]
00842 _x = self
00843 start = end
00844 end += 8
00845 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00846 start = end
00847 end += 4
00848 (length,) = _struct_I.unpack(str[start:end])
00849 start = end
00850 end += length
00851 if python3:
00852 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00853 else:
00854 self.action_goal.goal_id.id = str[start:end]
00855 start = end
00856 end += 4
00857 (length,) = _struct_I.unpack(str[start:end])
00858 start = end
00859 end += length
00860 if python3:
00861 self.action_goal.goal.name = str[start:end].decode('utf-8')
00862 else:
00863 self.action_goal.goal.name = str[start:end]
00864 start = end
00865 end += 4
00866 (length,) = _struct_I.unpack(str[start:end])
00867 start = end
00868 end += length
00869 if python3:
00870 self.action_goal.goal.topic = str[start:end].decode('utf-8')
00871 else:
00872 self.action_goal.goal.topic = str[start:end]
00873 _x = self
00874 start = end
00875 end += 12
00876 (_x.action_goal.goal.cloud.header.seq, _x.action_goal.goal.cloud.header.stamp.secs, _x.action_goal.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00877 start = end
00878 end += 4
00879 (length,) = _struct_I.unpack(str[start:end])
00880 start = end
00881 end += length
00882 if python3:
00883 self.action_goal.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00884 else:
00885 self.action_goal.goal.cloud.header.frame_id = str[start:end]
00886 _x = self
00887 start = end
00888 end += 8
00889 (_x.action_goal.goal.cloud.height, _x.action_goal.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00890 start = end
00891 end += 4
00892 (length,) = _struct_I.unpack(str[start:end])
00893 self.action_goal.goal.cloud.fields = []
00894 for i in range(0, length):
00895 val1 = sensor_msgs.msg.PointField()
00896 start = end
00897 end += 4
00898 (length,) = _struct_I.unpack(str[start:end])
00899 start = end
00900 end += length
00901 if python3:
00902 val1.name = str[start:end].decode('utf-8')
00903 else:
00904 val1.name = str[start:end]
00905 _x = val1
00906 start = end
00907 end += 9
00908 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00909 self.action_goal.goal.cloud.fields.append(val1)
00910 _x = self
00911 start = end
00912 end += 9
00913 (_x.action_goal.goal.cloud.is_bigendian, _x.action_goal.goal.cloud.point_step, _x.action_goal.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00914 self.action_goal.goal.cloud.is_bigendian = bool(self.action_goal.goal.cloud.is_bigendian)
00915 start = end
00916 end += 4
00917 (length,) = _struct_I.unpack(str[start:end])
00918 start = end
00919 end += length
00920 self.action_goal.goal.cloud.data = str[start:end]
00921 start = end
00922 end += 1
00923 (self.action_goal.goal.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00924 self.action_goal.goal.cloud.is_dense = bool(self.action_goal.goal.cloud.is_dense)
00925 start = end
00926 end += 4
00927 (length,) = _struct_I.unpack(str[start:end])
00928 start = end
00929 end += length
00930 if python3:
00931 self.action_goal.goal.storage_frame_id = str[start:end].decode('utf-8')
00932 else:
00933 self.action_goal.goal.storage_frame_id = str[start:end]
00934 start = end
00935 end += 4
00936 (length,) = _struct_I.unpack(str[start:end])
00937 start = end
00938 end += length
00939 if python3:
00940 self.action_goal.goal.result_frame_id = str[start:end].decode('utf-8')
00941 else:
00942 self.action_goal.goal.result_frame_id = str[start:end]
00943 _x = self
00944 start = end
00945 end += 16
00946 (_x.action_goal.goal.action, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00947 start = end
00948 end += 4
00949 (length,) = _struct_I.unpack(str[start:end])
00950 start = end
00951 end += length
00952 if python3:
00953 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00954 else:
00955 self.action_result.header.frame_id = str[start:end]
00956 _x = self
00957 start = end
00958 end += 8
00959 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00960 start = end
00961 end += 4
00962 (length,) = _struct_I.unpack(str[start:end])
00963 start = end
00964 end += length
00965 if python3:
00966 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00967 else:
00968 self.action_result.status.goal_id.id = str[start:end]
00969 start = end
00970 end += 1
00971 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00972 start = end
00973 end += 4
00974 (length,) = _struct_I.unpack(str[start:end])
00975 start = end
00976 end += length
00977 if python3:
00978 self.action_result.status.text = str[start:end].decode('utf-8')
00979 else:
00980 self.action_result.status.text = str[start:end]
00981 _x = self
00982 start = end
00983 end += 12
00984 (_x.action_result.result.cloud.header.seq, _x.action_result.result.cloud.header.stamp.secs, _x.action_result.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00985 start = end
00986 end += 4
00987 (length,) = _struct_I.unpack(str[start:end])
00988 start = end
00989 end += length
00990 if python3:
00991 self.action_result.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00992 else:
00993 self.action_result.result.cloud.header.frame_id = str[start:end]
00994 _x = self
00995 start = end
00996 end += 8
00997 (_x.action_result.result.cloud.height, _x.action_result.result.cloud.width,) = _struct_2I.unpack(str[start:end])
00998 start = end
00999 end += 4
01000 (length,) = _struct_I.unpack(str[start:end])
01001 self.action_result.result.cloud.fields = []
01002 for i in range(0, length):
01003 val1 = sensor_msgs.msg.PointField()
01004 start = end
01005 end += 4
01006 (length,) = _struct_I.unpack(str[start:end])
01007 start = end
01008 end += length
01009 if python3:
01010 val1.name = str[start:end].decode('utf-8')
01011 else:
01012 val1.name = str[start:end]
01013 _x = val1
01014 start = end
01015 end += 9
01016 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01017 self.action_result.result.cloud.fields.append(val1)
01018 _x = self
01019 start = end
01020 end += 9
01021 (_x.action_result.result.cloud.is_bigendian, _x.action_result.result.cloud.point_step, _x.action_result.result.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
01022 self.action_result.result.cloud.is_bigendian = bool(self.action_result.result.cloud.is_bigendian)
01023 start = end
01024 end += 4
01025 (length,) = _struct_I.unpack(str[start:end])
01026 start = end
01027 end += length
01028 self.action_result.result.cloud.data = str[start:end]
01029 _x = self
01030 start = end
01031 end += 17
01032 (_x.action_result.result.cloud.is_dense, _x.action_result.result.result, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_Bi3I.unpack(str[start:end])
01033 self.action_result.result.cloud.is_dense = bool(self.action_result.result.cloud.is_dense)
01034 start = end
01035 end += 4
01036 (length,) = _struct_I.unpack(str[start:end])
01037 start = end
01038 end += length
01039 if python3:
01040 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
01041 else:
01042 self.action_feedback.header.frame_id = str[start:end]
01043 _x = self
01044 start = end
01045 end += 8
01046 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
01047 start = end
01048 end += 4
01049 (length,) = _struct_I.unpack(str[start:end])
01050 start = end
01051 end += length
01052 if python3:
01053 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
01054 else:
01055 self.action_feedback.status.goal_id.id = str[start:end]
01056 start = end
01057 end += 1
01058 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
01059 start = end
01060 end += 4
01061 (length,) = _struct_I.unpack(str[start:end])
01062 start = end
01063 end += length
01064 if python3:
01065 self.action_feedback.status.text = str[start:end].decode('utf-8')
01066 else:
01067 self.action_feedback.status.text = str[start:end]
01068 return self
01069 except struct.error as e:
01070 raise genpy.DeserializationError(e)
01071
01072 _struct_I = genpy.struct_I
01073 _struct_IBI = struct.Struct("<IBI")
01074 _struct_B = struct.Struct("<B")
01075 _struct_i3I = struct.Struct("<i3I")
01076 _struct_3I = struct.Struct("<3I")
01077 _struct_B2I = struct.Struct("<B2I")
01078 _struct_Bi3I = struct.Struct("<Bi3I")
01079 _struct_2I = struct.Struct("<2I")