-
Notifications
You must be signed in to change notification settings - Fork 192
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
"on_deactivate()" seems not called when setting the controller to be "inactive" #239
Comments
Hi, My experience on the termination with ctrl+c is that it is not really reproducible what happens (independent of ros2_control) ;) |
Oh, this is very strange. this should definitely not happen. This part of ros2_control is well tested. I would not expect bugs there, nevertheless it is possible. I will test this when testing new restructured examples in #232 to be sure. Can you check the example one from this PR and report if you get the same behavior?
I cannot answer you in detail – I know that we had a discussion about this and about catching events. But for what I know, we are not doing a graceful “shutdown” of the framework. It is definitely something to think about, but until now, it wasn't really an issue in all the robots we have tested this. This functionality has to be shaped well since it would include all standard and user-components to have pre-defined behavior. |
Yes. I can reproduce the behavior and find a new problem.. I comment the print information of read()&write() in diffbot_system.cpp. When launching When When
|
I can reproduce your behavior. Honestly I'm not sure about the lifecycle of the hardware interface, should it be activated/deactivated automatically if doing so with the controllers? @destogl? The segmentation fault happens only with the
I used this commit https://github.com/christophfroehlich/ros2_control_demos/tree/issue_239 and the current rolling branches of ros2_control and ros2_controllers |
I tried to investigate the segmentation fault, but did not find the source.
How can the set_value be called but the this-pointer be obsolete? The @destogl or @bmagyar: Any other suggestions how to narrow that down? |
We have here potentially multiple issues.
|
This sounds like quite a deep problem. Maybe something in the Resource Manager when we change interface flags is not right. But we are not moving them or invalidating them. Do we have a test for this in Resource Manager? |
Hi, I've created that PR for |
@destogl to clarify this: the segmentation fault happens when the controller is deactivated while the hw component being still active (there are two topics mixed in this issue). I'll have a look on the PR of @Noel215, I fear I still don't understand the handle registration sufficiently.
ok
We don't have any tests for the hardware components in this repo yet, see #46! do you have a hint to examples of tests we should add here? |
I'll close this issue now, summary from the initial post of @xibeisiber :
lets discuss the other points in the linked issues |
Hi,
I tried
diffbot.launch.py
andrrbot_system_position_only.launch.py
. The printing information inon_activate()
is printed out in console, but when I "ros2 control set_controller_state forward_position_controller inactive" and "ros2 control set_controller_state diffbot_base_controller inactive", the printing information in "on_deactivate()" is not printed in console.Another question is: will
on_deactivate()
be automatically called when I terminate the startup node (press ctrl+c indiffbot.launch.py
)?Thanks!
Jia
The text was updated successfully, but these errors were encountered: