Skip to content
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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

adam-kosinski
Copy link
Contributor

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.

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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants