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