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

Fix ray query distance calculation #438

Merged
merged 2 commits into from
Sep 28, 2021
Merged

Fix ray query distance calculation #438

merged 2 commits into from
Sep 28, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Sep 28, 2021

Signed-off-by: Ian Chen [email protected]

🦟 Bug fix

bug was introduced in #383 when the ray query code was converted to use selection buffer.

The distance result given was from the world origin to the intersection point. This PR fixes it so that it's from the camera to the intersection point.

The bug was not caught by the test as it was not testing ray queries using the selection buffer. This PR also turns it on in UNIT_Utils_TEST and fixes a few tol checks.

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

Signed-off-by: Ian Chen <[email protected]>
@github-actions github-actions bot added the 🔮 dome Ignition Dome label Sep 28, 2021
Signed-off-by: Ian Chen <[email protected]>
@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #438 (e13c1cd) into ign-rendering4 (4c11cc2) will increase coverage by 1.83%.
The diff coverage is 0.00%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering4     #438      +/-   ##
==================================================
+ Coverage           53.99%   55.83%   +1.83%     
==================================================
  Files                 147      147              
  Lines               14119    14120       +1     
==================================================
+ Hits                 7624     7884     +260     
+ Misses               6495     6236     -259     
Impacted Files Coverage Δ
ogre2/src/Ogre2RayQuery.cc 51.51% <0.00%> (-21.96%) ⬇️
include/ignition/rendering/RayQuery.hh 60.00% <0.00%> (-40.00%) ⬇️
src/Utils.cc 84.21% <0.00%> (+9.47%) ⬆️
ogre2/src/Ogre2Camera.cc 84.80% <0.00%> (+13.59%) ⬆️
ogre2/src/Ogre2SelectionBuffer.cc 84.78% <0.00%> (+84.78%) ⬆️
ogre2/src/Ogre2MaterialSwitcher.cc 88.57% <0.00%> (+88.57%) ⬆️

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 4c11cc2...e13c1cd. Read the comment docs.

@iche033 iche033 merged commit 8ce12a2 into ign-rendering4 Sep 28, 2021
@iche033 iche033 deleted the rayquery_dist branch September 28, 2021 21:28
chapulina added a commit that referenced this pull request Oct 18, 2021
* Fix ray query distance calculation (#438)

* fix ray query dist calc

Signed-off-by: Ian Chen <[email protected]>

* disable test

Signed-off-by: Ian Chen <[email protected]>

* ogre: Add missing required Paging component (#452)

Signed-off-by: Silvio <[email protected]>

* Fix selection buffer material script (#456)

Signed-off-by: Ian Chen <[email protected]>

Co-authored-by: Ian Chen <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
srmainwaring pushed a commit to srmainwaring/gz-rendering that referenced this pull request Oct 21, 2021
* fix ray query dist calc

Signed-off-by: Ian Chen <[email protected]>

* disable test

Signed-off-by: Ian Chen <[email protected]>
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1

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

Successfully merging this pull request may close these issues.

3 participants