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