-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
smach shutdown handler #105
base: main
Are you sure you want to change the base?
Conversation
"/taluy/control/align_frame/cancel", Trigger | ||
) | ||
|
||
signal.signal(signal.SIGINT, self.shutdown_handler) |
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 believe the SIGINT signal already puts the main state machine in to preempted outcome, maybe when that outcome is achieved we just call the align frame controller and cancel it? Just asking if this signal handling is necessary
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.
SIGINT puts the main state machine to aborted outcome.
Maybe we can set each state's aborted outcome to CancelAlignControllerState
we already have. I think this may be a better way than signal handling.
1fed630
to
ee70ac7
Compare
7ce6428
to
620d5d1
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.
maybe consider hooking up preempted to cancel align controller too. This comes down to the practice I guess, just see if this works out for your problem which you've described.
f9f3486
to
b724ebd
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.
Looks good if all tested
this waits until #91 is merged |
Closes #104
Sometimes we need to shutdown the smach to prevent the robot from getting damaged. This results in robot trying to align itself to the latest frame we have sent to
align_frame_controller
.With this change we call the
taluy/control/align_frame/cancel
service when the smach is killed, which cancels thealign_frame_controller
, so the robot stays stable.