moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.11k stars 533 forks source link

Fixes flaky RobotState test (backport #3105) #3107

Closed mergify[bot] closed 1 week ago

mergify[bot] commented 1 week ago

Description

Fixes #3103 by ensuring that the dirty_link_transforms_ member is cleared before querying the RobotState

See #3102 for more details on the cause.

TLDR:

Setting the build type to Release causes tests to silently fail, whereas Debug does not (some tests rely on assert calls, which are enabled / disabled based on the presence of the NDBUG macro variable, which is set by CMake depending on the build type).

See the SonarScan pipeline call to ros-industrial/industrial_ci@master, which sets DCMAKE_BUILD_TYPE to Debug (and where the tests fail), and the same call in the rolling-ci pipeline (where the tests pass), which sets the same variable to Release.

I've also added a comment (and demonstration of the fix, at least for this test) locally.

Checklist


This is an automatic backport of pull request #3105 done by Mergify.

mergify[bot] commented 1 week ago

Cherry-pick of f20265a5a2551b3270373d6ff6925c1299adc6c6 has failed:

On branch mergify/bp/humble/pr-3105
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit f20265a5a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   moveit_core/robot_state/test/robot_state_test.cpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

TSNoble commented 1 week ago

@sea-bass Thanks for fixing the conflicts 😄