PidConfig.h
Go to the documentation of this file.
00001 //#line 2 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
00002 // *********************************************************
00003 // 
00004 // File autogenerated for the pid package 
00005 // by the dynamic_reconfigure package.
00006 // Please do not edit.
00007 // 
00008 // ********************************************************/
00009 
00010 #ifndef __pid__PIDCONFIG_H__
00011 #define __pid__PIDCONFIG_H__
00012 
00013 #include <dynamic_reconfigure/config_tools.h>
00014 #include <limits>
00015 #include <ros/node_handle.h>
00016 #include <dynamic_reconfigure/ConfigDescription.h>
00017 #include <dynamic_reconfigure/ParamDescription.h>
00018 #include <dynamic_reconfigure/Group.h>
00019 #include <dynamic_reconfigure/config_init_mutex.h>
00020 #include <boost/any.hpp>
00021 
00022 namespace pid
00023 {
00024   class PidConfigStatics;
00025   
00026   class PidConfig
00027   {
00028   public:
00029     class AbstractParamDescription : public dynamic_reconfigure::ParamDescription
00030     {
00031     public:
00032       AbstractParamDescription(std::string n, std::string t, uint32_t l, 
00033           std::string d, std::string e)
00034       {
00035         name = n;
00036         type = t;
00037         level = l;
00038         description = d;
00039         edit_method = e;
00040       }
00041       
00042       virtual void clamp(PidConfig &config, const PidConfig &max, const PidConfig &min) const = 0;
00043       virtual void calcLevel(uint32_t &level, const PidConfig &config1, const PidConfig &config2) const = 0;
00044       virtual void fromServer(const ros::NodeHandle &nh, PidConfig &config) const = 0;
00045       virtual void toServer(const ros::NodeHandle &nh, const PidConfig &config) const = 0;
00046       virtual bool fromMessage(const dynamic_reconfigure::Config &msg, PidConfig &config) const = 0;
00047       virtual void toMessage(dynamic_reconfigure::Config &msg, const PidConfig &config) const = 0;
00048       virtual void getValue(const PidConfig &config, boost::any &val) const = 0;
00049     };
00050 
00051     typedef boost::shared_ptr<AbstractParamDescription> AbstractParamDescriptionPtr;
00052     typedef boost::shared_ptr<const AbstractParamDescription> AbstractParamDescriptionConstPtr;
00053     
00054     template <class T>
00055     class ParamDescription : public AbstractParamDescription
00056     {
00057     public:
00058       ParamDescription(std::string name, std::string type, uint32_t level, 
00059           std::string description, std::string edit_method, T PidConfig::* f) :
00060         AbstractParamDescription(name, type, level, description, edit_method),
00061         field(f)
00062       {}
00063 
00064       T (PidConfig::* field);
00065 
00066       virtual void clamp(PidConfig &config, const PidConfig &max, const PidConfig &min) const
00067       {
00068         if (config.*field > max.*field)
00069           config.*field = max.*field;
00070         
00071         if (config.*field < min.*field)
00072           config.*field = min.*field;
00073       }
00074 
00075       virtual void calcLevel(uint32_t &comb_level, const PidConfig &config1, const PidConfig &config2) const
00076       {
00077         if (config1.*field != config2.*field)
00078           comb_level |= level;
00079       }
00080 
00081       virtual void fromServer(const ros::NodeHandle &nh, PidConfig &config) const
00082       {
00083         nh.getParam(name, config.*field);
00084       }
00085 
00086       virtual void toServer(const ros::NodeHandle &nh, const PidConfig &config) const
00087       {
00088         nh.setParam(name, config.*field);
00089       }
00090 
00091       virtual bool fromMessage(const dynamic_reconfigure::Config &msg, PidConfig &config) const
00092       {
00093         return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field);
00094       }
00095 
00096       virtual void toMessage(dynamic_reconfigure::Config &msg, const PidConfig &config) const
00097       {
00098         dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field);
00099       }
00100 
00101       virtual void getValue(const PidConfig &config, boost::any &val) const
00102       {
00103         val = config.*field;
00104       }
00105     };
00106 
00107     class AbstractGroupDescription : public dynamic_reconfigure::Group
00108     {
00109       public:
00110       AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s)
00111       {
00112         name = n;
00113         type = t;
00114         parent = p;
00115         state = s;
00116         id = i;
00117       }
00118 
00119       std::vector<AbstractParamDescriptionConstPtr> abstract_parameters;
00120       bool state;
00121 
00122       virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0;
00123       virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0;
00124       virtual void updateParams(boost::any &cfg, PidConfig &top) const= 0;
00125       virtual void setInitialState(boost::any &cfg) const = 0;
00126 
00127 
00128       void convertParams()
00129       {
00130         for(std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); ++i)
00131         {
00132           parameters.push_back(dynamic_reconfigure::ParamDescription(**i));
00133         }
00134       }
00135     };
00136 
00137     typedef boost::shared_ptr<AbstractGroupDescription> AbstractGroupDescriptionPtr;
00138     typedef boost::shared_ptr<const AbstractGroupDescription> AbstractGroupDescriptionConstPtr;
00139 
00140     template<class T, class PT>
00141     class GroupDescription : public AbstractGroupDescription
00142     {
00143     public:
00144       GroupDescription(std::string name, std::string type, int parent, int id, bool s, T PT::* f) : AbstractGroupDescription(name, type, parent, id, s), field(f)
00145       {
00146       }
00147 
00148       GroupDescription(const GroupDescription<T, PT>& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups)
00149       {
00150         parameters = g.parameters;
00151         abstract_parameters = g.abstract_parameters;
00152       }
00153 
00154       virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const
00155       {
00156         PT* config = boost::any_cast<PT*>(cfg);
00157         if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field))
00158           return false;
00159 
00160         for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
00161         {
00162           boost::any n = &((*config).*field);
00163           if(!(*i)->fromMessage(msg, n))
00164             return false;
00165         }
00166 
00167         return true;
00168       }
00169 
00170       virtual void setInitialState(boost::any &cfg) const
00171       {
00172         PT* config = boost::any_cast<PT*>(cfg);
00173         T* group = &((*config).*field);
00174         group->state = state;
00175 
00176         for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
00177         {
00178           boost::any n = boost::any(&((*config).*field));
00179           (*i)->setInitialState(n);
00180         }
00181 
00182       }
00183 
00184       virtual void updateParams(boost::any &cfg, PidConfig &top) const
00185       {
00186         PT* config = boost::any_cast<PT*>(cfg);
00187 
00188         T* f = &((*config).*field);
00189         f->setParams(top, abstract_parameters);
00190 
00191         for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
00192         {
00193           boost::any n = &((*config).*field);
00194           (*i)->updateParams(n, top);
00195         }
00196       }
00197 
00198       virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const
00199       {
00200         const PT config = boost::any_cast<PT>(cfg);
00201         dynamic_reconfigure::ConfigTools::appendGroup<T>(msg, name, id, parent, config.*field);
00202 
00203         for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i)
00204         {
00205           (*i)->toMessage(msg, config.*field);
00206         }
00207       }
00208 
00209       T (PT::* field);
00210       std::vector<PidConfig::AbstractGroupDescriptionConstPtr> groups;
00211     };
00212     
00213 class DEFAULT
00214 {
00215   public:
00216     DEFAULT()
00217     {
00218       state = true;
00219       name = "Default";
00220     }
00221 
00222     void setParams(PidConfig &config, const std::vector<AbstractParamDescriptionConstPtr> params)
00223     {
00224       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator _i = params.begin(); _i != params.end(); ++_i)
00225       {
00226         boost::any val;
00227         (*_i)->getValue(config, val);
00228 
00229         if("Kp_scale"==(*_i)->name){Kp_scale = boost::any_cast<double>(val);}
00230         if("Kp"==(*_i)->name){Kp = boost::any_cast<double>(val);}
00231         if("Ki_scale"==(*_i)->name){Ki_scale = boost::any_cast<double>(val);}
00232         if("Ki"==(*_i)->name){Ki = boost::any_cast<double>(val);}
00233         if("Kd_scale"==(*_i)->name){Kd_scale = boost::any_cast<double>(val);}
00234         if("Kd"==(*_i)->name){Kd = boost::any_cast<double>(val);}
00235       }
00236     }
00237 
00238     double Kp_scale;
00239 double Kp;
00240 double Ki_scale;
00241 double Ki;
00242 double Kd_scale;
00243 double Kd;
00244 
00245     bool state;
00246     std::string name;
00247 
00248     
00249 }groups;
00250 
00251 
00252 
00253 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00254       double Kp_scale;
00255 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00256       double Kp;
00257 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00258       double Ki_scale;
00259 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00260       double Ki;
00261 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00262       double Kd_scale;
00263 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00264       double Kd;
00265 //#line 218 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
00266 
00267     bool __fromMessage__(dynamic_reconfigure::Config &msg)
00268     {
00269       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00270       const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00271 
00272       int count = 0;
00273       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00274         if ((*i)->fromMessage(msg, *this))
00275           count++;
00276 
00277       for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++)
00278       {
00279         if ((*i)->id == 0)
00280         {
00281           boost::any n = boost::any(this);
00282           (*i)->updateParams(n, *this);
00283           (*i)->fromMessage(msg, n);
00284         }
00285       }
00286 
00287       if (count != dynamic_reconfigure::ConfigTools::size(msg))
00288       {
00289         ROS_ERROR("PidConfig::__fromMessage__ called with an unexpected parameter.");
00290         ROS_ERROR("Booleans:");
00291         for (unsigned int i = 0; i < msg.bools.size(); i++)
00292           ROS_ERROR("  %s", msg.bools[i].name.c_str());
00293         ROS_ERROR("Integers:");
00294         for (unsigned int i = 0; i < msg.ints.size(); i++)
00295           ROS_ERROR("  %s", msg.ints[i].name.c_str());
00296         ROS_ERROR("Doubles:");
00297         for (unsigned int i = 0; i < msg.doubles.size(); i++)
00298           ROS_ERROR("  %s", msg.doubles[i].name.c_str());
00299         ROS_ERROR("Strings:");
00300         for (unsigned int i = 0; i < msg.strs.size(); i++)
00301           ROS_ERROR("  %s", msg.strs[i].name.c_str());
00302         // @todo Check that there are no duplicates. Make this error more
00303         // explicit.
00304         return false;
00305       }
00306       return true;
00307     }
00308 
00309     // This version of __toMessage__ is used during initialization of
00310     // statics when __getParamDescriptions__ can't be called yet.
00311     void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__, const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__) const
00312     {
00313       dynamic_reconfigure::ConfigTools::clear(msg);
00314       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00315         (*i)->toMessage(msg, *this);
00316 
00317       for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
00318       {
00319         if((*i)->id == 0)
00320         {
00321           (*i)->toMessage(msg, *this);
00322         }
00323       }
00324     }
00325     
00326     void __toMessage__(dynamic_reconfigure::Config &msg) const
00327     {
00328       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00329       const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00330       __toMessage__(msg, __param_descriptions__, __group_descriptions__);
00331     }
00332     
00333     void __toServer__(const ros::NodeHandle &nh) const
00334     {
00335       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00336       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00337         (*i)->toServer(nh, *this);
00338     }
00339 
00340     void __fromServer__(const ros::NodeHandle &nh)
00341     {
00342       static bool setup=false;
00343 
00344       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00345       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00346         (*i)->fromServer(nh, *this);
00347 
00348       const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00349       for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){
00350         if (!setup && (*i)->id == 0) {
00351           setup = true;
00352           boost::any n = boost::any(this);
00353           (*i)->setInitialState(n);
00354         }
00355       }
00356     }
00357 
00358     void __clamp__()
00359     {
00360       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00361       const PidConfig &__max__ = __getMax__();
00362       const PidConfig &__min__ = __getMin__();
00363       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00364         (*i)->clamp(*this, __max__, __min__);
00365     }
00366 
00367     uint32_t __level__(const PidConfig &config) const
00368     {
00369       const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00370       uint32_t level = 0;
00371       for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i)
00372         (*i)->calcLevel(level, config, *this);
00373       return level;
00374     }
00375     
00376     static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__();
00377     static const PidConfig &__getDefault__();
00378     static const PidConfig &__getMax__();
00379     static const PidConfig &__getMin__();
00380     static const std::vector<AbstractParamDescriptionConstPtr> &__getParamDescriptions__();
00381     static const std::vector<AbstractGroupDescriptionConstPtr> &__getGroupDescriptions__();
00382     
00383   private:
00384     static const PidConfigStatics *__get_statics__();
00385   };
00386   
00387   template <> // Max and min are ignored for strings.
00388   inline void PidConfig::ParamDescription<std::string>::clamp(PidConfig &config, const PidConfig &max, const PidConfig &min) const
00389   {
00390     return;
00391   }
00392 
00393   class PidConfigStatics
00394   {
00395     friend class PidConfig;
00396     
00397     PidConfigStatics()
00398     {
00399 PidConfig::GroupDescription<PidConfig::DEFAULT, PidConfig> Default("Default", "", 0, 0, true, &PidConfig::groups);
00400 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00401       __min__.Kp_scale = 0.1;
00402 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00403       __max__.Kp_scale = 100.0;
00404 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00405       __default__.Kp_scale = 10.0;
00406 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00407       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kp_scale", "double", 0, "Kp scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Kp_scale)));
00408 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00409       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kp_scale", "double", 0, "Kp scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Kp_scale)));
00410 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00411       __min__.Kp = 0.0;
00412 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00413       __max__.Kp = 1.0;
00414 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00415       __default__.Kp = 0.1;
00416 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00417       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kp", "double", 0, "Kp", "", &PidConfig::Kp)));
00418 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00419       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kp", "double", 0, "Kp", "", &PidConfig::Kp)));
00420 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00421       __min__.Ki_scale = 0.1;
00422 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00423       __max__.Ki_scale = 100.0;
00424 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00425       __default__.Ki_scale = 10.0;
00426 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00427       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Ki_scale", "double", 0, "Ki scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Ki_scale)));
00428 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00429       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Ki_scale", "double", 0, "Ki scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Ki_scale)));
00430 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00431       __min__.Ki = 0.0;
00432 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00433       __max__.Ki = 1.0;
00434 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00435       __default__.Ki = 0.1;
00436 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00437       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Ki", "double", 0, "Ki", "", &PidConfig::Ki)));
00438 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00439       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Ki", "double", 0, "Ki", "", &PidConfig::Ki)));
00440 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00441       __min__.Kd_scale = 0.1;
00442 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00443       __max__.Kd_scale = 100.0;
00444 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00445       __default__.Kd_scale = 10.0;
00446 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00447       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kd_scale", "double", 0, "Kd scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Kd_scale)));
00448 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00449       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kd_scale", "double", 0, "Kd scale", "{'enum_description': 'Scale factor for K setting', 'enum': [{'srcline': 7, 'description': 'Scale by 0.1', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 0.1, 'ctype': 'double', 'type': 'double', 'name': 'scale_tenth'}, {'srcline': 8, 'description': 'No scaling', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 1.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_unity'}, {'srcline': 9, 'description': 'Scale by 10', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 10.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_ten'}, {'srcline': 10, 'description': 'Scale by 100', 'srcfile': '/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg', 'cconsttype': 'const double', 'value': 100.0, 'ctype': 'double', 'type': 'double', 'name': 'scale_hundred'}]}", &PidConfig::Kd_scale)));
00450 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00451       __min__.Kd = 0.0;
00452 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00453       __max__.Kd = 1.0;
00454 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00455       __default__.Kd = 0.1;
00456 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00457       Default.abstract_parameters.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kd", "double", 0, "Kd", "", &PidConfig::Kd)));
00458 //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00459       __param_descriptions__.push_back(PidConfig::AbstractParamDescriptionConstPtr(new PidConfig::ParamDescription<double>("Kd", "double", 0, "Kd", "", &PidConfig::Kd)));
00460 //#line 233 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00461       Default.convertParams();
00462 //#line 233 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py"
00463       __group_descriptions__.push_back(PidConfig::AbstractGroupDescriptionConstPtr(new PidConfig::GroupDescription<PidConfig::DEFAULT, PidConfig>(Default)));
00464 //#line 353 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template"
00465 
00466       for (std::vector<PidConfig::AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i)
00467       {
00468         __description_message__.groups.push_back(**i);
00469       }
00470       __max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__); 
00471       __min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__); 
00472       __default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__); 
00473     }
00474     std::vector<PidConfig::AbstractParamDescriptionConstPtr> __param_descriptions__;
00475     std::vector<PidConfig::AbstractGroupDescriptionConstPtr> __group_descriptions__;
00476     PidConfig __max__;
00477     PidConfig __min__;
00478     PidConfig __default__;
00479     dynamic_reconfigure::ConfigDescription __description_message__;
00480 
00481     static const PidConfigStatics *get_instance()
00482     {
00483       // Split this off in a separate function because I know that
00484       // instance will get initialized the first time get_instance is
00485       // called, and I am guaranteeing that get_instance gets called at
00486       // most once.
00487       static PidConfigStatics instance;
00488       return &instance;
00489     }
00490   };
00491 
00492   inline const dynamic_reconfigure::ConfigDescription &PidConfig::__getDescriptionMessage__() 
00493   {
00494     return __get_statics__()->__description_message__;
00495   }
00496 
00497   inline const PidConfig &PidConfig::__getDefault__()
00498   {
00499     return __get_statics__()->__default__;
00500   }
00501   
00502   inline const PidConfig &PidConfig::__getMax__()
00503   {
00504     return __get_statics__()->__max__;
00505   }
00506   
00507   inline const PidConfig &PidConfig::__getMin__()
00508   {
00509     return __get_statics__()->__min__;
00510   }
00511   
00512   inline const std::vector<PidConfig::AbstractParamDescriptionConstPtr> &PidConfig::__getParamDescriptions__()
00513   {
00514     return __get_statics__()->__param_descriptions__;
00515   }
00516 
00517   inline const std::vector<PidConfig::AbstractGroupDescriptionConstPtr> &PidConfig::__getGroupDescriptions__()
00518   {
00519     return __get_statics__()->__group_descriptions__;
00520   }
00521 
00522   inline const PidConfigStatics *PidConfig::__get_statics__()
00523   {
00524     const static PidConfigStatics *statics;
00525   
00526     if (statics) // Common case
00527       return statics;
00528 
00529     boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__);
00530 
00531     if (statics) // In case we lost a race.
00532       return statics;
00533 
00534     statics = PidConfigStatics::get_instance();
00535     
00536     return statics;
00537   }
00538 
00539 //#line 7 "/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg"
00540       const double Pid_scale_tenth = 0.1;
00541 //#line 8 "/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg"
00542       const double Pid_scale_unity = 1.0;
00543 //#line 9 "/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg"
00544       const double Pid_scale_ten = 10.0;
00545 //#line 10 "/home/andy/Desktop/catkin_ws/src/pid/cfg/Pid.cfg"
00546       const double Pid_scale_hundred = 100.0;
00547 }
00548 
00549 #endif // __PIDRECONFIGURATOR_H__


pid
Author(s): Andy Zelenak , Paul Bouchier
autogenerated on Tue May 2 2017 02:49:51