-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
wb_robot_cleanup fix for python plugins #781
Conversation
I was able to handle the SIGINT inside the drive, however the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Thank you for the contribution. Could you please add an entry in both related changelogs?
I will further investigate if we can terminate cleanly the supervisor node too.
Have you tried to run some examples on Iron distribution (I am not sure if the following error is also on Humble), because I found a problem in examples that don't use Python plugins, namely If I start it: ros2 launch webots_ros2_tiago robot_launch.py and then interrupt it with Ctrl+C, I get the following logs:
It is not related to the changes of this PR but I wonder if we should not try to fix this issue at the same time. What do you think? |
I have not been able to test it in Iron, I will run it in Humble to see if it also happens. |
I was checking, that maybe the problem is related to the return added in
inside the condition when the signal is captured, I'm returning -1 without calling wb_robot_step (code diff)
if (gShutdownSignalReceived && !mWaitingForUrdfRobotToBeRemoved) {
mRemoveUrdfRobotPublisher->publish(mRemoveUrdfRobotMessage);
mWaitingForUrdfRobotToBeRemoved = true;
return -1
} once the SIGINT is received, should it call Anyway, I will check it out |
This error also occurs in the master branch, so it doesn't seem to be related to the changes of this PR. We can already merge this to fix the termination of Python plugins and I will open an issue for C++ plugins on Iron. |
@angel-ayala, can you update the changelogs, so that we can merge this PR before releasing 2023.1.1? |
yeah sure, I was finishing some issues with my project's code. I will update this today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
trying to solve #476 by adding a
stop()
method in python plugins