geometry2 icon indicating copy to clipboard operation
geometry2 copied to clipboard

Foxy: The test test_message_filter of test_tf2 fails sometimes, but not always

Open zhoulaifu opened this issue 4 years ago • 4 comments

On ROS foxy, sometimes (not always) test_tf2/test/test_message_filter fails.

/opt/ros_ws/src/src/geometry2/test_tf2/test/test_message_filter.cpp:217: Failure
Expected equality of these values:
  messages
    Which is: 30
  n.count_
    Which is: 29
[  FAILED  ] MessageFilter.concurrentTransforms (658 ms)
[ RUN      ] MessageFilter.setTargetFrame
[       OK ] MessageFilter.setTargetFrame (11 ms)
[ RUN      ] MessageFilter.multipleTargetFrames
[       OK ] MessageFilter.multipleTargetFrames (8 ms)
[ RUN      ] MessageFilter.tolerance
[       OK ] MessageFilter.tolerance (11 ms)
[----------] 8 tests from MessageFilter (751 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (751 ms total)
[  PASSED  ] 7 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] MessageFilter.concurrentTransforms

 1 FAILED TEST 

I used this command line of a ros:foxy docker machine:

for i in {1..50}; do ./build/test_tf2/test_message_filter; done

zhoulaifu avatar Feb 08 '21 14:02 zhoulaifu

I'm not able to reproduce this on the latest, so there is probably something we need to backport to Foxy.

clalancette avatar Feb 08 '21 14:02 clalancette

Thanks Chris!

Just want to make sure: does "docker pull ros:rolling" give us the latest version of ROS?

And for geometry2, it is "ros2" tag that corresponds to your latest version?

zhoulaifu avatar Feb 08 '21 14:02 zhoulaifu

Just want to make sure: does "docker pull ros:rolling" gives us the latest version of ROS?

The way that this works is that we do all of the development on the "master" or "ros2" branches of our repositories. Periodically (every 2 - 4 weeks), we do releases of that code into Rolling. So Rolling isn't always the latest, it will lag behind the source versions a bit.

And for geometry2, it is "ros2" tag that corresponds to your latest version?

Yes, for this repository, the "ros2" branch is the latest.

clalancette avatar Feb 08 '21 14:02 clalancette

I just noticed that this is happening on our nightly Foxy CI too, it failed 5/25 latest builds:

https://build.ros2.org/job/Fci__nightly-connext_ubuntu_focal_amd64/lastSuccessfulBuild/testReport/test_tf2/MessageFilter/concurrentTransforms/history/

But it passes consistently on Galactic:

https://build.ros2.org/job/Gci__nightly-connext_ubuntu_focal_amd64/lastSuccessfulBuild/testReport/test_tf2/MessageFilter/concurrentTransforms/history/

As reference, the test was added to Galactic (Rolling at the time) in #274 and backported to Foxy on #353. The only difference in the test itself is that the Foxy version sleeps a bit more:

https://github.com/ros2/geometry2/compare/foxy..galactic#diff-734d7ff452db26ecc17a94b5e021055e6cfe7bc3a36735d4f452178d4162de68

The sleep was removed from Galactic in https://github.com/ros2/geometry2/pull/307, which was meant to fix https://github.com/ros2/geometry2/issues/305, which is very similar to this issue.

So I think it's worth backporting that PR. See https://github.com/ros2/geometry2/pull/449.


https://github.com/osrf/buildfarmer/issues/224

chapulina avatar Aug 26 '21 18:08 chapulina