Repository navigation
De-flake trajectory_cache _with_move_group tests - #3777
Merged
nbbrooks merged 2 commits intoAug 3, 2026
Merged
Conversation
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family. Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3777 +/- ##
==========================================
+ Coverage 46.23% 46.29% +0.06%
==========================================
Files 726 726
Lines 59512 59508 -4
Branches 7622 7623 +1
==========================================
+ Hits 27509 27541 +32
+ Misses 31836 31800 -36
Partials 167 167 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 of 5 tasks
nbbrooks
added a commit
that referenced
this pull request
Aug 3, 2026
Same fix as #3777, applied to the four remaining fixtures with the pattern. Each launched its gtest node on a fixed TimerAction while controller spawners ran in parallel. Under load the spawner has not finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently: TimerAction(period=N, actions=[<gtest>]) Replaced with a gate on the last spawner exiting -- spawner exits 0 only after the controller is active, so the gtest is guaranteed a live publisher: RegisterEventHandler(OnProcessExit(target_action=<last_spawner>, on_exit=[<gtest>])) Fixtures changed: moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_utils.test.py moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py Verified locally in the Resolute audit container before this change was first written: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Previously each flaked at roughly the same rate as the trajectory_cache family #3777 addressed. test_basic_integration.test.py additionally needed RegisterEventHandler and OnProcessExit imported -- it calls them unqualified, unlike the servo fixtures which use launch.actions.RegisterEventHandler. Without the import the fixture raises NameError at launch. Not changed, because they chain TimerActions across ros2_control and several spawners rather than gating on one terminal timer -- picking the correct target_action needs a real reproducer of each family's failure: moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py moveit_ros/tests/launch/move_group_api.test.py Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
nbbrooks
added a commit
that referenced
this pull request
Aug 3, 2026
Same fix as #3777, applied to the four remaining fixtures with the pattern. Each launched its gtest node on a fixed TimerAction while controller spawners ran in parallel. Under load the spawner has not finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently: TimerAction(period=N, actions=[<gtest>]) Replaced with a gate on the last spawner exiting -- spawner exits 0 only after the controller is active, so the gtest is guaranteed a live publisher: RegisterEventHandler(OnProcessExit(target_action=<last_spawner>, on_exit=[<gtest>])) Fixtures changed: moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_utils.test.py moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py Verified locally in the Resolute audit container before this change was first written: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Previously each flaked at roughly the same rate as the trajectory_cache family #3777 addressed. test_basic_integration.test.py additionally needed RegisterEventHandler and OnProcessExit imported -- it calls them unqualified, unlike the servo fixtures which use launch.actions.RegisterEventHandler. Without the import the fixture raises NameError at launch. Not changed, because they chain TimerActions across ros2_control and several spawners rather than gating on one terminal timer -- picking the correct target_action needs a real reproducer of each family's failure: moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py moveit_ros/tests/launch/move_group_api.test.py Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 15, 2026
nbbrooks
added a commit
that referenced
this pull request
Sep 22, 2026
test_motion_plan_request_features_with_move_group has been the recurring failure in the jazzy-ci + ikfast job (runs 34683703000, 34819993343, 35124906659), while every other matrix entry passes on the same commits. The test asserts that StartStateJointStateFeatures writes insert metadata. For an is_diff start state that path calls MoveGroupInterface::getCurrentState(), which only waits one second for a complete robot state; when it times out the feature returns UNABLE_TO_AQUIRE_SENSOR_DATA, no metadata is written, and the follow-on queryList assertions fail with "no such column: M_StartStateJointStateFeatures.start_state.joint_state.name_0". The gating added in #3777 is working: joint_state_broadcaster is activated and publishing before the test binary launches. What remains is subscriber-side discovery of /joint_states taking longer than a second on a loaded runner. The fixture's own spin loop made that worse by busy-waiting at 100% CPU while several of these tests run concurrently under ctest. So prime the current state monitor once in SetUp() with a 10s timeout, so the short waits inside the cache always find a populated monitor, and block in spin_once() instead of hot-looping on spin_some(). Raise the add_ros_test timeouts to 120s so a genuine /joint_states failure reports the assertion message rather than being killed by the harness. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
nbbrooks
added a commit
that referenced
this pull request
Sep 22, 2026
* De-flake trajectory_cache _with_move_group tests, take 2 test_motion_plan_request_features_with_move_group has been the recurring failure in the jazzy-ci + ikfast job (runs 34683703000, 34819993343, 35124906659), while every other matrix entry passes on the same commits. The test asserts that StartStateJointStateFeatures writes insert metadata. For an is_diff start state that path calls MoveGroupInterface::getCurrentState(), which only waits one second for a complete robot state; when it times out the feature returns UNABLE_TO_AQUIRE_SENSOR_DATA, no metadata is written, and the follow-on queryList assertions fail with "no such column: M_StartStateJointStateFeatures.start_state.joint_state.name_0". The gating added in #3777 is working: joint_state_broadcaster is activated and publishing before the test binary launches. What remains is subscriber-side discovery of /joint_states taking longer than a second on a loaded runner. The fixture's own spin loop made that worse by busy-waiting at 100% CPU while several of these tests run concurrently under ctest. So prime the current state monitor once in SetUp() with a 10s timeout, so the short waits inside the cache always find a populated monitor, and block in spin_once() instead of hot-looping on spin_some(). Raise the add_ros_test timeouts to 120s so a genuine /joint_states failure reports the assertion message rather than being killed by the harness. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Use UPPER_CASE for the new fixture constants clang-tidy's readability-identifier-naming requires GlobalConstantCase to be UPPER_CASE, which is also what the rest of the trajectory_cache package uses. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
RazvanApostuWF
pushed a commit
to wefabricate/moveit2
that referenced
this pull request
Sep 24, 2026
* De-flake trajectory_cache _with_move_group tests, take 2 test_motion_plan_request_features_with_move_group has been the recurring failure in the jazzy-ci + ikfast job (runs 34683703000, 34819993343, 35124906659), while every other matrix entry passes on the same commits. The test asserts that StartStateJointStateFeatures writes insert metadata. For an is_diff start state that path calls MoveGroupInterface::getCurrentState(), which only waits one second for a complete robot state; when it times out the feature returns UNABLE_TO_AQUIRE_SENSOR_DATA, no metadata is written, and the follow-on queryList assertions fail with "no such column: M_StartStateJointStateFeatures.start_state.joint_state.name_0". The gating added in moveit#3777 is working: joint_state_broadcaster is activated and publishing before the test binary launches. What remains is subscriber-side discovery of /joint_states taking longer than a second on a loaded runner. The fixture's own spin loop made that worse by busy-waiting at 100% CPU while several of these tests run concurrently under ctest. So prime the current state monitor once in SetUp() with a 10s timeout, so the short waits inside the cache always find a populated monitor, and block in spin_once() instead of hot-looping on spin_some(). Raise the add_ros_test timeouts to 120s so a genuine /joint_states failure reports the assertion message rather than being killed by the harness. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Use UPPER_CASE for the new fixture constants clang-tidy's readability-identifier-naming requires GlobalConstantCase to be UPPER_CASE, which is also what the rest of the trajectory_cache package uses. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit b222baf)
RazvanApostuWF
added a commit
to wefabricate/moveit2
that referenced
this pull request
Sep 24, 2026
* utils: Added check for constrain region position and modified warnings * Removed COLCON_IGNORE file from trajectory_cache package * CI: CI now removes the colcon_ignore files on build to prevent compatibility issues * CI: Keep moveit_setup_simulation ignored and stage COLCON_IGNORE removal - moveit_setup_simulation is COLCON_IGNOREd upstream (unfinished port), so it stays ignored in CI - git rm stages the deletions, keeping them out of the clang-tidy patch (git diff) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Include rviz_common/logging.hpp where RVIZ_COMMON_LOG_* is used (moveit#3861) * Include rviz_common/logging.hpp where RVIZ_COMMON_LOG_* is used rolling-ci broke on main between Sep 16 (093360f, green) and Sep 22 (b89c048, red) with a build failure, not a test failure: rviz_plugin_render_tools/src/trajectory_visualization.cpp:166:5: error: 'RVIZ_COMMON_LOG_WARNING' was not declared in this scope 1 package failed: moveit_ros_visualization No MoveIt commit in that window touches visualization. The trigger was the weekly moveit/moveit2:rolling-ci image rebuild on Sep 19 (run 35463509686), which moved rviz from 16.0.2-1resolute.20260821 to 16.0.3-1resolute.20260916. That same scheduled run's source (rolling) image build already hit this error. The upstream change is ros2/rviz#1798 ("Moved implementation to cpp", merged 2026-07-16), which removed #include "rviz_common/logging.hpp" from rviz_common/interaction/forwards.hpp. That was the one include path by which trajectory_visualization.cpp reached the RVIZ_COMMON_LOG_* macros: trajectory_visualization.cpp -> rviz_default_plugins/robot/robot_link.hpp -> rviz_common/interaction/forwards.hpp -> rviz_common/logging.hpp (edge removed by moveit#1798) Walking the include graph of both release tarballs finds exactly one path at 16.0.2 and none at 16.0.3. trajectory_visualization.cpp is just the first file the build reaches. robot_state_display.cpp and interactive_marker_display.cpp have no path to logging.hpp under 16.0.3 either and would fail as soon as the build gets past moveit_rviz_plugin_render_tools; planning_scene_display.cpp still reaches it via transformation_manager.hpp -> pluginlib_factory.hpp. Include the header explicitly in all four rather than leaving three of them on an accident. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Include rviz_common/frame_manager_iface.hpp where getFrameManager() is used Second casualty of the same rviz 16.0.3 include cleanup. With the logging.hpp fix in place the build gets further and then fails on: planning_scene_display.cpp:741:30: error: invalid use of incomplete type 'class rviz_common::FrameManagerIface' ros2/rviz#1829 ("Cleanup headers") dropped #include "frame_manager_iface.hpp" from display_context.hpp, so `context_->getFrameManager()->...` now sees only the forward declaration that display_context.hpp still carries. robot_state_display.cpp already includes the header directly and is fine. interactive_marker_display.cpp has the same call and additionally upcasts the shared_ptr from getTransformer(), so it needs the complete FrameTransformer type too. Diffing the reachable-header sets of every file under moveit_ros/visualization between the 16.0.2 and 16.0.3 trees, five rviz headers stop being reachable: logging.hpp, logging_handler.hpp, frame_manager_iface.hpp, frame_transformer.hpp and ros_integration/ros_node_abstraction.hpp. Of those, only logging.hpp (the previous commit), frame_manager_iface.hpp and frame_transformer.hpp are used by symbol anywhere in the tree, and all are now included directly. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 82b575f) * De-flake trajectory_cache _with_move_group tests, take 2 (moveit#3859) * De-flake trajectory_cache _with_move_group tests, take 2 test_motion_plan_request_features_with_move_group has been the recurring failure in the jazzy-ci + ikfast job (runs 34683703000, 34819993343, 35124906659), while every other matrix entry passes on the same commits. The test asserts that StartStateJointStateFeatures writes insert metadata. For an is_diff start state that path calls MoveGroupInterface::getCurrentState(), which only waits one second for a complete robot state; when it times out the feature returns UNABLE_TO_AQUIRE_SENSOR_DATA, no metadata is written, and the follow-on queryList assertions fail with "no such column: M_StartStateJointStateFeatures.start_state.joint_state.name_0". The gating added in moveit#3777 is working: joint_state_broadcaster is activated and publishing before the test binary launches. What remains is subscriber-side discovery of /joint_states taking longer than a second on a loaded runner. The fixture's own spin loop made that worse by busy-waiting at 100% CPU while several of these tests run concurrently under ctest. So prime the current state monitor once in SetUp() with a 10s timeout, so the short waits inside the cache always find a populated monitor, and block in spin_once() instead of hot-looping on spin_some(). Raise the add_ros_test timeouts to 120s so a genuine /joint_states failure reports the assertion message rather than being killed by the harness. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Use UPPER_CASE for the new fixture constants clang-tidy's readability-identifier-naming requires GlobalConstantCase to be UPPER_CASE, which is also what the rest of the trajectory_cache package uses. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit b222baf) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Nathan Brooks <[email protected]>
2 of 5 tasks
This was referenced Sep 25, 2026
1 task done
nbbrooks
added a commit
that referenced
this pull request
Oct 22, 2026
Same fix as #3777, applied to the four remaining fixtures with the pattern. Each launched its gtest node on a fixed TimerAction while controller spawners ran in parallel. Under load the spawner has not finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently: TimerAction(period=N, actions=[<gtest>]) Replaced with a gate on the last spawner exiting -- spawner exits 0 only after the controller is active, so the gtest is guaranteed a live publisher: RegisterEventHandler(OnProcessExit(target_action=<last_spawner>, on_exit=[<gtest>])) Fixtures changed: moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_utils.test.py moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py Verified locally in the Resolute audit container before this change was first written: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Previously each flaked at roughly the same rate as the trajectory_cache family #3777 addressed. test_basic_integration.test.py additionally needed RegisterEventHandler and OnProcessExit imported -- it calls them unqualified, unlike the servo fixtures which use launch.actions.RegisterEventHandler. Without the import the fixture raises NameError at launch. Not changed, because they chain TimerActions across ros2_control and several spawners rather than gating on one terminal timer -- picking the correct target_action needs a real reproducer of each family's failure: moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py moveit_ros/tests/launch/move_group_api.test.py (cherry picked from commit 40f3140) Co-authored-by: Nathan Brooks <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
nbbrooks
added a commit
that referenced
this pull request
Oct 26, 2026
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family. Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit e017c91)
1 of 6 tasks
130s
pushed a commit
that referenced
this pull request
Nov 23, 2026
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family. Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit e017c91)
130s
pushed a commit
that referenced
this pull request
Nov 23, 2026
* De-flake trajectory_cache _with_move_group tests, take 2 test_motion_plan_request_features_with_move_group has been the recurring failure in the jazzy-ci + ikfast job (runs 34683703000, 34819993343, 35124906659), while every other matrix entry passes on the same commits. The test asserts that StartStateJointStateFeatures writes insert metadata. For an is_diff start state that path calls MoveGroupInterface::getCurrentState(), which only waits one second for a complete robot state; when it times out the feature returns UNABLE_TO_AQUIRE_SENSOR_DATA, no metadata is written, and the follow-on queryList assertions fail with "no such column: M_StartStateJointStateFeatures.start_state.joint_state.name_0". The gating added in #3777 is working: joint_state_broadcaster is activated and publishing before the test binary launches. What remains is subscriber-side discovery of /joint_states taking longer than a second on a loaded runner. The fixture's own spin loop made that worse by busy-waiting at 100% CPU while several of these tests run concurrently under ctest. So prime the current state monitor once in SetUp() with a 10s timeout, so the short waits inside the cache always find a populated monitor, and block in spin_once() instead of hot-looping on spin_some(). Raise the add_ros_test timeouts to 120s so a genuine /joint_states failure reports the assertion message rather than being killed by the harness. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Use UPPER_CASE for the new fixture constants clang-tidy's readability-identifier-naming requires GlobalConstantCase to be UPPER_CASE, which is also what the rest of the trajectory_cache package uses. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit b222baf)
130s
pushed a commit
that referenced
this pull request
Nov 23, 2026
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family. Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit e017c91)
idesign0
added a commit
to idesign0/id_moveit2
that referenced
this pull request
Nov 30, 2026
The only conflict was collision_common.hpp's DistanceMap key: our a87d862/bcb5c49b4 and upstream's aa64747 (moveit#3548, ours) both drop the const from the std::pair key and differ by one space; upstream's line is taken. Upstream's 7 new jazzy commits are launch/test Python (moveit#3851, moveit#3777, moveit#3937), the GIL release in moveit_py (moveit#3935), moveit#3548, and FloatingJointModel::getMaximumExtent() (moveit#3854: M_PI * 0.5 -> M_PI). The fork's other macOS changes carry over unchanged (octomap-distribution depend, pilz joint_limits_common links, moveit_py_utils Python3::Module, fmt::fmt, perception GLEW target + OpenCV, the Apple progress-bar drawing fix, urdf_config fmt/ranges.h). Not compile-tested locally: none of our lines changed in this merge, and the upstream C++ it brings in is a one-constant change in floating_joint_model.cpp plus the moveit_py GIL release; the jazzy layered build is the check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or 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
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.
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family.
Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely.
Description
Please explain the changes you made, including a reference to the related issue if applicable
Checklist