Skip to content

heatmap diffusion convolution confusion #1741

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

pejotejo
Copy link
Contributor

Why? What?

changes heatmap decay in single cells to diffusion.

Ideas for Next Iterations (Not This PR)

decay based on viewing direction (#1676)

How to Test

Behavior Sim
or let robot play and look at heatmap

self.heatmap
.map
.conv(&kernel, ConvMode::Same, PaddingMode::Replicate)?;
self.heatmap.map /= self.heatmap.map.sum() + f32::EPSILON;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of adding f32::EPSILON, initialize the heatmap with 1.0 / number_of_grid_cells. Then the heatmap can never sum up to 0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@oleflb oleflb self-assigned this Mar 14, 2025
Copy link
Contributor

@oleflb oleflb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heatmap implementation looks good, just some remarks on the twix side

@oleflb oleflb removed the GO25 label Apr 8, 2025
@pejotejo pejotejo mentioned this pull request Apr 9, 2025
.search_suggestor_configuration
.heatmap_convolution_kernel_weight,
);
if let Ok(convolved_heatmap) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When does the convolution return an error? I can imagine this happens only for when the kernel is larger than the heatmap. Right now you are silently ignoring the error. If for some reason this call would only generate Errors, we would not notice it. I though of using .wrap_err("heatmap convolution failed")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be better now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Request for Review
Development

Successfully merging this pull request may close these issues.

2 participants