-
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
Hold button pause actionlib #61
base: master
Are you sure you want to change the base?
Conversation
ros::Duration(pause_time_after_release).sleep(); | ||
|
||
ros::Duration(pause_time_after_extend).sleep(); | ||
//wait until the panel intake button is released before retracting mech and lowering elevator |
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.
For this part, would preempting the actionlib call on button release work?
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.
What do you mean? On button release, the actionlib action should finish, not get preempted.
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 think sending a preempt will cause the code to finish. It will break out of the loop and then since there are no checks for !preempted around the remaining actions, the action will finish. It's a lot easier than adding a service call specifically to get out of the loop.
Holding panel place button pauses after panel mech extension and before releasing panel.
Holding intake panel button pauses after unclamp and extension.
Quickly pressing either button should execute the actionlib sequence without pausing.