38 from rospy
import ServiceException
45 Using dynamic_reconfigure that is passed in __init__, this thread updates 46 the Dynamic Reconfigure server's value. 48 This class works for a single element in a single parameter. 55 :type reconf: dynamic_reconfigure 67 _timestamp_last_commit =
None 69 logging.debug(
' ParamUpdater started')
74 logging.debug(
' ParamUpdater loop 1.1')
75 self._condition_variable.wait()
76 logging.debug(
' ParamUpdater loop 1.2')
77 logging.debug(
' ParamUpdater loop 2')
82 _timestamp_last_commit = time.time()
83 configs_tobe_updated = self._configs_pending.copy()
86 logging.debug(
' run last_commit={}, last_pend={}'.format(
90 self._reconf.update_configuration(configs_tobe_updated)
91 except ServiceException
as ex:
92 logging.debug(
'Could not update configs due to {}'.format(
94 except Exception
as exc:
99 for name, value
in config.items():
104 self._condition_variable.notify()
109 self._condition_variable.notify()