Skip to content

fix(thermal_camera): Fixed Gaussian noise for thermal camera. (backport #597)#600

Merged
iche033 merged 1 commit intomainfrom
mergify/bp/main/pr-597
Mar 18, 2026
Merged

fix(thermal_camera): Fixed Gaussian noise for thermal camera. (backport #597)#600
iche033 merged 1 commit intomainfrom
mergify/bp/main/pr-597

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 18, 2026

🦟 Bug fix

Summary

Thermal camera with Gaussian noise segfaults like this:

(2026-03-17 14:28:15.239) [error] [Noise.cc:63] Image noise requested. Please use ImageNoiseFactory::NoiseModel instead
Stack trace (most recent call last) in thread 685223:
#9    Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#8    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x76f339322c6b, in 
#7    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x76f339295aa3, in 
#6    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x76f33423ddb3, in 
#5    Object "/opt/ros/kilted/opt/gz_sim_vendor/lib/gz-sim-9/plugins/libgz-sim-sensors-system.so", at 0x76f311be23ce, in 
#4    Object "/opt/ros/kilted/opt/gz_sim_vendor/lib/libgz-sim9-rendering.so.9", at 0x76f311b451eb, in gz::sim::v9::RenderUtil::Update()
#3    Object "/opt/ros/kilted/opt/gz_sim_vendor/lib/gz-sim-9/plugins/libgz-sim-sensors-system.so", at 0x76f311beabed, in 
#2    Object "/opt/ros/kilted/opt/gz_sim_vendor/lib/gz-sim-9/plugins/libgz-sim-sensors-system.so", at 0x76f311bed4c0, in 
#1    Object "/opt/ros/kilted/opt/gz_sensors_vendor/lib/libgz-sensors9-thermal_camera.so.9", at 0x76f311a83607, in gz::sensors::v9::ThermalCameraSensor::SetScene(std::shared_ptr<gz::rendering::v9::Scene>)
#0    Object "/opt/ros/kilted/opt/gz_sensors_vendor/lib/libgz-sensors9-thermal_camera.so.9", at 0x76f311a7d146, in 
Segmentation fault (Address not mapped to object [(nil)])

This PR fixes it by correctly using ImageNoiseFactory instead of NoiseFactory. This was probably forgotten in 6a00a58 .

This PR also adds the skipping of noise in case it is zero, as was done in #450 for other camera types.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.


This is an automatic backport of pull request #597 done by Mergify.

Signed-off-by: Martin Pecka <peci1@seznam.cz>
(cherry picked from commit 0e561e3)
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Mar 18, 2026
@iche033 iche033 merged commit df56501 into main Mar 18, 2026
13 checks passed
@iche033 iche033 deleted the mergify/bp/main/pr-597 branch March 18, 2026 21:58
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants