-
Notifications
You must be signed in to change notification settings - Fork 938
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
planning_interface: synchronize async interfaces in test #2640
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the planner could not achieve 100%, there is no sense in executing the trajectory to find we did not arrive at the destination...
In order to synchronize we subscribe to the monitored_planning_scene of the move_group node and wait for geometry updates. Because the test is the only thing interacting with the `move_group`, it should be ok to wait for a single geometry update in each case. Additionally a short sleep needs to be added after creating MGI & PSI to allow the `move_group` node to subscribe. Otherwise the first test might fail just because the message was dropped.
Codecov Report
@@ Coverage Diff @@
## master #2640 +/- ##
==========================================
+ Coverage 60.46% 60.51% +0.06%
==========================================
Files 402 402
Lines 29619 29619
==========================================
+ Hits 17905 17920 +15
+ Misses 11714 11699 -15
Continue to review full report at Codecov.
|
rhaschke
approved these changes
May 3, 2021
rhaschke
pushed a commit
to ubi-agni/moveit
that referenced
this pull request
May 23, 2021
* MGI test: synchronize async methods for testing purposes In order to synchronize we subscribe to the monitored_planning_scene of the move_group node and wait for geometry updates. Because the test is the only thing interacting with the `move_group`, it should be ok to wait for a single geometry update in each case. Additionally, a short sleep needs to be added after creating MGI & PSI to allow the `move_group` node to subscribe. Otherwise, the first test might fail just because the message was dropped. * Add assert for computeCartesianPath's return value If the planner could not achieve 100%, there is no sense in executing the trajectory to find we did not arrive at the destination...
rhaschke
pushed a commit
to ubi-agni/moveit
that referenced
this pull request
May 23, 2021
* MGI test: synchronize async methods for testing purposes In order to synchronize we subscribe to the monitored_planning_scene of the move_group node and wait for geometry updates. Because the test is the only thing interacting with the `move_group`, it should be ok to wait for a single geometry update in each case. Additionally, a short sleep needs to be added after creating MGI & PSI to allow the `move_group` node to subscribe. Otherwise, the first test might fail just because the message was dropped. * Add assert for computeCartesianPath's return value If the planner could not achieve 100%, there is no sense in executing the trajectory to find we did not arrive at the destination...
Merged
sjahr
pushed a commit
to sjahr/moveit
that referenced
this pull request
Jun 21, 2024
As this check was missing, the CYLINDER check later on was unreachable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's always messy to synchronize these interfaces, so I don't use them in my own projects.
However, these are the only tests we have for the async method calls at the moment, so we should make them run
reliablyas reliably as possible.There is no sense in running these updates asynchronously for testing the interfaces, so I added a (somewhat cumbersome) feedback channel to wait for the triggered updates.
I'm not aware of a better solution for this that does not consist of repeatedly polling the service.
Hopefully this closes #2636 .
Locally
CartPathTest
fails quite often over here, possibly due to a full debug build that could make IK requests time out, that's why I added the additionalASSERT
there to ease debugging. I don't think I've ever seen it fail in CI though. 馃槙