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