$search
00001 """autogenerated by genmsg_py from GetSnapshotActionFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_tilt_laser_interface.msg 00006 import sensor_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class GetSnapshotActionFeedback(roslib.message.Message): 00012 _md5sum = "7e4d330d40a18bf66084a10cc1648970" 00013 _type = "pr2_tilt_laser_interface/GetSnapshotActionFeedback" 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/GoalStatus status 00019 GetSnapshotFeedback feedback 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/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: pr2_tilt_laser_interface/GetSnapshotFeedback 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 # Feedback 00082 sensor_msgs/PointCloud2 cloud 00083 00084 00085 00086 ================================================================================ 00087 MSG: sensor_msgs/PointCloud2 00088 # This message holds a collection of N-dimensional points, which may 00089 # contain additional information such as normals, intensity, etc. The 00090 # point data is stored as a binary blob, its layout described by the 00091 # contents of the "fields" array. 00092 00093 # The point cloud data may be organized 2d (image-like) or 1d 00094 # (unordered). Point clouds organized as 2d images may be produced by 00095 # camera depth sensors such as stereo or time-of-flight. 00096 00097 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00098 # points). 00099 Header header 00100 00101 # 2D structure of the point cloud. If the cloud is unordered, height is 00102 # 1 and width is the length of the point cloud. 00103 uint32 height 00104 uint32 width 00105 00106 # Describes the channels and their layout in the binary data blob. 00107 PointField[] fields 00108 00109 bool is_bigendian # Is this data bigendian? 00110 uint32 point_step # Length of a point in bytes 00111 uint32 row_step # Length of a row in bytes 00112 uint8[] data # Actual point data, size is (row_step*height) 00113 00114 bool is_dense # True if there are no invalid points 00115 00116 ================================================================================ 00117 MSG: sensor_msgs/PointField 00118 # This message holds the description of one point entry in the 00119 # PointCloud2 message format. 00120 uint8 INT8 = 1 00121 uint8 UINT8 = 2 00122 uint8 INT16 = 3 00123 uint8 UINT16 = 4 00124 uint8 INT32 = 5 00125 uint8 UINT32 = 6 00126 uint8 FLOAT32 = 7 00127 uint8 FLOAT64 = 8 00128 00129 string name # Name of field 00130 uint32 offset # Offset from start of point struct 00131 uint8 datatype # Datatype enumeration, see above 00132 uint32 count # How many elements in the field 00133 00134 """ 00135 __slots__ = ['header','status','feedback'] 00136 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_tilt_laser_interface/GetSnapshotFeedback'] 00137 00138 def __init__(self, *args, **kwds): 00139 """ 00140 Constructor. Any message fields that are implicitly/explicitly 00141 set to None will be assigned a default value. The recommend 00142 use is keyword arguments as this is more robust to future message 00143 changes. You cannot mix in-order arguments and keyword arguments. 00144 00145 The available fields are: 00146 header,status,feedback 00147 00148 @param args: complete set of field values, in .msg order 00149 @param kwds: use keyword arguments corresponding to message field names 00150 to set specific fields. 00151 """ 00152 if args or kwds: 00153 super(GetSnapshotActionFeedback, self).__init__(*args, **kwds) 00154 #message fields cannot be None, assign default values for those that are 00155 if self.header is None: 00156 self.header = std_msgs.msg._Header.Header() 00157 if self.status is None: 00158 self.status = actionlib_msgs.msg.GoalStatus() 00159 if self.feedback is None: 00160 self.feedback = pr2_tilt_laser_interface.msg.GetSnapshotFeedback() 00161 else: 00162 self.header = std_msgs.msg._Header.Header() 00163 self.status = actionlib_msgs.msg.GoalStatus() 00164 self.feedback = pr2_tilt_laser_interface.msg.GetSnapshotFeedback() 00165 00166 def _get_types(self): 00167 """ 00168 internal API method 00169 """ 00170 return self._slot_types 00171 00172 def serialize(self, buff): 00173 """ 00174 serialize message into buffer 00175 @param buff: buffer 00176 @type buff: StringIO 00177 """ 00178 try: 00179 _x = self 00180 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00181 _x = self.header.frame_id 00182 length = len(_x) 00183 buff.write(struct.pack('<I%ss'%length, length, _x)) 00184 _x = self 00185 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00186 _x = self.status.goal_id.id 00187 length = len(_x) 00188 buff.write(struct.pack('<I%ss'%length, length, _x)) 00189 buff.write(_struct_B.pack(self.status.status)) 00190 _x = self.status.text 00191 length = len(_x) 00192 buff.write(struct.pack('<I%ss'%length, length, _x)) 00193 _x = self 00194 buff.write(_struct_3I.pack(_x.feedback.cloud.header.seq, _x.feedback.cloud.header.stamp.secs, _x.feedback.cloud.header.stamp.nsecs)) 00195 _x = self.feedback.cloud.header.frame_id 00196 length = len(_x) 00197 buff.write(struct.pack('<I%ss'%length, length, _x)) 00198 _x = self 00199 buff.write(_struct_2I.pack(_x.feedback.cloud.height, _x.feedback.cloud.width)) 00200 length = len(self.feedback.cloud.fields) 00201 buff.write(_struct_I.pack(length)) 00202 for val1 in self.feedback.cloud.fields: 00203 _x = val1.name 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = val1 00207 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00208 _x = self 00209 buff.write(_struct_B2I.pack(_x.feedback.cloud.is_bigendian, _x.feedback.cloud.point_step, _x.feedback.cloud.row_step)) 00210 _x = self.feedback.cloud.data 00211 length = len(_x) 00212 # - if encoded as a list instead, serialize as bytes instead of string 00213 if type(_x) in [list, tuple]: 00214 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00215 else: 00216 buff.write(struct.pack('<I%ss'%length, length, _x)) 00217 buff.write(_struct_B.pack(self.feedback.cloud.is_dense)) 00218 except struct.error as se: self._check_types(se) 00219 except TypeError as te: self._check_types(te) 00220 00221 def deserialize(self, str): 00222 """ 00223 unpack serialized message in str into this message instance 00224 @param str: byte array of serialized message 00225 @type str: str 00226 """ 00227 try: 00228 if self.header is None: 00229 self.header = std_msgs.msg._Header.Header() 00230 if self.status is None: 00231 self.status = actionlib_msgs.msg.GoalStatus() 00232 if self.feedback is None: 00233 self.feedback = pr2_tilt_laser_interface.msg.GetSnapshotFeedback() 00234 end = 0 00235 _x = self 00236 start = end 00237 end += 12 00238 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 start = end 00243 end += length 00244 self.header.frame_id = str[start:end] 00245 _x = self 00246 start = end 00247 end += 8 00248 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 start = end 00253 end += length 00254 self.status.goal_id.id = str[start:end] 00255 start = end 00256 end += 1 00257 (self.status.status,) = _struct_B.unpack(str[start:end]) 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 start = end 00262 end += length 00263 self.status.text = str[start:end] 00264 _x = self 00265 start = end 00266 end += 12 00267 (_x.feedback.cloud.header.seq, _x.feedback.cloud.header.stamp.secs, _x.feedback.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 start = end 00272 end += length 00273 self.feedback.cloud.header.frame_id = str[start:end] 00274 _x = self 00275 start = end 00276 end += 8 00277 (_x.feedback.cloud.height, _x.feedback.cloud.width,) = _struct_2I.unpack(str[start:end]) 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 self.feedback.cloud.fields = [] 00282 for i in range(0, length): 00283 val1 = sensor_msgs.msg.PointField() 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 start = end 00288 end += length 00289 val1.name = str[start:end] 00290 _x = val1 00291 start = end 00292 end += 9 00293 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00294 self.feedback.cloud.fields.append(val1) 00295 _x = self 00296 start = end 00297 end += 9 00298 (_x.feedback.cloud.is_bigendian, _x.feedback.cloud.point_step, _x.feedback.cloud.row_step,) = _struct_B2I.unpack(str[start:end]) 00299 self.feedback.cloud.is_bigendian = bool(self.feedback.cloud.is_bigendian) 00300 start = end 00301 end += 4 00302 (length,) = _struct_I.unpack(str[start:end]) 00303 start = end 00304 end += length 00305 self.feedback.cloud.data = str[start:end] 00306 start = end 00307 end += 1 00308 (self.feedback.cloud.is_dense,) = _struct_B.unpack(str[start:end]) 00309 self.feedback.cloud.is_dense = bool(self.feedback.cloud.is_dense) 00310 return self 00311 except struct.error as e: 00312 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00313 00314 00315 def serialize_numpy(self, buff, numpy): 00316 """ 00317 serialize message with numpy array types into buffer 00318 @param buff: buffer 00319 @type buff: StringIO 00320 @param numpy: numpy python module 00321 @type numpy module 00322 """ 00323 try: 00324 _x = self 00325 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00326 _x = self.header.frame_id 00327 length = len(_x) 00328 buff.write(struct.pack('<I%ss'%length, length, _x)) 00329 _x = self 00330 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00331 _x = self.status.goal_id.id 00332 length = len(_x) 00333 buff.write(struct.pack('<I%ss'%length, length, _x)) 00334 buff.write(_struct_B.pack(self.status.status)) 00335 _x = self.status.text 00336 length = len(_x) 00337 buff.write(struct.pack('<I%ss'%length, length, _x)) 00338 _x = self 00339 buff.write(_struct_3I.pack(_x.feedback.cloud.header.seq, _x.feedback.cloud.header.stamp.secs, _x.feedback.cloud.header.stamp.nsecs)) 00340 _x = self.feedback.cloud.header.frame_id 00341 length = len(_x) 00342 buff.write(struct.pack('<I%ss'%length, length, _x)) 00343 _x = self 00344 buff.write(_struct_2I.pack(_x.feedback.cloud.height, _x.feedback.cloud.width)) 00345 length = len(self.feedback.cloud.fields) 00346 buff.write(_struct_I.pack(length)) 00347 for val1 in self.feedback.cloud.fields: 00348 _x = val1.name 00349 length = len(_x) 00350 buff.write(struct.pack('<I%ss'%length, length, _x)) 00351 _x = val1 00352 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00353 _x = self 00354 buff.write(_struct_B2I.pack(_x.feedback.cloud.is_bigendian, _x.feedback.cloud.point_step, _x.feedback.cloud.row_step)) 00355 _x = self.feedback.cloud.data 00356 length = len(_x) 00357 # - if encoded as a list instead, serialize as bytes instead of string 00358 if type(_x) in [list, tuple]: 00359 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00360 else: 00361 buff.write(struct.pack('<I%ss'%length, length, _x)) 00362 buff.write(_struct_B.pack(self.feedback.cloud.is_dense)) 00363 except struct.error as se: self._check_types(se) 00364 except TypeError as te: self._check_types(te) 00365 00366 def deserialize_numpy(self, str, numpy): 00367 """ 00368 unpack serialized message in str into this message instance using numpy for array types 00369 @param str: byte array of serialized message 00370 @type str: str 00371 @param numpy: numpy python module 00372 @type numpy: module 00373 """ 00374 try: 00375 if self.header is None: 00376 self.header = std_msgs.msg._Header.Header() 00377 if self.status is None: 00378 self.status = actionlib_msgs.msg.GoalStatus() 00379 if self.feedback is None: 00380 self.feedback = pr2_tilt_laser_interface.msg.GetSnapshotFeedback() 00381 end = 0 00382 _x = self 00383 start = end 00384 end += 12 00385 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(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.header.frame_id = str[start:end] 00392 _x = self 00393 start = end 00394 end += 8 00395 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00396 start = end 00397 end += 4 00398 (length,) = _struct_I.unpack(str[start:end]) 00399 start = end 00400 end += length 00401 self.status.goal_id.id = str[start:end] 00402 start = end 00403 end += 1 00404 (self.status.status,) = _struct_B.unpack(str[start:end]) 00405 start = end 00406 end += 4 00407 (length,) = _struct_I.unpack(str[start:end]) 00408 start = end 00409 end += length 00410 self.status.text = str[start:end] 00411 _x = self 00412 start = end 00413 end += 12 00414 (_x.feedback.cloud.header.seq, _x.feedback.cloud.header.stamp.secs, _x.feedback.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00415 start = end 00416 end += 4 00417 (length,) = _struct_I.unpack(str[start:end]) 00418 start = end 00419 end += length 00420 self.feedback.cloud.header.frame_id = str[start:end] 00421 _x = self 00422 start = end 00423 end += 8 00424 (_x.feedback.cloud.height, _x.feedback.cloud.width,) = _struct_2I.unpack(str[start:end]) 00425 start = end 00426 end += 4 00427 (length,) = _struct_I.unpack(str[start:end]) 00428 self.feedback.cloud.fields = [] 00429 for i in range(0, length): 00430 val1 = sensor_msgs.msg.PointField() 00431 start = end 00432 end += 4 00433 (length,) = _struct_I.unpack(str[start:end]) 00434 start = end 00435 end += length 00436 val1.name = str[start:end] 00437 _x = val1 00438 start = end 00439 end += 9 00440 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00441 self.feedback.cloud.fields.append(val1) 00442 _x = self 00443 start = end 00444 end += 9 00445 (_x.feedback.cloud.is_bigendian, _x.feedback.cloud.point_step, _x.feedback.cloud.row_step,) = _struct_B2I.unpack(str[start:end]) 00446 self.feedback.cloud.is_bigendian = bool(self.feedback.cloud.is_bigendian) 00447 start = end 00448 end += 4 00449 (length,) = _struct_I.unpack(str[start:end]) 00450 start = end 00451 end += length 00452 self.feedback.cloud.data = str[start:end] 00453 start = end 00454 end += 1 00455 (self.feedback.cloud.is_dense,) = _struct_B.unpack(str[start:end]) 00456 self.feedback.cloud.is_dense = bool(self.feedback.cloud.is_dense) 00457 return self 00458 except struct.error as e: 00459 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00460 00461 _struct_I = roslib.message.struct_I 00462 _struct_IBI = struct.Struct("<IBI") 00463 _struct_3I = struct.Struct("<3I") 00464 _struct_B = struct.Struct("<B") 00465 _struct_2I = struct.Struct("<2I") 00466 _struct_B2I = struct.Struct("<B2I")