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

Exit when objective is done befire timeout #69

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

mkhansenbot
Copy link
Contributor

Fixes #68

Instead of sleeping for the entire timeout duration, it sleeps for 1 second at a time and checks if the objective is done. If the objective is done, it exits. If it reaches the timeout, then it cancels the objective as before.

root@mkhansen-ThinkPad-T15-Gen-2i:/opt/moveit_studio_sdk_ws# ros2 run moveit_studio_py start_stop_async.py "3 Waypoints Pick and Place" 10
Starting 3 Waypoints Pick and Place.
Stopping 3 Waypoints Pick and Place.
Objective STOPPED by user
root@mkhansen-ThinkPad-T15-Gen-2i:/opt/moveit_studio_sdk_ws# ros2 run moveit_studio_py start_stop_async.py "Open Gripper" 10
Starting Open Gripper.
Objective executed successfully!

Copy link
Contributor

@mewtwoshaurd mewtwoshaurd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ran through pre-commit so it would pass CI

@mewtwoshaurd mewtwoshaurd merged commit 109acb0 into main Oct 24, 2024
2 checks passed
@mewtwoshaurd mewtwoshaurd deleted the exit_when_done branch October 24, 2024 19:52
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.

Async mode doesn't exit when an objective completes
2 participants