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

fixed mIsOmnidirectional in WbObjectDetection #6396

Conversation

FrederikBark
Copy link
Contributor

Description
Changes the calculation of mIsOmniDirectional to horizontalFov > pi / 2.

Related Issues
This pull-request fixes issue #6395

Additional context
Details on how the spherical projections were wrong before can be seen in #6395

Copy link
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

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

Thank you!
May I kindly ask you to add a line in the changelog under "Bug fixes"?

@FrederikBark
Copy link
Contributor Author

Does this work for you?
f650732

Copy link
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

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

It looks good to me, but I believe this test could be also simplified now.

@FrederikBark
Copy link
Contributor Author

That seems to be the case. I adapted it and used M_PI_2 instead of M_PI / 2.0 in the initial change now to remove the additional computation and stick to the use of M_PI_2.

Copy link
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

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

That looks very good to me now.
Thank you!

@FrederikBark FrederikBark merged commit 43d0358 into cyberbotics:master Sep 29, 2023
@omichel
Copy link
Member

omichel commented Oct 3, 2023

@TheMangalex: This PR apparently broke the camera_recognition test, see: https://github.com/cyberbotics/webots/actions/runs/6386382958/job/17333860294#step:7:1254
May I kindly ask you to look into this and check the camera_recognition controller to understand why the test fails and eventually fix it?

@FrederikBark
Copy link
Contributor Author

I'll try to look into it in the following days

@FrederikBark
Copy link
Contributor Author

It seems that this broke the test for cylindrical projections which seem to be handled similar to spherical projections in this case..

Before PR:
webots_test_prev

After PR:
webots_test_fix

It seems to be a different issue which was created by this change, as the issue of close objects also existed for cylindrical cameras:
image

I'll have a deeper look, what causes this

@omichel
Copy link
Member

omichel commented Oct 4, 2023

Thank you for investigating this.

@FrederikBark
Copy link
Contributor Author

I created #6403 as a draft which seems to fix the test and #6395
In this PR I also added another object to the recognition test which is perpendicular to the camera sensor plane and only partially seen, as this was a problem in #6395

I want to add another test which specifically checks for the error which was fixed in #6395 , so I'll come back to this tomorrow.

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.

2 participants