Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update client.py #171

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/dynamic_reconfigure/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def __init__(self, name, timeout=None, config_callback=None, description_callbac
self.group_description = None

self._param_types = None
self._param_types_initialized = False

self._cv = threading.Condition()

Expand Down Expand Up @@ -128,14 +129,14 @@ def get_parameter_descriptions(self, timeout=None):
"""
if timeout is None or timeout == 0.0:
with self._cv:
while self.param_description is None:
while self._param_types_initialized is False:
if rospy.is_shutdown():
return None
self._cv.wait()
else:
start_time = time.time()
with self._cv:
while self.param_description is None:
while self._param_types_initialized is False:
if rospy.is_shutdown():
return None
secs_left = timeout - (time.time() - start_time)
Expand Down Expand Up @@ -337,6 +338,7 @@ def _descriptions_msg(self, msg):
if n is not None and t is not None:
self._param_types[n] = self._param_type_from_string(t)

self._param_types_initialized = True
with self._cv:
self._cv.notifyAll()
if self._description_callback is not None:
Expand Down