-
Notifications
You must be signed in to change notification settings - Fork 914
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
Race condition between roscore
and roslaunch --wait
#1097
Comments
I guess it is an uncommon use case to start Beside that I am not sure why you want to invoke Anyway regarding the mentioned new option it would be great if you could provide a PR implementing it if that is of use for your application. |
Thanks for the suggestion! We have a containerized setup running on Kubernetes. When you create a deployment, it starts a Does anybody start the |
The Therefore adding a new option for this is better. Both options could even make sense to be used together or not. E.g. using |
I don't quite understand this. As I understand,
From then on, the option is largely ignored, and If the I share your caution about changing the behavior of the existing code, but the current behaviour of
This would not be reliable - |
I definitely assumed the behaviour of We don't currently but have contemplated an architecture of starting Given that the documentation literally says:
I would support making the existing flag suppress all aspects of the roscore (rosmaster, rosout node). |
Same. I've been fighting this issue for an application much like drigz's. The current behavior seems non-intuitive, and not well described by the documentation. |
My memory of the existing options was wrong. I had to re-read the relevant code to understand what it actually does. Sorry for that. I agree with your idea to change the behavior that when passing One way of achieving this (without passing the flag through multiple levels of API) would be to update |
Great idea - that's a super simple way to fix it, and fixes the issue in my reproduction setup. Thanks! |
@drigz Thank you for testing the patch. Now I just have to get CI to turn green 😉 |
Steps to reproduce
Rarely, both roscore and roslaunch will start the rosout node. If this happens, the rosout nodes will conflict forever as they are both started with
respawn="true"
.To make this more likely to happen, you can do the following:
Explanation
If you run
roslaunch --wait
, it will wait for the master before starting, but the--wait
flag has no effect on the starting of core nodes. In roslaunch/launch.py, we have:unconditionally of whether
--core
or--wait
is used. In the--wait
case,rlutil._wait_for_master
has already been called, and_launch_master()
notices that the master is already running so does nothing. However,_launch_core_nodes
may still try to launchrosout
if the roscore hasn't started it yet.Workaround
Run this command before
roslaunch --wait
:The text was updated successfully, but these errors were encountered: