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