-
Notifications
You must be signed in to change notification settings - Fork 53
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
Handle non-positive object temperatures #243
Handle non-positive object temperatures #243
Conversation
Codecov Report
@@ Coverage Diff @@
## ign-rendering4 #243 +/- ##
==================================================
- Coverage 53.50% 53.48% -0.02%
==================================================
Files 145 145
Lines 13753 13760 +7
==================================================
+ Hits 7358 7359 +1
- Misses 6395 6401 +6
Continue to review full report at Codecov.
|
I made some tweaks in a3a8854 that clamps neg temperature to 0 and enable our shaders work with 0 temp value. This should make the test in gazebosim/gz-sim#621 pass |
I just took a look and tested this out, it works for me! I'm marking this as ready for review. If we merge gazebosim/gz-sim#621, this will need to be merged and we will need to make a patch release of |
As mentioned in gazebosim/gz-sim#621 (comment), I am holding off on merging this for now since it would effect |
// only accept positive temperature (in kelvin) | ||
if (temp >= 0.0) | ||
// if a non-positive temperature was given, clamp it to 0 | ||
if (foundTemp && temp < 0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only clamps the temp
value when foundTemp
is true. Is it possible for foundTemp
to be false and temp
to be < 0.0? If so, should you handle that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for foundTemp to be false and temp to be < 0.0?
I don't think so. The only way foundTemp
is set to true is if temperature
is defined/attached to a visual, which would mean that <temperature>
needs to be specified in the SDF file in the ign-gazebo
context. If <temperature>
is not specified, then this code should run (background object where object colors are used to define temperatures - since we're using rgb here, it shouldn't be possible to have an rgb value that is < 0): https://github.com/ignitionrobotics/ign-rendering/blob/8e0de0dd3e499c0fc0191a2cd8b794b0aab69980/ogre2/src/Ogre2ThermalCamera.cc#L387-L417
Signed-off-by: Ashton Larkin <[email protected]> Signed-off-by: Ian Chen <[email protected]>
2a40601
to
3454c14
Compare
Related to gazebosim/gz-sim#621. This handles temperatures that are <= 0 kelvin for the thermal camea.
Signed-off-by: Ashton Larkin [email protected]
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge