-
Notifications
You must be signed in to change notification settings - Fork 430
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
Bugfix 20210810 get current state #1756
Bugfix 20210810 get current state #1756
Conversation
a9de1b6
to
de7ec73
Compare
@iuhilnehc-ynos @Barry-Xu-2018 could you guys review this if you got time? |
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.
@fujitatomoya
few minor comments. (I might be wrong, if so, please ignore them.)
@clalancette @ivanpauno what do you think about this fix? there is still discussion needs to be done for future, but this can fix #1746 (avoid crash and exception.) |
99798a1
to
3a3d395
Compare
3a3d395
to
131841a
Compare
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.
I've left a few more comments, and we still have open the question on what to do with get_current_state
. But this is getting closer.
@clalancette thanks, i will look into comments and get back to you. |
131841a
to
d88adf8
Compare
I am still requesting some help for a couple of questions. any comments will do good! |
@clalancette @iuhilnehc-ynos friendly ping. |
e28ab16
to
2d9e5d5
Compare
protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2d9e5d5
to
5be565f
Compare
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.
With all of the latest fixes, I've now rebased this onto the latest. I think this looks much better now and should fix the original problem. That said, since I did substantial work on this, I'd like @fujitatomoya to take another look at this before we go ahead with it.
This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette thanks i will take a look at this soon. |
@fujitatomoya is this backportable to humble? Edit: In particular, this is useful with gazebo11 + gazebo-ros + gazebo-ros2-control Humble setup, because spurious |
Unfortunately I do not think so, this breaks ABI so cannot land on humble. |
It is probably possible to make an ABI-preserving fix by introducing a map of State pointers to mutexes, and then looking up the appropriate mutex in that map as needed. But someone needs to find the time to do that. |
* protect state_machine_ with mutex lock. protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Move updating of current_state to right after initialization. This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* protect state_machine_ with mutex lock. protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Move updating of current_state to right after initialization. This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* protect state_machine_ with mutex lock. protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Move updating of current_state to right after initialization. This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* protect state_machine_ with mutex lock. protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Move updating of current_state to right after initialization. This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Joe Schornak <joe.schornak@gmail.com>
* protect state_machine_ with mutex lock. protect state_handle_ with mutex lock. reconsider mutex lock scope. remove mutex lock from constructors. lock just once during initialization of LifecycleNodeInterfaceImpl. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Move updating of current_state to right after initialization. This is slightly more correct in the case that registering one of the services fails. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Joe Schornak <joe.schornak@gmail.com>
fix #1746