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

Add segmentation data publisher to camera plugin #951

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dscroft
Copy link

@dscroft dscroft commented Jul 31, 2024

Segmentation topic will appear for Camera nodes that have segmentation available. Data will only be published if subscribers are connected.

Description
Camera plugin does not have segmentation data available.

Related Issues
N/A

Affected Packages
List of affected packages:

  • webots_ros2
  • webots_ros2_driver

Tasks
NA

Additional context
NA

Segmentation topic will appear for Camera nodes that have segmentation available.
Data will only be published if subscribers are connected.
@dscroft dscroft closed this Jul 31, 2024
Fixed issue where segmentation did not work unless recognition was also subscribed
@dscroft dscroft reopened this Jul 31, 2024
@lukicdarkoo lukicdarkoo self-requested a review August 22, 2024 09:11
@lukicdarkoo
Copy link
Member

lukicdarkoo commented Aug 22, 2024

@dscroft Thank you. I synced with the main branch and allowed CI.

It looks good. Could you please add a changelog. It would also be good to add a simple test.

David added 2 commits August 29, 2024 15:16
World has been slightly modified to enable segmentation on the camera.
Test checks for width and height of recieved image, black pixels in the image (no object), red pixels in the image (object segmentation highlight).
@dscroft
Copy link
Author

dscroft commented Aug 29, 2024

Test added

@lukicdarkoo
Copy link
Member

@dscroft Thank you for the test. It seems there is a bug, can you take a look:

build/webots_ros2_tests/pytest.xml: 11 tests, 0 errors, 1 failure, 0 skipped
- webots_ros2_tests.test.test_system_driver test_system_driver
  <<< failure message
    test_system_driver.TestDriver.testSegmentation failed
  >>>

Segmentation data is not available in first frame so set comparison was failing.
@dscroft
Copy link
Author

dscroft commented Nov 27, 2024

Found the issue, pushed fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants