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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

planning_interface: synchronize async interfaces in test #2640

Merged
merged 2 commits into from
May 3, 2021

Conversation

v4hn
Copy link
Contributor

@v4hn v4hn commented Apr 30, 2021

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 reliably as 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 additional ASSERT there to ease debugging. I don't think I've ever seen it fail in CI though. 馃槙

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

codecov bot commented Apr 30, 2021

Codecov Report

Merging #2640 (c01f6b3) into master (9f75a7e) will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage 螖
moveit_core/robot_state/src/robot_state.cpp 50.77% <0.00%> (+0.10%) 猬嗭笍
...raint_samplers/src/default_constraint_samplers.cpp 84.22% <0.00%> (+0.33%) 猬嗭笍
...nning_scene_monitor/src/planning_scene_monitor.cpp 68.55% <0.00%> (+0.42%) 猬嗭笍
moveit_core/planning_scene/src/planning_scene.cpp 60.33% <0.00%> (+0.64%) 猬嗭笍
...meterization/work_space/pose_model_state_space.cpp 82.70% <0.00%> (+0.65%) 猬嗭笍
...ipulation/pick_place/src/manipulation_pipeline.cpp 73.79% <0.00%> (+1.95%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 9f75a7e...c01f6b3. Read the comment docs.

@rhaschke rhaschke merged commit 005de1f into moveit:master 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...
@rhaschke rhaschke mentioned this pull request May 23, 2021
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flaky tests for MoveGroupInterface/PlanningSceneInterface
2 participants