-
Notifications
You must be signed in to change notification settings - Fork 483
Description
Bug report
Required Info:
- Operating System:
- ubuntu 16.04
- Installation type:
- from binary of crystal release
- Version or commit hash:
- DDS implementation:
- Client library (if applicable):
Steps to reproduce issue
Yesterday, i wrote a simple test to get myself familiar with parameter client in ros2. My code is hosted at example. There is a luanch script which launchs a node to set parameter and another node to get parameter from first node using SyncParametersClient interaface.
I ran this launch script multiple times, and found that sometimes the second node will wait too long for service after the first node has launched. This seems not good to me.
In a more rare case, after the first node has launched, the second node never successfully wait_for_service. The log is given below:
➜ ~ ros2 launch param_test access_other_node_param_launch.py
[INFO] [launch]: process[set_and_get_parameters-1]: started with pid [38386]
[INFO] [launch]: process[access_other_node_parameters-2]: started with pid [38387]
[INFO] [access_other_node_parameters]: access parameters of other node
[INFO] [set_and_get_parameters]:
Parameter name: foo
Parameter value (integer): 2
Parameter name: baz
Parameter value (double): 1.450000
Parameter name: bar
Parameter value (string): hello
Parameter name: foobar
Parameter value (bool): true
[INFO] [access_other_node_parameters]: service not available, waiting again...
[INFO] [access_other_node_parameters]: service not available, waiting again...
[INFO] [access_other_node_parameters]: service not available, waiting again...
To reproduce this error, you can execute the launch file multiple times, maybe 10 or 20 times, and this should happen.
Expected behavior
Quick and successful response for wait_for_service in parameter client
Actual behavior
waiting too long or more worse, never succuess