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