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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fortress] Fix triggered camera test #215

Merged
merged 6 commits into from
May 12, 2022

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Apr 9, 2022

🦟 Bug fix

Starts to fix a broken test for triggered cameras

Summary

A test for triggered cameras was added in #194, but it has a few issues.

  • It's gtest class name is a duplicate of that from test/integration/camera.cc, so change it to TriggeredCameraTest
  • The test was also being skipped on Ubuntu (which uses ogre2 for testing) due to an irrelevant requirement related to segmentation camera sensors.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

scpeters added 3 commits April 9, 2022 03:03
Don't limit test to ogre1.

Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Apr 9, 2022
@scpeters scpeters mentioned this pull request Apr 9, 2022
8 tasks
@scpeters
Copy link
Member Author

the triggered camera test is now failing on both Ubuntu and macOS:

[ RUN      ] CameraSensor/TriggeredCameraTest.ImagesWithBuiltinSDF/ogre2
  [Msg] Loading plugin [ignition-rendering-ogre2]
  [Dbg] [CameraSensor.cc:294] Camera images for [camera1] advertised on [/test/integration/TriggeredCameraPlugin_imagesWithBuiltinSDF]
  [Dbg] [CameraSensor.cc:318] Camera trigger messages for [camera1] subscribed on [__default__/trigger]
  [Dbg] [CameraSensor.cc:591] Camera info for [camera1] advertised on [/test/integration/camera_info]
  /github/workspace/test/integration/triggered_camera.cc:133: Failure
  Value of: helper.WaitForMessage(3s)
    Actual: false
  Expected: true
  [  FAILED  ] CameraSensor/TriggeredCameraTest.ImagesWithBuiltinSDF/ogre2, where GetParam() = "ogre2" (6381 ms)

@WilliamLewww the trigger topic __default__/trigger looks wrong

@WilliamLewww
Copy link
Contributor

Looks like when I merged the <trigger_topic> pull request, the integration test broke from a change in the topic name.

@WilliamLewww
Copy link
Contributor

Once merged, I'll open a forward port [to garden] for this fix.

@WilliamLewww WilliamLewww marked this pull request as ready for review April 21, 2022 19:53
@WilliamLewww WilliamLewww requested a review from iche033 as a code owner April 21, 2022 19:53
@WilliamLewww WilliamLewww changed the title Fix triggered camera test [fortress] Fix triggered camera test Apr 21, 2022
@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #215 (829c03e) into ign-sensors6 (bbdb620) will not change coverage.
The diff coverage is n/a.

❗ Current head 829c03e differs from pull request most recent head 556a7da. Consider uploading reports for the commit 556a7da to get more accurate results

@@              Coverage Diff              @@
##           ign-sensors6     #215   +/-   ##
=============================================
  Coverage         80.00%   80.00%           
=============================================
  Files                 1        1           
  Lines                15       15           
=============================================
  Hits                 12       12           
  Misses                3        3           

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 bbdb620...556a7da. Read the comment docs.

@WilliamLewww
Copy link
Contributor

Failing integration tests are unrelated to the triggered camera:

        Start 18: INTEGRATION_depth_camera
  18/45 Test #18: INTEGRATION_depth_camera ................***Exception: SegFault  1.21 sec
        Start 22: INTEGRATION_gpu_lidar_sensor
  22/45 Test #22: INTEGRATION_gpu_lidar_sensor ............***Exception: SegFault  0.80 sec
        Start 24: INTEGRATION_rgbd_camera
  24/45 Test #24: INTEGRATION_rgbd_camera .................***Exception: SegFault  0.91 sec
        Start 26: INTEGRATION_segmentation_camera
  26/45 Test #26: INTEGRATION_segmentation_camera .........***Exception: SegFault  0.75 sec
        Start 28: INTEGRATION_thermal_camera
  28/45 Test #28: INTEGRATION_thermal_camera ..............***Exception: SegFault  0.79 sec

        Start 30: INTEGRATION_triggered_camera
  30/45 Test #30: INTEGRATION_triggered_camera ............   Passed    1.54 sec
        Start 31: check_INTEGRATION_triggered_camera
  31/45 Test #31: check_INTEGRATION_triggered_camera ......   Passed    0.01 sec

@iche033
Copy link
Contributor

iche033 commented Apr 21, 2022

changes look good to me. Not sure why tests are failing on Jammy though

@@ -7,6 +7,7 @@
<topic>/test/integration/TriggeredCameraPlugin_imagesWithBuiltinSDF</topic>
<camera>
<triggered>true</triggered>
<trigger_topic>/test/integration/TriggeredCameraPlugin_imagesWithBuiltinSDF/trigger</trigger_topic>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this fixes it, but it's weird to me that the default trigger topic is __default__/trigger. I think this will need to be fixed in sdformat. I'll take a look at that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #215 (4e3e792) into ign-sensors6 (c0495f2) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           ign-sensors6     #215   +/-   ##
=============================================
  Coverage         80.00%   80.00%           
=============================================
  Files                 1        1           
  Lines                15       15           
=============================================
  Hits                 12       12           
  Misses                3        3           

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 c0495f2...4e3e792. Read the comment docs.

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. The sdformat PR is merged and released (but looks like it does not necessary depend on it after fixing the topic name).

@scpeters
Copy link
Member Author

Changes look good. The sdformat PR is merged and released (but looks like it does not necessary depend on it after fixing the topic name).

correct; I think we can handle the behavior when trigger topic is empty string in a separate PR

@scpeters scpeters merged commit decf4b2 into gazebosim:ign-sensors6 May 12, 2022
@scpeters scpeters deleted the fix_triggered_camera_test branch May 12, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants