00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef __bipedRobin_local_planner__BASELOCALPLANNERCONFIG_H__
00048 #define __bipedRobin_local_planner__BASELOCALPLANNERCONFIG_H__
00049
00050 #include <dynamic_reconfigure/config_tools.h>
00051 #include <limits>
00052 #include <ros/node_handle.h>
00053 #include <dynamic_reconfigure/ConfigDescription.h>
00054 #include <dynamic_reconfigure/ParamDescription.h>
00055 #include <dynamic_reconfigure/Group.h>
00056 #include <dynamic_reconfigure/config_init_mutex.h>
00057 #include <boost/any.hpp>
00058
00059 namespace bipedRobin_local_planner
00060 {
00061 class BaseLocalPlannerConfigStatics;
00062
00063 class BaseLocalPlannerConfig
00064 {
00065 public:
00066 class AbstractParamDescription : public dynamic_reconfigure::ParamDescription
00067 {
00068 public:
00069 AbstractParamDescription(std::string n, std::string t, uint32_t l,
00070 std::string d, std::string e)
00071 {
00072 name = n;
00073 type = t;
00074 level = l;
00075 description = d;
00076 edit_method = e;
00077 }
00078
00079 virtual void clamp(BaseLocalPlannerConfig &config, const BaseLocalPlannerConfig &max, const BaseLocalPlannerConfig &min) const = 0;
00080 virtual void calcLevel(uint32_t &level, const BaseLocalPlannerConfig &config1, const BaseLocalPlannerConfig &config2) const = 0;
00081 virtual void fromServer(const ros::NodeHandle &nh, BaseLocalPlannerConfig &config) const = 0;
00082 virtual void toServer(const ros::NodeHandle &nh, const BaseLocalPlannerConfig &config) const = 0;
00083 virtual bool fromMessage(const dynamic_reconfigure::Config &msg, BaseLocalPlannerConfig &config) const = 0;
00084 virtual void toMessage(dynamic_reconfigure::Config &msg, const BaseLocalPlannerConfig &config) const = 0;
00085 virtual void getValue(const BaseLocalPlannerConfig &config, boost::any &val) const = 0;
00086 };
00087
00088 typedef boost::shared_ptr<AbstractParamDescription> AbstractParamDescriptionPtr;
00089 typedef boost::shared_ptr<const AbstractParamDescription> AbstractParamDescriptionConstPtr;
00090
00091 template <class T>
00092 class ParamDescription : public AbstractParamDescription
00093 {
00094 public:
00095 ParamDescription(std::string name, std::string type, uint32_t level,
00096 std::string description, std::string edit_method, T BaseLocalPlannerConfig::* f) :
00097 AbstractParamDescription(name, type, level, description, edit_method),
00098 field(f)
00099 {}
00100
00101 T (BaseLocalPlannerConfig::* field);
00102
00103 virtual void clamp(BaseLocalPlannerConfig &config, const BaseLocalPlannerConfig &max, const BaseLocalPlannerConfig &min) const
00104 {
00105 if (config.*field > max.*field)
00106 config.*field = max.*field;
00107
00108 if (config.*field < min.*field)
00109 config.*field = min.*field;
00110 }
00111
00112 virtual void calcLevel(uint32_t &comb_level, const BaseLocalPlannerConfig &config1, const BaseLocalPlannerConfig &config2) const
00113 {
00114 if (config1.*field != config2.*field)
00115 comb_level |= level;
00116 }
00117
00118 virtual void fromServer(const ros::NodeHandle &nh, BaseLocalPlannerConfig &config) const
00119 {
00120 nh.getParam(name, config.*field);
00121 }
00122
00123 virtual void toServer(const ros::NodeHandle &nh, const BaseLocalPlannerConfig &config) const
00124 {
00125 nh.setParam(name, config.*field);
00126 }
00127
00128 virtual bool fromMessage(const dynamic_reconfigure::Config &msg, BaseLocalPlannerConfig &config) const
00129 {
00130 return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field);
00131 }
00132
00133 virtual void toMessage(dynamic_reconfigure::Config &msg, const BaseLocalPlannerConfig &config) const
00134 {
00135 dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field);
00136 }
00137
00138 virtual void getValue(const BaseLocalPlannerConfig &config, boost::any &val) const
00139 {
00140 val = config.*field;
00141 }
00142 };
00143
00144 class AbstractGroupDescription : public dynamic_reconfigure::Group
00145 {
00146 public:
00147 AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s)
00148 {
00149 name = n;
00150 type = t;
00151 parent = p;
00152 state = s;
00153 id = i;
00154 }
00155
00156 std::vector<AbstractParamDescriptionConstPtr> abstract_parameters;
00157 bool state;
00158
00159 virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0;
00160 virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0;
00161 virtual void updateParams(boost::any &cfg, BaseLocalPlannerConfig &top) const= 0;
00162 virtual void setInitialState(boost::any &cfg) const = 0;
00163
00164
00165 void convertParams()
00166 {
00167 for(std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); i++)
00168 {
00169 parameters.push_back(dynamic_reconfigure::ParamDescription(**i));
00170 }
00171 }
00172 };
00173
00174 typedef boost::shared_ptr<AbstractGroupDescription> AbstractGroupDescriptionPtr;
00175 typedef boost::shared_ptr<const AbstractGroupDescription> AbstractGroupDescriptionConstPtr;
00176
00177 template<class T, class PT>
00178 class GroupDescription : public AbstractGroupDescription
00179 {
00180 public:
00181 GroupDescription(std::string name, std::string type, int parent, int id, bool s, T PT::* f) : AbstractGroupDescription(name, type, parent, id, s), field(f)
00182 {
00183 }
00184
00185 GroupDescription(const GroupDescription<T, PT>& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups)
00186 {
00187 parameters = g.parameters;
00188 abstract_parameters = g.abstract_parameters;
00189 }
00190
00191 virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const
00192 {
00193 PT* config = boost::any_cast<PT*>(cfg);
00194 if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field))
00195 return false;
00196
00197 for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); i++)
00198 {
00199 boost::any n = &((*config).*field);
00200 if(!(*i)->fromMessage(msg, n))
00201 return false;
00202 }
00203
00204 return true;
00205 }
00206
00207 virtual void setInitialState(boost::any &cfg) const
00208 {
00209 PT* config = boost::any_cast<PT*>(cfg);
00210 T* group = &((*config).*field);
00211 group->state = state;
00212
00213 for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); i++)
00214 {
00215 boost::any n = boost::any(&((*config).*field));
00216 (*i)->setInitialState(n);
00217 }
00218
00219 }
00220
00221 virtual void updateParams(boost::any &cfg, BaseLocalPlannerConfig &top) const
00222 {
00223 PT* config = boost::any_cast<PT*>(cfg);
00224
00225 T* f = &((*config).*field);
00226 f->setParams(top, abstract_parameters);
00227
00228 for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); i++)
00229 {
00230 boost::any n = &((*config).*field);
00231 (*i)->updateParams(n, top);
00232 }
00233 }
00234
00235 virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const
00236 {
00237 const PT config = boost::any_cast<PT>(cfg);
00238 dynamic_reconfigure::ConfigTools::appendGroup<T>(msg, name, id, parent, config.*field);
00239
00240 for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); i++)
00241 {
00242 (*i)->toMessage(msg, config.*field);
00243 }
00244 }
00245
00246 T (PT::* field);
00247 std::vector<BaseLocalPlannerConfig::AbstractGroupDescriptionConstPtr> groups;
00248 };
00249
00250 class DEFAULT
00251 {
00252 public:
00253 DEFAULT()
00254 {
00255 state = true;
00256 name = "Default";
00257 }
00258
00259 void setParams(BaseLocalPlannerConfig &config, const std::vector<AbstractParamDescriptionConstPtr> params)
00260 {
00261 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = params.begin(); i != params.end(); i++)
00262 {
00263 boost::any val;
00264 (*i)->getValue(config, val);
00265
00266 if("acc_lim_x"==(*i)->name){acc_lim_x = boost::any_cast<double>(val);}
00267 if("acc_lim_y"==(*i)->name){acc_lim_y = boost::any_cast<double>(val);}
00268 if("acc_lim_theta"==(*i)->name){acc_lim_theta = boost::any_cast<double>(val);}
00269 if("max_vel_x"==(*i)->name){max_vel_x = boost::any_cast<double>(val);}
00270 if("min_vel_x"==(*i)->name){min_vel_x = boost::any_cast<double>(val);}
00271 if("max_vel_theta"==(*i)->name){max_vel_theta = boost::any_cast<double>(val);}
00272 if("min_vel_theta"==(*i)->name){min_vel_theta = boost::any_cast<double>(val);}
00273 if("min_in_place_vel_theta"==(*i)->name){min_in_place_vel_theta = boost::any_cast<double>(val);}
00274 if("sim_time"==(*i)->name){sim_time = boost::any_cast<double>(val);}
00275 if("sim_granularity"==(*i)->name){sim_granularity = boost::any_cast<double>(val);}
00276 if("pdist_scale"==(*i)->name){pdist_scale = boost::any_cast<double>(val);}
00277 if("gdist_scale"==(*i)->name){gdist_scale = boost::any_cast<double>(val);}
00278 if("occdist_scale"==(*i)->name){occdist_scale = boost::any_cast<double>(val);}
00279 if("oscillation_reset_dist"==(*i)->name){oscillation_reset_dist = boost::any_cast<double>(val);}
00280 if("escape_reset_dist"==(*i)->name){escape_reset_dist = boost::any_cast<double>(val);}
00281 if("escape_reset_theta"==(*i)->name){escape_reset_theta = boost::any_cast<double>(val);}
00282 if("vx_samples"==(*i)->name){vx_samples = boost::any_cast<int>(val);}
00283 if("vtheta_samples"==(*i)->name){vtheta_samples = boost::any_cast<int>(val);}
00284 if("heading_lookahead"==(*i)->name){heading_lookahead = boost::any_cast<double>(val);}
00285 if("holonomic_robot"==(*i)->name){holonomic_robot = boost::any_cast<bool>(val);}
00286 if("escape_vel"==(*i)->name){escape_vel = boost::any_cast<double>(val);}
00287 if("dwa"==(*i)->name){dwa = boost::any_cast<bool>(val);}
00288 if("heading_scoring"==(*i)->name){heading_scoring = boost::any_cast<bool>(val);}
00289 if("heading_scoring_timestep"==(*i)->name){heading_scoring_timestep = boost::any_cast<double>(val);}
00290 if("simple_attractor"==(*i)->name){simple_attractor = boost::any_cast<bool>(val);}
00291 if("angular_sim_granularity"==(*i)->name){angular_sim_granularity = boost::any_cast<double>(val);}
00292 if("y_vels"==(*i)->name){y_vels = boost::any_cast<std::string>(val);}
00293 if("restore_defaults"==(*i)->name){restore_defaults = boost::any_cast<bool>(val);}
00294 }
00295 }
00296
00297 double acc_lim_x;
00298 double acc_lim_y;
00299 double acc_lim_theta;
00300 double max_vel_x;
00301 double min_vel_x;
00302 double max_vel_theta;
00303 double min_vel_theta;
00304 double min_in_place_vel_theta;
00305 double sim_time;
00306 double sim_granularity;
00307 double pdist_scale;
00308 double gdist_scale;
00309 double occdist_scale;
00310 double oscillation_reset_dist;
00311 double escape_reset_dist;
00312 double escape_reset_theta;
00313 int vx_samples;
00314 int vtheta_samples;
00315 double heading_lookahead;
00316 bool holonomic_robot;
00317 double escape_vel;
00318 bool dwa;
00319 bool heading_scoring;
00320 double heading_scoring_timestep;
00321 bool simple_attractor;
00322 double angular_sim_granularity;
00323 std::string y_vels;
00324 bool restore_defaults;
00325
00326 bool state;
00327 std::string name;
00328
00329
00330 }groups;
00331
00332
00333
00334
00335 double acc_lim_x;
00336
00337 double acc_lim_y;
00338
00339 double acc_lim_theta;
00340
00341 double max_vel_x;
00342
00343 double min_vel_x;
00344
00345 double max_vel_theta;
00346
00347 double min_vel_theta;
00348
00349 double min_in_place_vel_theta;
00350
00351 double sim_time;
00352
00353 double sim_granularity;
00354
00355 double pdist_scale;
00356
00357 double gdist_scale;
00358
00359 double occdist_scale;
00360
00361 double oscillation_reset_dist;
00362
00363 double escape_reset_dist;
00364
00365 double escape_reset_theta;
00366
00367 int vx_samples;
00368
00369 int vtheta_samples;
00370
00371 double heading_lookahead;
00372
00373 bool holonomic_robot;
00374
00375 double escape_vel;
00376
00377 bool dwa;
00378
00379 bool heading_scoring;
00380
00381 double heading_scoring_timestep;
00382
00383 bool simple_attractor;
00384
00385 double angular_sim_granularity;
00386
00387 std::string y_vels;
00388
00389 bool restore_defaults;
00390
00391
00392 bool __fromMessage__(dynamic_reconfigure::Config &msg)
00393 {
00394 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00395 const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00396
00397 int count = 0;
00398 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00399 if ((*i)->fromMessage(msg, *this))
00400 count++;
00401
00402 for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++)
00403 {
00404 if ((*i)->id == 0)
00405 {
00406 boost::any n = boost::any(this);
00407 (*i)->updateParams(n, *this);
00408 (*i)->fromMessage(msg, n);
00409 }
00410 }
00411
00412 if (count != dynamic_reconfigure::ConfigTools::size(msg))
00413 {
00414 ROS_ERROR("BaseLocalPlannerConfig::__fromMessage__ called with an unexpected parameter.");
00415 ROS_ERROR("Booleans:");
00416 for (unsigned int i = 0; i < msg.bools.size(); i++)
00417 ROS_ERROR(" %s", msg.bools[i].name.c_str());
00418 ROS_ERROR("Integers:");
00419 for (unsigned int i = 0; i < msg.ints.size(); i++)
00420 ROS_ERROR(" %s", msg.ints[i].name.c_str());
00421 ROS_ERROR("Doubles:");
00422 for (unsigned int i = 0; i < msg.doubles.size(); i++)
00423 ROS_ERROR(" %s", msg.doubles[i].name.c_str());
00424 ROS_ERROR("Strings:");
00425 for (unsigned int i = 0; i < msg.strs.size(); i++)
00426 ROS_ERROR(" %s", msg.strs[i].name.c_str());
00427
00428
00429 return false;
00430 }
00431 return true;
00432 }
00433
00434
00435
00436 void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__, const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__) const
00437 {
00438 dynamic_reconfigure::ConfigTools::clear(msg);
00439 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00440 (*i)->toMessage(msg, *this);
00441
00442 for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++)
00443 {
00444 if((*i)->id == 0)
00445 {
00446 (*i)->toMessage(msg, *this);
00447 }
00448 }
00449 }
00450
00451 void __toMessage__(dynamic_reconfigure::Config &msg) const
00452 {
00453 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00454 const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00455 __toMessage__(msg, __param_descriptions__, __group_descriptions__);
00456 }
00457
00458 void __toServer__(const ros::NodeHandle &nh) const
00459 {
00460 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00461 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00462 (*i)->toServer(nh, *this);
00463 }
00464
00465 void __fromServer__(const ros::NodeHandle &nh)
00466 {
00467 static bool setup=false;
00468
00469 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00470 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00471 (*i)->fromServer(nh, *this);
00472
00473 const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__();
00474 for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){
00475 if (!setup && (*i)->id == 0) {
00476 setup = true;
00477 boost::any n = boost::any(this);
00478 (*i)->setInitialState(n);
00479 }
00480 }
00481 }
00482
00483 void __clamp__()
00484 {
00485 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00486 const BaseLocalPlannerConfig &__max__ = __getMax__();
00487 const BaseLocalPlannerConfig &__min__ = __getMin__();
00488 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00489 (*i)->clamp(*this, __max__, __min__);
00490 }
00491
00492 uint32_t __level__(const BaseLocalPlannerConfig &config) const
00493 {
00494 const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__();
00495 uint32_t level = 0;
00496 for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); i++)
00497 (*i)->calcLevel(level, config, *this);
00498 return level;
00499 }
00500
00501 static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__();
00502 static const BaseLocalPlannerConfig &__getDefault__();
00503 static const BaseLocalPlannerConfig &__getMax__();
00504 static const BaseLocalPlannerConfig &__getMin__();
00505 static const std::vector<AbstractParamDescriptionConstPtr> &__getParamDescriptions__();
00506 static const std::vector<AbstractGroupDescriptionConstPtr> &__getGroupDescriptions__();
00507
00508 private:
00509 static const BaseLocalPlannerConfigStatics *__get_statics__();
00510 };
00511
00512 template <>
00513 inline void BaseLocalPlannerConfig::ParamDescription<std::string>::clamp(BaseLocalPlannerConfig &config, const BaseLocalPlannerConfig &max, const BaseLocalPlannerConfig &min) const
00514 {
00515 return;
00516 }
00517
00518 class BaseLocalPlannerConfigStatics
00519 {
00520 friend class BaseLocalPlannerConfig;
00521
00522 BaseLocalPlannerConfigStatics()
00523 {
00524 BaseLocalPlannerConfig::GroupDescription<BaseLocalPlannerConfig::DEFAULT, BaseLocalPlannerConfig> Default("Default", "", 0, 0, true, &BaseLocalPlannerConfig::groups);
00525
00526 __min__.acc_lim_x = 0.0;
00527
00528 __max__.acc_lim_x = 20.0;
00529
00530 __default__.acc_lim_x = 1.0;
00531
00532 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_x", "double", 0, "The acceleration limit of the robot in the x direction", "", &BaseLocalPlannerConfig::acc_lim_x)));
00533
00534 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_x", "double", 0, "The acceleration limit of the robot in the x direction", "", &BaseLocalPlannerConfig::acc_lim_x)));
00535
00536 __min__.acc_lim_y = 0.0;
00537
00538 __max__.acc_lim_y = 20.0;
00539
00540 __default__.acc_lim_y = 1.0;
00541
00542 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_y", "double", 0, "The acceleration limit of the robot in the y direction", "", &BaseLocalPlannerConfig::acc_lim_y)));
00543
00544 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_y", "double", 0, "The acceleration limit of the robot in the y direction", "", &BaseLocalPlannerConfig::acc_lim_y)));
00545
00546 __min__.acc_lim_theta = 0.0;
00547
00548 __max__.acc_lim_theta = 20.0;
00549
00550 __default__.acc_lim_theta = 1.0;
00551
00552 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_theta", "double", 0, "The acceleration limit of the robot in the theta direction", "", &BaseLocalPlannerConfig::acc_lim_theta)));
00553
00554 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("acc_lim_theta", "double", 0, "The acceleration limit of the robot in the theta direction", "", &BaseLocalPlannerConfig::acc_lim_theta)));
00555
00556 __min__.max_vel_x = 0.0;
00557
00558 __max__.max_vel_x = 20.0;
00559
00560 __default__.max_vel_x = 0.55;
00561
00562 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("max_vel_x", "double", 0, "The maximum x velocity for the robot in m/s", "", &BaseLocalPlannerConfig::max_vel_x)));
00563
00564 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("max_vel_x", "double", 0, "The maximum x velocity for the robot in m/s", "", &BaseLocalPlannerConfig::max_vel_x)));
00565
00566 __min__.min_vel_x = 0.0;
00567
00568 __max__.min_vel_x = 20.0;
00569
00570 __default__.min_vel_x = 0.0;
00571
00572 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_vel_x", "double", 0, "The minimum x velocity for the robot in m/s", "", &BaseLocalPlannerConfig::min_vel_x)));
00573
00574 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_vel_x", "double", 0, "The minimum x velocity for the robot in m/s", "", &BaseLocalPlannerConfig::min_vel_x)));
00575
00576 __min__.max_vel_theta = 0.0;
00577
00578 __max__.max_vel_theta = 20.0;
00579
00580 __default__.max_vel_theta = 1.0;
00581
00582 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("max_vel_theta", "double", 0, "The absolute value of the maximum rotational velocity for the robot in rad/s", "", &BaseLocalPlannerConfig::max_vel_theta)));
00583
00584 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("max_vel_theta", "double", 0, "The absolute value of the maximum rotational velocity for the robot in rad/s", "", &BaseLocalPlannerConfig::max_vel_theta)));
00585
00586 __min__.min_vel_theta = -20.0;
00587
00588 __max__.min_vel_theta = 0.0;
00589
00590 __default__.min_vel_theta = -1.0;
00591
00592 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_vel_theta", "double", 0, "The absolute value of the minimum rotational velocity for the robot in rad/s", "", &BaseLocalPlannerConfig::min_vel_theta)));
00593
00594 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_vel_theta", "double", 0, "The absolute value of the minimum rotational velocity for the robot in rad/s", "", &BaseLocalPlannerConfig::min_vel_theta)));
00595
00596 __min__.min_in_place_vel_theta = 0.0;
00597
00598 __max__.min_in_place_vel_theta = 20.0;
00599
00600 __default__.min_in_place_vel_theta = 0.4;
00601
00602 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_in_place_vel_theta", "double", 0, "The absolute value of the minimum in-place rotational velocity the controller will explore", "", &BaseLocalPlannerConfig::min_in_place_vel_theta)));
00603
00604 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("min_in_place_vel_theta", "double", 0, "The absolute value of the minimum in-place rotational velocity the controller will explore", "", &BaseLocalPlannerConfig::min_in_place_vel_theta)));
00605
00606 __min__.sim_time = 0.0;
00607
00608 __max__.sim_time = 10.0;
00609
00610 __default__.sim_time = 1.7;
00611
00612 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("sim_time", "double", 0, "The amount of time to roll trajectories out for in seconds", "", &BaseLocalPlannerConfig::sim_time)));
00613
00614 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("sim_time", "double", 0, "The amount of time to roll trajectories out for in seconds", "", &BaseLocalPlannerConfig::sim_time)));
00615
00616 __min__.sim_granularity = 0.0;
00617
00618 __max__.sim_granularity = 5.0;
00619
00620 __default__.sim_granularity = 0.025;
00621
00622 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("sim_granularity", "double", 0, "The granularity with which to check for collisions along each trajectory in meters", "", &BaseLocalPlannerConfig::sim_granularity)));
00623
00624 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("sim_granularity", "double", 0, "The granularity with which to check for collisions along each trajectory in meters", "", &BaseLocalPlannerConfig::sim_granularity)));
00625
00626 __min__.pdist_scale = 0.0;
00627
00628 __max__.pdist_scale = 5.0;
00629
00630 __default__.pdist_scale = 0.6;
00631
00632 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("pdist_scale", "double", 0, "The weight for the path distance part of the cost function", "", &BaseLocalPlannerConfig::pdist_scale)));
00633
00634 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("pdist_scale", "double", 0, "The weight for the path distance part of the cost function", "", &BaseLocalPlannerConfig::pdist_scale)));
00635
00636 __min__.gdist_scale = 0.0;
00637
00638 __max__.gdist_scale = 5.0;
00639
00640 __default__.gdist_scale = 0.8;
00641
00642 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("gdist_scale", "double", 0, "The weight for the goal distance part of the cost function", "", &BaseLocalPlannerConfig::gdist_scale)));
00643
00644 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("gdist_scale", "double", 0, "The weight for the goal distance part of the cost function", "", &BaseLocalPlannerConfig::gdist_scale)));
00645
00646 __min__.occdist_scale = 0.0;
00647
00648 __max__.occdist_scale = 5.0;
00649
00650 __default__.occdist_scale = 0.01;
00651
00652 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("occdist_scale", "double", 0, "The weight for the obstacle distance part of the cost function", "", &BaseLocalPlannerConfig::occdist_scale)));
00653
00654 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("occdist_scale", "double", 0, "The weight for the obstacle distance part of the cost function", "", &BaseLocalPlannerConfig::occdist_scale)));
00655
00656 __min__.oscillation_reset_dist = 0.0;
00657
00658 __max__.oscillation_reset_dist = 5.0;
00659
00660 __default__.oscillation_reset_dist = 0.05;
00661
00662 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("oscillation_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::oscillation_reset_dist)));
00663
00664 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("oscillation_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::oscillation_reset_dist)));
00665
00666 __min__.escape_reset_dist = 0.0;
00667
00668 __max__.escape_reset_dist = 5.0;
00669
00670 __default__.escape_reset_dist = 0.1;
00671
00672 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::escape_reset_dist)));
00673
00674 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::escape_reset_dist)));
00675
00676 __min__.escape_reset_theta = 0.0;
00677
00678 __max__.escape_reset_theta = 5.0;
00679
00680 __default__.escape_reset_theta = 1.57079632679;
00681
00682 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_reset_theta", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::escape_reset_theta)));
00683
00684 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_reset_theta", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &BaseLocalPlannerConfig::escape_reset_theta)));
00685
00686 __min__.vx_samples = 1;
00687
00688 __max__.vx_samples = 300;
00689
00690 __default__.vx_samples = 20;
00691
00692 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<int>("vx_samples", "int", 0, "The number of samples to use when exploring the x velocity space", "", &BaseLocalPlannerConfig::vx_samples)));
00693
00694 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<int>("vx_samples", "int", 0, "The number of samples to use when exploring the x velocity space", "", &BaseLocalPlannerConfig::vx_samples)));
00695
00696 __min__.vtheta_samples = 1;
00697
00698 __max__.vtheta_samples = 300;
00699
00700 __default__.vtheta_samples = 20;
00701
00702 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<int>("vtheta_samples", "int", 0, "The number of samples to use when exploring the theta velocity space", "", &BaseLocalPlannerConfig::vtheta_samples)));
00703
00704 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<int>("vtheta_samples", "int", 0, "The number of samples to use when exploring the theta velocity space", "", &BaseLocalPlannerConfig::vtheta_samples)));
00705
00706 __min__.heading_lookahead = 0.0;
00707
00708 __max__.heading_lookahead = 5.0;
00709
00710 __default__.heading_lookahead = 0.325;
00711
00712 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("heading_lookahead", "double", 0, "How far the robot should look ahead of itself when differentiating between different rotational velocities", "", &BaseLocalPlannerConfig::heading_lookahead)));
00713
00714 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("heading_lookahead", "double", 0, "How far the robot should look ahead of itself when differentiating between different rotational velocities", "", &BaseLocalPlannerConfig::heading_lookahead)));
00715
00716 __min__.holonomic_robot = 0;
00717
00718 __max__.holonomic_robot = 1;
00719
00720 __default__.holonomic_robot = 1;
00721
00722 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("holonomic_robot", "bool", 0, "Set this to true if the robot being controlled can take y velocities and false otherwise", "", &BaseLocalPlannerConfig::holonomic_robot)));
00723
00724 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("holonomic_robot", "bool", 0, "Set this to true if the robot being controlled can take y velocities and false otherwise", "", &BaseLocalPlannerConfig::holonomic_robot)));
00725
00726 __min__.escape_vel = -2.0;
00727
00728 __max__.escape_vel = 2.0;
00729
00730 __default__.escape_vel = -0.1;
00731
00732 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_vel", "double", 0, "The velocity to use while backing up", "", &BaseLocalPlannerConfig::escape_vel)));
00733
00734 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("escape_vel", "double", 0, "The velocity to use while backing up", "", &BaseLocalPlannerConfig::escape_vel)));
00735
00736 __min__.dwa = 0;
00737
00738 __max__.dwa = 1;
00739
00740 __default__.dwa = 0;
00741
00742 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("dwa", "bool", 0, "Set this to true to use the Dynamic Window Approach, false to use acceleration limits", "", &BaseLocalPlannerConfig::dwa)));
00743
00744 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("dwa", "bool", 0, "Set this to true to use the Dynamic Window Approach, false to use acceleration limits", "", &BaseLocalPlannerConfig::dwa)));
00745
00746 __min__.heading_scoring = 0;
00747
00748 __max__.heading_scoring = 1;
00749
00750 __default__.heading_scoring = 0;
00751
00752 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("heading_scoring", "bool", 0, "Set this to true to use the Dynamic Window Approach, false to use acceleration limits", "", &BaseLocalPlannerConfig::heading_scoring)));
00753
00754 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("heading_scoring", "bool", 0, "Set this to true to use the Dynamic Window Approach, false to use acceleration limits", "", &BaseLocalPlannerConfig::heading_scoring)));
00755
00756 __min__.heading_scoring_timestep = 0.0;
00757
00758 __max__.heading_scoring_timestep = 1.0;
00759
00760 __default__.heading_scoring_timestep = 0.1;
00761
00762 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("heading_scoring_timestep", "double", 0, "How far to look ahead in time when we score heading based trajectories", "", &BaseLocalPlannerConfig::heading_scoring_timestep)));
00763
00764 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("heading_scoring_timestep", "double", 0, "How far to look ahead in time when we score heading based trajectories", "", &BaseLocalPlannerConfig::heading_scoring_timestep)));
00765
00766 __min__.simple_attractor = 0;
00767
00768 __max__.simple_attractor = 1;
00769
00770 __default__.simple_attractor = 0;
00771
00772 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("simple_attractor", "bool", 0, "Set this to true to allow simple attraction to a goal point instead of intelligent cost propagation", "", &BaseLocalPlannerConfig::simple_attractor)));
00773
00774 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("simple_attractor", "bool", 0, "Set this to true to allow simple attraction to a goal point instead of intelligent cost propagation", "", &BaseLocalPlannerConfig::simple_attractor)));
00775
00776 __min__.angular_sim_granularity = 0.0;
00777
00778 __max__.angular_sim_granularity = 1.57079632679;
00779
00780 __default__.angular_sim_granularity = 0.025;
00781
00782 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("angular_sim_granularity", "double", 0, "The distance between simulation points for angular velocity should be small enough that the robot doesn't hit things", "", &BaseLocalPlannerConfig::angular_sim_granularity)));
00783
00784 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<double>("angular_sim_granularity", "double", 0, "The distance between simulation points for angular velocity should be small enough that the robot doesn't hit things", "", &BaseLocalPlannerConfig::angular_sim_granularity)));
00785
00786 __min__.y_vels = "";
00787
00788 __max__.y_vels = "";
00789
00790 __default__.y_vels = "-0.3,-0.1,0.1,-0.3";
00791
00792 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<std::string>("y_vels", "str", 0, "A comma delimited list of the y velocities the controller will explore", "", &BaseLocalPlannerConfig::y_vels)));
00793
00794 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<std::string>("y_vels", "str", 0, "A comma delimited list of the y velocities the controller will explore", "", &BaseLocalPlannerConfig::y_vels)));
00795
00796 __min__.restore_defaults = 0;
00797
00798 __max__.restore_defaults = 1;
00799
00800 __default__.restore_defaults = 0;
00801
00802 Default.abstract_parameters.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("restore_defaults", "bool", 0, "Retore to the default configuration", "", &BaseLocalPlannerConfig::restore_defaults)));
00803
00804 __param_descriptions__.push_back(BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr(new BaseLocalPlannerConfig::ParamDescription<bool>("restore_defaults", "bool", 0, "Retore to the default configuration", "", &BaseLocalPlannerConfig::restore_defaults)));
00805
00806 Default.convertParams();
00807
00808 __group_descriptions__.push_back(BaseLocalPlannerConfig::AbstractGroupDescriptionConstPtr(new BaseLocalPlannerConfig::GroupDescription<BaseLocalPlannerConfig::DEFAULT, BaseLocalPlannerConfig>(Default)));
00809
00810
00811 for (std::vector<BaseLocalPlannerConfig::AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++)
00812 {
00813 __description_message__.groups.push_back(**i);
00814 }
00815 __max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__);
00816 __min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__);
00817 __default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__);
00818 }
00819 std::vector<BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr> __param_descriptions__;
00820 std::vector<BaseLocalPlannerConfig::AbstractGroupDescriptionConstPtr> __group_descriptions__;
00821 BaseLocalPlannerConfig __max__;
00822 BaseLocalPlannerConfig __min__;
00823 BaseLocalPlannerConfig __default__;
00824 dynamic_reconfigure::ConfigDescription __description_message__;
00825
00826 static const BaseLocalPlannerConfigStatics *get_instance()
00827 {
00828
00829
00830
00831
00832 static BaseLocalPlannerConfigStatics instance;
00833 return &instance;
00834 }
00835 };
00836
00837 inline const dynamic_reconfigure::ConfigDescription &BaseLocalPlannerConfig::__getDescriptionMessage__()
00838 {
00839 return __get_statics__()->__description_message__;
00840 }
00841
00842 inline const BaseLocalPlannerConfig &BaseLocalPlannerConfig::__getDefault__()
00843 {
00844 return __get_statics__()->__default__;
00845 }
00846
00847 inline const BaseLocalPlannerConfig &BaseLocalPlannerConfig::__getMax__()
00848 {
00849 return __get_statics__()->__max__;
00850 }
00851
00852 inline const BaseLocalPlannerConfig &BaseLocalPlannerConfig::__getMin__()
00853 {
00854 return __get_statics__()->__min__;
00855 }
00856
00857 inline const std::vector<BaseLocalPlannerConfig::AbstractParamDescriptionConstPtr> &BaseLocalPlannerConfig::__getParamDescriptions__()
00858 {
00859 return __get_statics__()->__param_descriptions__;
00860 }
00861
00862 inline const std::vector<BaseLocalPlannerConfig::AbstractGroupDescriptionConstPtr> &BaseLocalPlannerConfig::__getGroupDescriptions__()
00863 {
00864 return __get_statics__()->__group_descriptions__;
00865 }
00866
00867 inline const BaseLocalPlannerConfigStatics *BaseLocalPlannerConfig::__get_statics__()
00868 {
00869 const static BaseLocalPlannerConfigStatics *statics;
00870
00871 if (statics)
00872 return statics;
00873
00874 boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__);
00875
00876 if (statics)
00877 return statics;
00878
00879 statics = BaseLocalPlannerConfigStatics::get_instance();
00880
00881 return statics;
00882 }
00883
00884
00885 }
00886
00887 #endif // __BASELOCALPLANNERRECONFIGURATOR_H__