-
Notifications
You must be signed in to change notification settings - Fork 276
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 thermal sensor system for configuring thermal camera properties #614
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
I'm seeing slightly different results when running the example (take a look at the cell phone in my image). @iche033 can you tell me what version of the cell phone fuel model you're using? I just tried updating to the most recent model, and it looks like I am using version 6. |
Also, it looks like gazebosim/sdformat#487 has been approved in case we'd like to make use of that PR here. |
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.
/github/workspace/src/rendering/RenderUtil.cc:308: Lines should be <= 80 characters long [whitespace/line_length] [2]
/github/workspace/src/systems/thermal/ThermalSensor.cc:93: Lines should be <= 80 characters long [whitespace/line_length] [2]
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.
Overall, looks good to me so far. I can give this another review once we add in the remaining pieces like tests.
Signed-off-by: Ian Chen <[email protected]>
…gn-gazebo into thermal_sensor_system
Signed-off-by: Ian Chen <[email protected]>
I was using a modified local copy of the phone model. I just removed then redownloaded it. Now I get the same image as yours.
I've added an test in ee13143. As for documentation, let's update the tutorial separately and include all the new changes we made in the past few weeks. |
Codecov Report
@@ Coverage Diff @@
## ign-gazebo4 #614 +/- ##
===============================================
- Coverage 77.40% 77.32% -0.08%
===============================================
Files 218 216 -2
Lines 12254 12205 -49
===============================================
- Hits 9485 9438 -47
+ Misses 2769 2767 -2
Continue to review full report at Codecov.
|
@@ -292,7 +292,7 @@ | |||
<always_on>1</always_on> | |||
<update_rate>30</update_rate> | |||
<visualize>true</visualize> | |||
<topic>thermal_camera_8bit</topic> | |||
<topic>thermal_camera_8bit/image</topic> |
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.
For consistency, should we modify the other thermal camera's topic to be thermal_camera/image
? Right now, the 8 bit camera has topics /thermal_camera_8bit/image
and /thermal_camera_8bit/camera_info
, but the original thermal camera has topics /thermal_camera
and /camera_info
, which might confuse users. I think it would be good to make the original thermal camera use the topics /thermal_camera/image
and /thermal_camera/camera_info
so that there's consistency between the two thermal cameras.
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.
I didn't touch the existing topics in case there are users out there relying on these topics in this world.
How about we change it in Edifice?
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.
That's fine 👍 I'll just make sure I explicitly point out which topics are associated with which camera in the tutorial
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@iche033 I noticed that it looks like we are only configuring thermal visuals in However, I believe that we also want to add any new thermal visuals that may appear after initialization as well: https://github.com/ignitionrobotics/ign-gazebo/blob/555a84ea54a6f92b46929eb2f1a43daa13b1fadb/src/rendering/RenderUtil.cc#L1033-L1068 If you agree with me on this, should we make this update in this PR, or in a separate PR? |
Signed-off-by: Ian Chen <[email protected]>
<plugin | ||
filename="ignition-gazebo-thermal-system" | ||
name="ignition::gazebo::systems::Thermal"> | ||
<temperature>600.0</temperature> |
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.
Can we change the temperature for the sphere to be below the camera's default minimum temperature value so that we can make sure that values below the minimum are clamped to the minimum (just like how we are checking that values above the max are clamped to the max with the cylinder)?
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.
I'm working on adding this test case, but haven't been able to get the results I want yet. I will keep working on it.
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.
I've created some draft PRs to show the current status of what I am trying:
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.
I think the issue is that ign-rendering does not accept temperature below zero thus giving it ambient temperature.
How about we clamp negative values to 0 in the thermal system (or in ign-rendering) and print out a warning? Theoretically nothing can be colder than absolute zero (0 K) so it's reasonable to do a quick sanity check.
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.
I tried clamping negative to 0 in gazebosim/gz-rendering#243, but that didn't seem to work. Perhaps I am doing it too late in the pipeline. I will try this in the gazebo plugin to see if I get better results
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.
The PRs above seem to successfully add in this test case now. We will merge the PRs above later since we need to merge this ASAP for an ign-gazebo
release (merging these PRs would delay the release since it would require a patch release in ign-rendering
).
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
src/systems/thermal/ThermalSensor.cc
Outdated
ignerr << "The thermal sensor system can only be attached to a " | ||
<< "thermal sensor" << std::endl; |
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 this trace right ?
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.
Yeah. Perhaps the wording is a little confusing, but the thermal sensor system allows users to customize the configuration/parameters of the thermal sensor/camera it's attached to. Would you recommend using different wording to help minimize confusion?
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.
Signed-off-by: Ashton Larkin <[email protected]>
I believe this is because we need some releases for |
Signed-off-by: Ian Chen <[email protected]>
The releases are now out. |
All checks are running now. I'm just waiting for the results from CI and GitHub actions. |
Signed-off-by: Ian Chen <[email protected]>
Comments have been addressed, and we need to merge this for an ign-gazebo release.
Summary
depends on
Add support for 8 bit thermal camera image format gz-rendering#235Add support for 8 bit thermal camera image format gz-sensors#92Visualize single channel 8 bit image data gz-gui#176related but not necessarily needed:
Added a new thermal-camera system for setting thermal camera properties:
This is required for simulating an 8 bit thermal camera sensor. The existing default params are suited for 16 bit image output, e.g. resolution defaults to 0.01 which is too high for an 8 bit camera, so we'll need a plugin for configuring these properties.
A better long term plan for this is to add these params to the sdf spec.
To Test
I've updated the thermal camera example world into include an 8 bit thermal camera:
Here is a screenshot of the ign gazebo with 16 bit and 8 bit image display side by side.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge