ddynamic_reconfigure.cpp
Go to the documentation of this file.
2 #include <boost/make_unique.hpp>
3 namespace ddynamic_reconfigure
4 {
6  : node_handle_(nh), advertised_(false), auto_update_(auto_update), new_config_avail_(false)
7 {
11 }
12 
14 {
18 }
19 
21 {
22  descr_pub_ = node_handle_.advertise<dynamic_reconfigure::ConfigDescription>(
23  "parameter_descriptions", 1, true);
24  const dynamic_reconfigure::ConfigDescription config_description = generateConfigDescription();
25  descr_pub_.publish(config_description);
26 
27  config_groups_.clear();
28  for (const auto &g : config_description.groups)
29  {
30  config_groups_.push_back(g.name);
31  }
32 
33  update_pub_ =
34  node_handle_.advertise<dynamic_reconfigure::Config>("parameter_updates", 1, true);
35 
37 
38  set_service_ = node_handle_.advertiseService("set_parameters",
40 
41  advertised_ = true;
42 }
43 
44 template <>
45 std::vector<std::unique_ptr<RegisteredParam<int>>> &DDynamicReconfigure::getRegisteredVector()
46 {
47  return registered_int_;
48 }
49 
50 template <>
51 std::vector<std::unique_ptr<RegisteredParam<double>>> &DDynamicReconfigure::getRegisteredVector()
52 {
53  return registered_double_;
54 }
55 
56 template <>
57 std::vector<std::unique_ptr<RegisteredParam<bool>>> &DDynamicReconfigure::getRegisteredVector()
58 {
59  return registered_bool_;
60 }
61 
62 template <>
63 std::vector<std::unique_ptr<RegisteredParam<std::string>>> &DDynamicReconfigure::getRegisteredVector()
64 {
65  return registered_string_;
66 }
67 
68 
69 template <typename T>
70 void DDynamicReconfigure::registerVariable(const std::string &name, T *variable,
71  const std::string &description, T min, T max,
72  const std::string &group)
73 {
74  registerVariable(name, variable, {}, description, min, max, group);
75 }
76 
77 template <typename T>
78 void DDynamicReconfigure::registerEnumVariable(const std::string &name, T *variable,
79  const std::string &description,
80  std::map<std::string, T> enum_dict,
81  const std::string &enum_description,
82  const std::string &group)
83 {
84  registerEnumVariable(name, variable, {}, description, enum_dict, enum_description, group);
85 }
86 
87 template <typename T>
88 void DDynamicReconfigure::registerVariable(const std::string &name, T *variable,
89  const boost::function<void(T value)> &callback,
90  const std::string &description, T min, T max,
91  const std::string &group)
92 {
93  attemptGetParam(node_handle_, name, *variable, *variable);
94  getRegisteredVector<T>().push_back(boost::make_unique<PointerRegisteredParam<T>>(
95  name, description, min, max, variable, callback, std::map<std::string, T>(), "", group));
96 }
97 
98 template <typename T>
99 void DDynamicReconfigure::registerEnumVariable(const std::string &name, T *variable,
100  const boost::function<void(T value)> &callback,
101  const std::string &description,
102  std::map<std::string, T> enum_dict,
103  const std::string &enum_description,
104  const std::string &group)
105 {
106  T min, max;
107  std::tie(min, max) = getMinMax(enum_dict);
108  attemptGetParam(node_handle_, name, *variable, *variable);
109  getRegisteredVector<T>().push_back(boost::make_unique<PointerRegisteredParam<T>>(
110  name, description, min, max, variable, callback, enum_dict, enum_description, group));
111 }
112 
113 template <typename T>
114 void DDynamicReconfigure::registerVariable(const std::string &name, T current_value,
115  const boost::function<void(T value)> &callback,
116  const std::string &description, T min, T max,
117  const std::string &group)
118 {
119  attemptGetParam(node_handle_, name, current_value, current_value);
120  getRegisteredVector<T>().push_back(boost::make_unique<CallbackRegisteredParam<T>>(
121  name, description, min, max, current_value, callback, std::map<std::string, T>(), "", group));
122 }
123 
124 
125 template <typename T>
126 void DDynamicReconfigure::registerEnumVariable(const std::string &name, T current_value,
127  const boost::function<void(T)> &callback,
128  const std::string &description,
129  std::map<std::string, T> enum_dict,
130  const std::string &enum_description,
131  const std::string &group)
132 {
133  T min, max;
134  std::tie(min, max) = getMinMax(enum_dict);
135  attemptGetParam(node_handle_, name, current_value, current_value);
136  getRegisteredVector<T>().push_back(boost::make_unique<CallbackRegisteredParam<T>>(
137  name, description, min, max, current_value, callback, enum_dict, enum_description, group));
138 }
139 
140 template <typename ParamType>
141 bool confCompare(const ParamType &a, const ParamType &b)
142 {
143  return (a.name == b.name) && (a.value == b.value);
144 }
145 
146 template <>
147 bool confCompare(const dynamic_reconfigure::DoubleParameter &a,
148  const dynamic_reconfigure::DoubleParameter &b)
149 {
150  return (a.name == b.name) &&
151  (std::fabs(a.value - b.value) < std::numeric_limits<double>::epsilon());
152 }
153 
155 {
156  dynamic_reconfigure::Config config_msg = generateConfig();
157 
158  bool has_changed = false;
159  has_changed = has_changed || config_msg.ints.size() != last_config_.ints.size();
160  has_changed = has_changed || config_msg.doubles.size() != last_config_.doubles.size();
161  has_changed = has_changed || config_msg.bools.size() != last_config_.bools.size();
162 
163  has_changed = has_changed ||
164  !std::equal(config_msg.ints.begin(), config_msg.ints.end(),
165  last_config_.ints.begin(),
166  confCompare<dynamic_reconfigure::IntParameter>);
167  has_changed = has_changed ||
168  !std::equal(config_msg.doubles.begin(), config_msg.doubles.end(),
169  last_config_.doubles.begin(),
170  confCompare<dynamic_reconfigure::DoubleParameter>);
171  has_changed = has_changed ||
172  !std::equal(config_msg.bools.begin(), config_msg.bools.end(),
173  last_config_.bools.begin(),
174  confCompare<dynamic_reconfigure::BoolParameter>);
175 
176  if (has_changed)
177  {
178  last_config_ = config_msg;
179  ROS_DEBUG_STREAM("Publishing ddr");
180  update_pub_.publish(config_msg);
181  }
182 }
183 
184 bool DDynamicReconfigure::setConfigCallback(dynamic_reconfigure::Reconfigure::Request &req,
185  dynamic_reconfigure::Reconfigure::Response &rsp)
186 {
187  ROS_DEBUG_STREAM("Called config callback of ddynamic_reconfigure");
188 
189  updated_config_ = req.config;
190  if (auto_update_)
191  {
193  }
194  else
195  {
196  new_config_avail_ = true;
197  const ros::Time start_time = ros::Time::now();
198  const ros::Duration timeout = ros::Duration(2.0);
199  while ((ros::Time::now() - start_time) < timeout && new_config_avail_)
200  {
201  // Wait until the updateRegisteredVariablesData method is called by the user or
202  // until the timeout
203  ros::Duration(0.01).sleep();
204  }
205  if ((ros::Time::now() - start_time) > timeout)
206  {
208  "Timeout waiting to update the registered variable data! Registered Variable data update failed!");
209  return true;
210  }
211  }
212 
213  /*
214  boost::recursive_mutex::scoped_lock lock(mutex_);
215 
216  ConfigType new_config = config_;
217  new_config.__fromMessage__(req.config);
218  new_config.__clamp__();
219  uint32_t level = config_.__level__(new_config);
220 
221  callCallback(new_config, level);
222 
223  updateConfigInternal(new_config);
224  new_config.__toMessage__(rsp.config);
225  */
226 
227  /*
228  ConfigType new_config = config_;
229  new_config.__fromMessage__(req.config);
230  new_config.__clamp__();
231  uint32_t level = config_.__level__(new_config);
232 
233  callCallback(new_config, level);
234 
235  updateConfigInternal(new_config);
236  new_config.__toMessage__(rsp.config);
237  */
238  // std::cerr<<req.config<<std::endl;
239 
240  if (user_callback_)
241  {
242  try
243  {
244  user_callback_();
245  }
246  catch (std::exception &e)
247  {
248  ROS_WARN("Reconfigure callback failed with exception %s: ", e.what());
249  }
250  catch (...)
251  {
252  ROS_WARN("Reconfigure callback failed with unprintable exception.");
253  }
254  }
255 
256  dynamic_reconfigure::Config config_msg = generateConfig();
257  update_pub_.publish(config_msg);
258  rsp.config = config_msg;
259 
261  return true;
262 }
263 
264 void DDynamicReconfigure::updateConfigData(const dynamic_reconfigure::Config &config)
265 {
266  for (unsigned int i = 0; i < config.ints.size(); ++i)
267  {
268  if (!assignValue(registered_int_, config.ints[i].name, config.ints[i].value))
269  {
270  ROS_ERROR_STREAM("Variable :" << config.ints[i].name << " not registered");
271  }
272  }
273  for (unsigned int i = 0; i < config.doubles.size(); ++i)
274  {
275  if (!assignValue(registered_double_, config.doubles[i].name, config.doubles[i].value))
276  {
277  ROS_ERROR_STREAM("Variable :" << config.doubles[i].name << " not registered");
278  }
279  }
280  for (unsigned int i = 0; i < config.bools.size(); ++i)
281  {
282  if (!assignValue(registered_bool_, config.bools[i].name, config.bools[i].value))
283  {
284  ROS_ERROR_STREAM("Variable :" << config.bools[i].name << " not registered");
285  }
286  }
287  for (unsigned int i = 0; i < config.strs.size(); ++i)
288  {
289  if (!assignValue(registered_string_, config.strs[i].name, config.strs[i].value))
290  {
291  ROS_ERROR_STREAM("Variable :" << config.strs[i].name << " not registered");
292  }
293  }
294 }
295 
297 {
298  user_callback_ = callback;
299 }
300 
302 {
303  user_callback_.clear();
304 }
305 
306 void DDynamicReconfigure::RegisterVariable(double *variable, std::string id, double min, double max)
307 {
308  registerVariable(id, variable, "", min, max);
309 }
310 
311 void DDynamicReconfigure::RegisterVariable(int *variable, std::string id, int min, int max)
312 {
313  registerVariable(id, variable, "", min, max);
314 }
315 
316 void DDynamicReconfigure::RegisterVariable(bool *variable, std::string id)
317 {
318  registerVariable(id, variable, "");
319 }
320 
321 dynamic_reconfigure::ConfigDescription DDynamicReconfigure::generateConfigDescription() const
322 {
323  dynamic_reconfigure::ConfigDescription config_description;
324 
325  std::map<std::string, dynamic_reconfigure::Group> groups;
326 
327  for (unsigned int i = 0; i < registered_int_.size(); ++i)
328  {
329  const RegisteredParam<int> &ri = *registered_int_[i];
330  dynamic_reconfigure::ParamDescription p = ri.getParamDescription();
331 
332  auto &gp = groups[ri.group_];
333  gp.parameters.push_back(p);
334 
335  // Max min def
336  dynamic_reconfigure::IntParameter ip;
337  ip.name = ri.name_;
338  ip.value = ri.getCurrentValue();
339  config_description.dflt.ints.push_back(ip);
340  ip.value = ri.max_value_;
341  config_description.max.ints.push_back(ip);
342  ip.value = ri.min_value_;
343  config_description.min.ints.push_back(ip);
344  }
345 
346  for (unsigned int i = 0; i < registered_double_.size(); ++i)
347  {
349  dynamic_reconfigure::ParamDescription p = rd.getParamDescription();
350 
351  auto &gp = groups[rd.group_];
352  gp.parameters.push_back(p);
353  // Max min def
354  dynamic_reconfigure::DoubleParameter dp;
355  dp.name = rd.name_;
356  dp.value = rd.getCurrentValue();
357  config_description.dflt.doubles.push_back(dp);
358  dp.value = rd.max_value_;
359  config_description.max.doubles.push_back(dp);
360  dp.value = rd.min_value_;
361  config_description.min.doubles.push_back(dp);
362  }
363 
364  for (unsigned int i = 0; i < registered_bool_.size(); ++i)
365  {
366  const RegisteredParam<bool> &rb = *registered_bool_[i];
367  dynamic_reconfigure::ParamDescription p = rb.getParamDescription();
368 
369  auto &gp = groups[rb.group_];
370  gp.parameters.push_back(p);
371 
372  // Max min def
373  dynamic_reconfigure::BoolParameter bp;
374  bp.name = rb.name_;
375  bp.value = rb.getCurrentValue();
376  config_description.dflt.bools.push_back(bp);
377  bp.value = rb.max_value_;
378  config_description.max.bools.push_back(bp);
379  bp.value = rb.min_value_;
380  config_description.min.bools.push_back(bp);
381  }
382  for (unsigned int i = 0; i < registered_string_.size(); ++i)
383  {
385  dynamic_reconfigure::ParamDescription p = rs.getParamDescription();
386 
387  auto &gp = groups[rs.group_];
388  gp.parameters.push_back(p);
389 
390  // Max min def
391  dynamic_reconfigure::StrParameter sp;
392  sp.name = rs.name_;
393  sp.value = rs.getCurrentValue();
394  config_description.dflt.strs.push_back(sp);
395  sp.value = rs.max_value_;
396  config_description.max.strs.push_back(sp);
397  sp.value = rs.min_value_;
398  config_description.min.strs.push_back(sp);
399  }
400 
401  auto default_group = groups["Default"];
402  default_group.name = "Default";
403  config_description.groups.push_back(default_group);
404 
405  dynamic_reconfigure::GroupState default_gs;
406  default_gs.name = "Default";
407  default_gs.state = true;
408  config_description.dflt.groups.push_back(default_gs);
409  config_description.min.groups.push_back(default_gs);
410  config_description.max.groups.push_back(default_gs);
411 
412  size_t i = 1;
413  for (auto &group : groups)
414  {
415  if (group.first == "Default")
416  {
417  continue;
418  }
419  group.second.name = group.first;
420  group.second.type = "tab";
421  group.second.id = i++;
422  config_description.groups.push_back(group.second);
423 
424  dynamic_reconfigure::GroupState gs;
425  gs.id = group.second.id;
426  gs.name = group.second.name;
427  gs.state = true;
428  config_description.dflt.groups.push_back(gs);
429  config_description.min.groups.push_back(gs);
430  config_description.max.groups.push_back(gs);
431  }
432  return config_description;
433 }
434 
435 
436 dynamic_reconfigure::Config DDynamicReconfigure::generateConfig()
437 {
438  dynamic_reconfigure::Config c;
439 
440  for (unsigned int i = 0; i < registered_int_.size(); ++i)
441  {
442  dynamic_reconfigure::IntParameter ip;
443  ip.name = registered_int_[i]->name_;
444  ip.value = registered_int_[i]->getCurrentValue();
445  c.ints.push_back(ip);
446  }
447 
448  for (unsigned int i = 0; i < registered_double_.size(); ++i)
449  {
450  dynamic_reconfigure::DoubleParameter dp;
451  dp.name = registered_double_[i]->name_;
452  dp.value = registered_double_[i]->getCurrentValue();
453  c.doubles.push_back(dp);
454  }
455 
456  for (unsigned int i = 0; i < registered_bool_.size(); ++i)
457  {
458  dynamic_reconfigure::BoolParameter bp;
459  bp.name = registered_bool_[i]->name_;
460  bp.value = registered_bool_[i]->getCurrentValue();
461  c.bools.push_back(bp);
462  }
463 
464  for (unsigned int i = 0; i < registered_string_.size(); ++i)
465  {
466  dynamic_reconfigure::StrParameter bs;
467  bs.name = registered_string_[i]->name_;
468  bs.value = registered_string_[i]->getCurrentValue();
469  c.strs.push_back(bs);
470  }
471 
472  for (size_t i = 0; i < config_groups_.size(); ++i)
473  {
474  dynamic_reconfigure::GroupState gs;
475  gs.name = config_groups_[i];
476  gs.id = i;
477  gs.state = true;
478  c.groups.push_back(gs);
479  }
480 
481  return c;
482 }
483 
484 
485 
487 {
489 }
490 
492 {
494  return;
496  new_config_avail_ = false;
497 }
498 
499 
500 // Explicit int instantations
501 template void DDynamicReconfigure::registerVariable(const std::string &name, int *variable,
502  const std::string &description, int min,
503  int max, const std::string &group);
504 
505 
506 template void DDynamicReconfigure::registerEnumVariable(const std::string &name, int *variable,
507  const std::string &description,
508  std::map<std::string, int> enum_dict,
509  const std::string &enum_description,
510  const std::string &group);
511 template void DDynamicReconfigure::registerVariable(const std::string &name, int current_value,
512  const boost::function<void(int value)> &callback,
513  const std::string &description, int min,
514  int max, const std::string &group);
515 
517  const std::string &name, int current_value, const boost::function<void(int)> &callback,
518  const std::string &description, std::map<std::string, int> enum_dict,
519  const std::string &enum_description, const std::string &group);
520 
521 
522 // Explicit double instantations
523 template void DDynamicReconfigure::registerVariable(const std::string &name, double *variable,
524  const std::string &description, double min,
525  double max, const std::string &group);
526 
527 
528 template void DDynamicReconfigure::registerEnumVariable(const std::string &name, double *variable,
529  const std::string &description,
530  std::map<std::string, double> enum_dict,
531  const std::string &enum_description,
532  const std::string &group);
534  const std::string &name, double current_value,
535  const boost::function<void(double value)> &callback, const std::string &description,
536  double min, double max, const std::string &group);
537 
539  const std::string &name, double current_value, const boost::function<void(double)> &callback,
540  const std::string &description, std::map<std::string, double> enum_dict,
541  const std::string &enum_description, const std::string &group);
542 
543 
544 
545 // Explicit bool instantations
546 template void DDynamicReconfigure::registerVariable(const std::string &name, bool *variable,
547  const std::string &description, bool min,
548  bool max, const std::string &group);
549 
550 
551 template void DDynamicReconfigure::registerEnumVariable(const std::string &name, bool *variable,
552  const std::string &description,
553  std::map<std::string, bool> enum_dict,
554  const std::string &enum_description,
555  const std::string &group);
556 template void DDynamicReconfigure::registerVariable(const std::string &name, bool current_value,
557  const boost::function<void(bool value)> &callback,
558  const std::string &description, bool min,
559  bool max, const std::string &group);
560 
562  const std::string &name, bool current_value, const boost::function<void(bool)> &callback,
563  const std::string &description, std::map<std::string, bool> enum_dict,
564  const std::string &enum_description, const std::string &group);
565 
566 
567 // Explicit std::string instantations
568 template void DDynamicReconfigure::registerVariable(const std::string &name, std::string *variable,
569  const std::string &description,
570  std::string min, std::string max,
571  const std::string &group);
572 
573 
575  const std::string &name, std::string *variable, const std::string &description,
576  std::map<std::string, std::string> enum_dict, const std::string &enum_description,
577  const std::string &group);
579  const std::string &name, std::string current_value,
580  const boost::function<void(std::string value)> &callback, const std::string &description,
581  std::string min, std::string max, const std::string &group);
582 
584  const std::string &name, std::string current_value,
585  const boost::function<void(std::string)> &callback, const std::string &description,
586  std::map<std::string, std::string> enum_dict, const std::string &enum_description,
587  const std::string &group);
588 }
ddynamic_reconfigure::RegisteredParam::getCurrentValue
virtual T getCurrentValue() const =0
ddynamic_reconfigure::DDynamicReconfigure::generateConfigDescription
virtual dynamic_reconfigure::ConfigDescription generateConfigDescription() const
Definition: ddynamic_reconfigure.cpp:321
min
int min(int a, int b)
ddynamic_reconfigure::RegisteredParam::name_
const std::string name_
Definition: registered_param.h:154
ddynamic_reconfigure.h
ddynamic_reconfigure::DDynamicReconfigure::node_handle_
ros::NodeHandle node_handle_
setUserCallback Set a function to be called when parameters have changed
Definition: ddynamic_reconfigure.h:178
ROS_ERROR_STREAM
#define ROS_ERROR_STREAM(args)
ddynamic_reconfigure::DDynamicReconfigure::getRegisteredVector
std::vector< std::unique_ptr< RegisteredParam< T > > > & getRegisteredVector()
ddynamic_reconfigure::DDynamicReconfigure::new_config_avail_
std::atomic_bool new_config_avail_
Definition: ddynamic_reconfigure.h:186
ddynamic_reconfigure::DDynamicReconfigure::config_groups_
std::vector< std::string > config_groups_
Definition: ddynamic_reconfigure.h:193
ddynamic_reconfigure::DDynamicReconfigure::setConfigCallback
virtual bool setConfigCallback(dynamic_reconfigure::Reconfigure::Request &req, dynamic_reconfigure::Reconfigure::Response &rsp)
Definition: ddynamic_reconfigure.cpp:184
ddynamic_reconfigure
Definition: ddynamic_reconfigure.h:42
ddynamic_reconfigure::DDynamicReconfigure::advertised_
bool advertised_
Definition: ddynamic_reconfigure.h:183
ddynamic_reconfigure::DDynamicReconfigure::set_service_
ros::ServiceServer set_service_
Definition: ddynamic_reconfigure.h:179
ros::NodeHandle::advertiseService
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
ddynamic_reconfigure::DDynamicReconfigure::clearUserCallback
virtual void clearUserCallback()
Definition: ddynamic_reconfigure.cpp:301
ddynamic_reconfigure::PointerRegisteredParam
Definition: registered_param.h:165
ddynamic_reconfigure::DDynamicReconfigure::updateConfigData
virtual void updateConfigData(const dynamic_reconfigure::Config &config)
Definition: ddynamic_reconfigure.cpp:264
ddynamic_reconfigure::DDynamicReconfigure::registerEnumVariable
void registerEnumVariable(const std::string &name, T *variable, const std::string &description="", std::map< std::string, T > enum_dict={}, const std::string &enum_description="", const std::string &group="Default")
Definition: ddynamic_reconfigure.cpp:78
ROS_DEBUG_STREAM
#define ROS_DEBUG_STREAM(args)
ddynamic_reconfigure::DDynamicReconfigure::registered_double_
std::vector< std::unique_ptr< RegisteredParam< double > > > registered_double_
Definition: ddynamic_reconfigure.h:190
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
ros::NodeHandle::advertise
Publisher advertise(AdvertiseOptions &ops)
ddynamic_reconfigure::DDynamicReconfigure::last_config_
dynamic_reconfigure::Config last_config_
Definition: ddynamic_reconfigure.h:198
assignValue
bool assignValue(const std::vector< T > &v, const std::string &name, const V &value)
Definition: ddynamic_reconfigure_utils.h:74
ddynamic_reconfigure::DDynamicReconfigure::registered_bool_
std::vector< std::unique_ptr< RegisteredParam< bool > > > registered_bool_
Definition: ddynamic_reconfigure.h:191
ddynamic_reconfigure::DDynamicReconfigure::PublishServicesTopics
virtual void PublishServicesTopics()
Definition: ddynamic_reconfigure.cpp:486
ddynamic_reconfigure::confCompare
bool confCompare(const ParamType &a, const ParamType &b)
Definition: ddynamic_reconfigure.cpp:141
ddynamic_reconfigure::DDynamicReconfigure::registerVariable
void registerVariable(const std::string &name, T *variable, const std::string &description="", T min=getMin< T >(), T max=getMax< T >(), const std::string &group="Default")
registerVariable register a variable to be modified via the dynamic_reconfigure API....
Definition: ddynamic_reconfigure.cpp:70
ddynamic_reconfigure::DDynamicReconfigure::updateRegisteredVariablesData
virtual void updateRegisteredVariablesData()
updateRegisteredVariablesData - Method to be called to update the registered variable,...
Definition: ddynamic_reconfigure.cpp:491
ddynamic_reconfigure::DDynamicReconfigure::setUserCallback
virtual void setUserCallback(const UserCallbackType &callback)
setUserCallback An optional callback that will be called whenever a value is changed
Definition: ddynamic_reconfigure.cpp:296
ros::Publisher::shutdown
void shutdown()
ros::Timer::setPeriod
void setPeriod(const Duration &period, bool reset=true)
ddynamic_reconfigure::DDynamicReconfigure::~DDynamicReconfigure
virtual ~DDynamicReconfigure()
Definition: ddynamic_reconfigure.cpp:13
ROS_WARN
#define ROS_WARN(...)
ddynamic_reconfigure::RegisteredParam::getParamDescription
virtual dynamic_reconfigure::ParamDescription getParamDescription() const
Definition: registered_param.h:98
attemptGetParam
void attemptGetParam(ros::NodeHandle &nh, const std::string &name, T &param, T default_value)
Definition: ddynamic_reconfigure_utils.h:88
ddynamic_reconfigure::DDynamicReconfigure::generateConfig
virtual dynamic_reconfigure::Config generateConfig()
Definition: ddynamic_reconfigure.cpp:436
ddynamic_reconfigure::DDynamicReconfigure::descr_pub_
ros::Publisher descr_pub_
Definition: ddynamic_reconfigure.h:181
ddynamic_reconfigure::RegisteredParam
Definition: registered_param.h:42
ddynamic_reconfigure::DDynamicReconfigure::RegisterVariable
virtual void RegisterVariable(double *variable, std::string id, double min=-100, double max=100)
Definition: ddynamic_reconfigure.cpp:306
ddynamic_reconfigure::DDynamicReconfigure::UserCallbackType
boost::function< void()> UserCallbackType
Definition: ddynamic_reconfigure.h:131
ros::Time
ddynamic_reconfigure::DDynamicReconfigure::pub_config_timer_
ros::Timer pub_config_timer_
Definition: ddynamic_reconfigure.h:197
ddynamic_reconfigure::DDynamicReconfigure::publishServicesTopics
virtual void publishServicesTopics()
publishServicesTopics starts the server once all the needed variables are registered
Definition: ddynamic_reconfigure.cpp:20
ddynamic_reconfigure::RegisteredParam::min_value_
const T min_value_
Definition: registered_param.h:156
ddynamic_reconfigure::DDynamicReconfigure::updated_config_
dynamic_reconfigure::Config updated_config_
Definition: ddynamic_reconfigure.h:199
ddynamic_reconfigure::DDynamicReconfigure::auto_update_
bool auto_update_
Definition: ddynamic_reconfigure.h:184
ros::ServiceServer::shutdown
void shutdown()
ddynamic_reconfigure::RegisteredParam::max_value_
const T max_value_
Definition: registered_param.h:157
ddynamic_reconfigure::DDynamicReconfigure::user_callback_
UserCallbackType user_callback_
Definition: ddynamic_reconfigure.h:195
ros::Duration::sleep
bool sleep() const
ddynamic_reconfigure::DDynamicReconfigure::DDynamicReconfigure
DDynamicReconfigure(const ros::NodeHandle &nh=ros::NodeHandle("~"), bool auto_update=true)
Definition: ddynamic_reconfigure.cpp:5
ddynamic_reconfigure::DDynamicReconfigure::registered_string_
std::vector< std::unique_ptr< RegisteredParam< std::string > > > registered_string_
Definition: ddynamic_reconfigure.h:192
ddynamic_reconfigure::DDynamicReconfigure::updatePublishedInformation
virtual void updatePublishedInformation()
Definition: ddynamic_reconfigure.cpp:154
ros::NodeHandle::createTimer
Timer createTimer(Duration period, const TimerCallback &callback, bool oneshot=false, bool autostart=true) const
ros::Duration
ddynamic_reconfigure::RegisteredParam::group_
const std::string group_
Definition: registered_param.h:160
ddynamic_reconfigure::CallbackRegisteredParam
Definition: registered_param.h:197
ddynamic_reconfigure::DDynamicReconfigure::registered_int_
std::vector< std::unique_ptr< RegisteredParam< int > > > registered_int_
Definition: ddynamic_reconfigure.h:189
getMinMax
std::pair< T, T > getMinMax(const std::map< std::string, T > &enum_map)
Definition: ddynamic_reconfigure_utils.h:96
ros::NodeHandle
ros::Time::now
static Time now()
ddynamic_reconfigure::DDynamicReconfigure::update_pub_
ros::Publisher update_pub_
Definition: ddynamic_reconfigure.h:180


ddynamic_reconfigure
Author(s): Hilario Tome
autogenerated on Wed Mar 2 2022 00:09:56