-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Alexander Schmidt <[email protected]>
self.heatmap | ||
.map | ||
.conv(&kernel, ConvMode::Same, PaddingMode::Replicate)?; | ||
self.heatmap.map /= self.heatmap.map.sum() + f32::EPSILON; |
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.
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
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.
done
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.
heatmap implementation looks good, just some remarks on the twix side
.search_suggestor_configuration | ||
.heatmap_convolution_kernel_weight, | ||
); | ||
if let Ok(convolved_heatmap) = |
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.
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")?
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 should be better now
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