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鈥檒l 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 ichen@osrfoundation.org

馃 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 <ichen@osrfoundation.org>
@github-actions github-actions bot added the 馃敭 dome Ignition Dome label Sep 28, 2021
@osrf-triage osrf-triage added this to Inbox in Core development Sep 28, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@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.

Core development automation moved this from Inbox to In review Sep 28, 2021
@iche033 iche033 merged commit 8ce12a2 into ign-rendering4 Sep 28, 2021
@iche033 iche033 deleted the rayquery_dist branch September 28, 2021 21:28
Core development automation moved this from In review to Done Sep 28, 2021
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 <ichen@osrfoundation.org>

* disable test

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

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

Signed-off-by: Silvio <silvio@traversaro.it>

* Fix selection buffer material script (#456)

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Silvio Traversaro <silvio@traversaro.it>
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 <ichen@osrfoundation.org>

* disable test

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@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

@j-rivero j-rivero removed this from Done in Core development May 6, 2022
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.

None yet

3 participants