fixed issues in sigmoid sensor model causing inverted response (annular partitions)

This commit is contained in:
2025-11-24 17:39:16 -08:00
parent 58d009c8fc
commit 779d7d2cc6
55 changed files with 44 additions and 31 deletions

View File

@@ -28,9 +28,12 @@ function obj = initialize(obj, objectiveFunction, domain, discretizationStep, pr
% Evaluate function over grid points
obj.objectiveFunction = objectiveFunction;
obj.values = reshape(obj.objectiveFunction(obj.X, obj.Y), size(obj.X));
% Normalize
obj.values = obj.values ./ max(obj.values, [], "all");
% store ground position
idx = obj.values == max(obj.values, [], "all");
idx = obj.values == 1;
obj.groundPos = [obj.X(idx), obj.Y(idx)];
assert(domain.distance([obj.groundPos, domain.center(3)]) > protectedRange, "Domain is crowding the sensing objective")