$search
00001 """autogenerated by genmsg_py from FollowPathActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import nav_msgs.msg 00006 import nao_msgs.msg 00007 import actionlib_msgs.msg 00008 import geometry_msgs.msg 00009 import roslib.rostime 00010 import std_msgs.msg 00011 00012 class FollowPathActionGoal(roslib.message.Message): 00013 _md5sum = "fd6a86de9a61df23ce19e20d45649f18" 00014 _type = "nao_msgs/FollowPathActionGoal" 00015 _has_header = True #flag to mark the presence of a Header object 00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00017 00018 Header header 00019 actionlib_msgs/GoalID goal_id 00020 FollowPathGoal goal 00021 00022 ================================================================================ 00023 MSG: std_msgs/Header 00024 # Standard metadata for higher-level stamped data types. 00025 # This is generally used to communicate timestamped data 00026 # in a particular coordinate frame. 00027 # 00028 # sequence ID: consecutively increasing ID 00029 uint32 seq 00030 #Two-integer timestamp that is expressed as: 00031 # * stamp.secs: seconds (stamp_secs) since epoch 00032 # * stamp.nsecs: nanoseconds since stamp_secs 00033 # time-handling sugar is provided by the client library 00034 time stamp 00035 #Frame this data is associated with 00036 # 0: no frame 00037 # 1: global frame 00038 string frame_id 00039 00040 ================================================================================ 00041 MSG: actionlib_msgs/GoalID 00042 # The stamp should store the time at which this goal was requested. 00043 # It is used by an action server when it tries to preempt all 00044 # goals that were requested before a certain time 00045 time stamp 00046 00047 # The id provides a way to associate feedback and 00048 # result message with specific goal requests. The id 00049 # specified must be unique. 00050 string id 00051 00052 00053 ================================================================================ 00054 MSG: nao_msgs/FollowPathGoal 00055 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00056 # goal: a path to follow 00057 nav_msgs/Path path 00058 00059 ================================================================================ 00060 MSG: nav_msgs/Path 00061 #An array of poses that represents a Path for a robot to follow 00062 Header header 00063 geometry_msgs/PoseStamped[] poses 00064 00065 ================================================================================ 00066 MSG: geometry_msgs/PoseStamped 00067 # A Pose with reference coordinate frame and timestamp 00068 Header header 00069 Pose pose 00070 00071 ================================================================================ 00072 MSG: geometry_msgs/Pose 00073 # A representation of pose in free space, composed of postion and orientation. 00074 Point position 00075 Quaternion orientation 00076 00077 ================================================================================ 00078 MSG: geometry_msgs/Point 00079 # This contains the position of a point in free space 00080 float64 x 00081 float64 y 00082 float64 z 00083 00084 ================================================================================ 00085 MSG: geometry_msgs/Quaternion 00086 # This represents an orientation in free space in quaternion form. 00087 00088 float64 x 00089 float64 y 00090 float64 z 00091 float64 w 00092 00093 """ 00094 __slots__ = ['header','goal_id','goal'] 00095 _slot_types = ['Header','actionlib_msgs/GoalID','nao_msgs/FollowPathGoal'] 00096 00097 def __init__(self, *args, **kwds): 00098 """ 00099 Constructor. Any message fields that are implicitly/explicitly 00100 set to None will be assigned a default value. The recommend 00101 use is keyword arguments as this is more robust to future message 00102 changes. You cannot mix in-order arguments and keyword arguments. 00103 00104 The available fields are: 00105 header,goal_id,goal 00106 00107 @param args: complete set of field values, in .msg order 00108 @param kwds: use keyword arguments corresponding to message field names 00109 to set specific fields. 00110 """ 00111 if args or kwds: 00112 super(FollowPathActionGoal, self).__init__(*args, **kwds) 00113 #message fields cannot be None, assign default values for those that are 00114 if self.header is None: 00115 self.header = std_msgs.msg._Header.Header() 00116 if self.goal_id is None: 00117 self.goal_id = actionlib_msgs.msg.GoalID() 00118 if self.goal is None: 00119 self.goal = nao_msgs.msg.FollowPathGoal() 00120 else: 00121 self.header = std_msgs.msg._Header.Header() 00122 self.goal_id = actionlib_msgs.msg.GoalID() 00123 self.goal = nao_msgs.msg.FollowPathGoal() 00124 00125 def _get_types(self): 00126 """ 00127 internal API method 00128 """ 00129 return self._slot_types 00130 00131 def serialize(self, buff): 00132 """ 00133 serialize message into buffer 00134 @param buff: buffer 00135 @type buff: StringIO 00136 """ 00137 try: 00138 _x = self 00139 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00140 _x = self.header.frame_id 00141 length = len(_x) 00142 buff.write(struct.pack('<I%ss'%length, length, _x)) 00143 _x = self 00144 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00145 _x = self.goal_id.id 00146 length = len(_x) 00147 buff.write(struct.pack('<I%ss'%length, length, _x)) 00148 _x = self 00149 buff.write(_struct_3I.pack(_x.goal.path.header.seq, _x.goal.path.header.stamp.secs, _x.goal.path.header.stamp.nsecs)) 00150 _x = self.goal.path.header.frame_id 00151 length = len(_x) 00152 buff.write(struct.pack('<I%ss'%length, length, _x)) 00153 length = len(self.goal.path.poses) 00154 buff.write(_struct_I.pack(length)) 00155 for val1 in self.goal.path.poses: 00156 _v1 = val1.header 00157 buff.write(_struct_I.pack(_v1.seq)) 00158 _v2 = _v1.stamp 00159 _x = _v2 00160 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00161 _x = _v1.frame_id 00162 length = len(_x) 00163 buff.write(struct.pack('<I%ss'%length, length, _x)) 00164 _v3 = val1.pose 00165 _v4 = _v3.position 00166 _x = _v4 00167 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00168 _v5 = _v3.orientation 00169 _x = _v5 00170 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00171 except struct.error as se: self._check_types(se) 00172 except TypeError as te: self._check_types(te) 00173 00174 def deserialize(self, str): 00175 """ 00176 unpack serialized message in str into this message instance 00177 @param str: byte array of serialized message 00178 @type str: str 00179 """ 00180 try: 00181 if self.header is None: 00182 self.header = std_msgs.msg._Header.Header() 00183 if self.goal_id is None: 00184 self.goal_id = actionlib_msgs.msg.GoalID() 00185 if self.goal is None: 00186 self.goal = nao_msgs.msg.FollowPathGoal() 00187 end = 0 00188 _x = self 00189 start = end 00190 end += 12 00191 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00192 start = end 00193 end += 4 00194 (length,) = _struct_I.unpack(str[start:end]) 00195 start = end 00196 end += length 00197 self.header.frame_id = str[start:end] 00198 _x = self 00199 start = end 00200 end += 8 00201 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 start = end 00206 end += length 00207 self.goal_id.id = str[start:end] 00208 _x = self 00209 start = end 00210 end += 12 00211 (_x.goal.path.header.seq, _x.goal.path.header.stamp.secs, _x.goal.path.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00212 start = end 00213 end += 4 00214 (length,) = _struct_I.unpack(str[start:end]) 00215 start = end 00216 end += length 00217 self.goal.path.header.frame_id = str[start:end] 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 self.goal.path.poses = [] 00222 for i in range(0, length): 00223 val1 = geometry_msgs.msg.PoseStamped() 00224 _v6 = val1.header 00225 start = end 00226 end += 4 00227 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00228 _v7 = _v6.stamp 00229 _x = _v7 00230 start = end 00231 end += 8 00232 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00233 start = end 00234 end += 4 00235 (length,) = _struct_I.unpack(str[start:end]) 00236 start = end 00237 end += length 00238 _v6.frame_id = str[start:end] 00239 _v8 = val1.pose 00240 _v9 = _v8.position 00241 _x = _v9 00242 start = end 00243 end += 24 00244 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00245 _v10 = _v8.orientation 00246 _x = _v10 00247 start = end 00248 end += 32 00249 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00250 self.goal.path.poses.append(val1) 00251 return self 00252 except struct.error as e: 00253 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00254 00255 00256 def serialize_numpy(self, buff, numpy): 00257 """ 00258 serialize message with numpy array types into buffer 00259 @param buff: buffer 00260 @type buff: StringIO 00261 @param numpy: numpy python module 00262 @type numpy module 00263 """ 00264 try: 00265 _x = self 00266 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00267 _x = self.header.frame_id 00268 length = len(_x) 00269 buff.write(struct.pack('<I%ss'%length, length, _x)) 00270 _x = self 00271 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00272 _x = self.goal_id.id 00273 length = len(_x) 00274 buff.write(struct.pack('<I%ss'%length, length, _x)) 00275 _x = self 00276 buff.write(_struct_3I.pack(_x.goal.path.header.seq, _x.goal.path.header.stamp.secs, _x.goal.path.header.stamp.nsecs)) 00277 _x = self.goal.path.header.frame_id 00278 length = len(_x) 00279 buff.write(struct.pack('<I%ss'%length, length, _x)) 00280 length = len(self.goal.path.poses) 00281 buff.write(_struct_I.pack(length)) 00282 for val1 in self.goal.path.poses: 00283 _v11 = val1.header 00284 buff.write(_struct_I.pack(_v11.seq)) 00285 _v12 = _v11.stamp 00286 _x = _v12 00287 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00288 _x = _v11.frame_id 00289 length = len(_x) 00290 buff.write(struct.pack('<I%ss'%length, length, _x)) 00291 _v13 = val1.pose 00292 _v14 = _v13.position 00293 _x = _v14 00294 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00295 _v15 = _v13.orientation 00296 _x = _v15 00297 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00298 except struct.error as se: self._check_types(se) 00299 except TypeError as te: self._check_types(te) 00300 00301 def deserialize_numpy(self, str, numpy): 00302 """ 00303 unpack serialized message in str into this message instance using numpy for array types 00304 @param str: byte array of serialized message 00305 @type str: str 00306 @param numpy: numpy python module 00307 @type numpy: module 00308 """ 00309 try: 00310 if self.header is None: 00311 self.header = std_msgs.msg._Header.Header() 00312 if self.goal_id is None: 00313 self.goal_id = actionlib_msgs.msg.GoalID() 00314 if self.goal is None: 00315 self.goal = nao_msgs.msg.FollowPathGoal() 00316 end = 0 00317 _x = self 00318 start = end 00319 end += 12 00320 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00321 start = end 00322 end += 4 00323 (length,) = _struct_I.unpack(str[start:end]) 00324 start = end 00325 end += length 00326 self.header.frame_id = str[start:end] 00327 _x = self 00328 start = end 00329 end += 8 00330 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00331 start = end 00332 end += 4 00333 (length,) = _struct_I.unpack(str[start:end]) 00334 start = end 00335 end += length 00336 self.goal_id.id = str[start:end] 00337 _x = self 00338 start = end 00339 end += 12 00340 (_x.goal.path.header.seq, _x.goal.path.header.stamp.secs, _x.goal.path.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00341 start = end 00342 end += 4 00343 (length,) = _struct_I.unpack(str[start:end]) 00344 start = end 00345 end += length 00346 self.goal.path.header.frame_id = str[start:end] 00347 start = end 00348 end += 4 00349 (length,) = _struct_I.unpack(str[start:end]) 00350 self.goal.path.poses = [] 00351 for i in range(0, length): 00352 val1 = geometry_msgs.msg.PoseStamped() 00353 _v16 = val1.header 00354 start = end 00355 end += 4 00356 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00357 _v17 = _v16.stamp 00358 _x = _v17 00359 start = end 00360 end += 8 00361 (_x.secs, _x.nsecs,) = _struct_2I.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 _v16.frame_id = str[start:end] 00368 _v18 = val1.pose 00369 _v19 = _v18.position 00370 _x = _v19 00371 start = end 00372 end += 24 00373 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00374 _v20 = _v18.orientation 00375 _x = _v20 00376 start = end 00377 end += 32 00378 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00379 self.goal.path.poses.append(val1) 00380 return self 00381 except struct.error as e: 00382 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00383 00384 _struct_I = roslib.message.struct_I 00385 _struct_4d = struct.Struct("<4d") 00386 _struct_3I = struct.Struct("<3I") 00387 _struct_2I = struct.Struct("<2I") 00388 _struct_3d = struct.Struct("<3d")