feat(lane_route): heuristic-only standability relax for the lattice field (R2.9)
- lattice_field_standability_relax_m (default 0): shrinks the inflated footprint half sizes for the lattice heuristic field only; graph reference, C-space and verification stay strict. - Plugin loads it, prints it on the fallback boot line; README and eval override key. - Measured 10/11: with extra field clearance 0 any relax reopens the sim post gaps (dumps 1, 2, 4 time out); with extra clearance 0.1 a relax of 0.035 keeps them and gains one kit query.
This commit is contained in:
@@ -11,8 +11,10 @@ namespace detail
|
||||
{
|
||||
Standability::Standability(const GridRef& grid, const PlannerConfig& config, std::pmr::memory_resource* memory,
|
||||
uint64_t* tests, uint64_t* rejected, const std::atomic<bool>* cancel,
|
||||
const std::chrono::steady_clock::time_point* deadline)
|
||||
: grid_(grid), config_(config), tiles_(memory), tests_(tests), rejected_(rejected), cancel_(cancel), deadline_(deadline)
|
||||
const std::chrono::steady_clock::time_point* deadline, double relax_m)
|
||||
: grid_(grid), half_x_m_(std::max(0.0, config.half_x_m + config.footprint_min_gap_m - relax_m)),
|
||||
half_y_m_(std::max(0.0, config.half_y_m + config.footprint_min_gap_m - relax_m)),
|
||||
tiles_(memory), tests_(tests), rejected_(rejected), cancel_(cancel), deadline_(deadline)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -24,8 +26,7 @@ bool Standability::stopped() const
|
||||
|
||||
bool Standability::tileHasBlocked(int32_t tx, int32_t ty) const
|
||||
{
|
||||
const double radius = std::hypot(config_.half_x_m + config_.footprint_min_gap_m,
|
||||
config_.half_y_m + config_.footprint_min_gap_m);
|
||||
const double radius = std::hypot(half_x_m_, half_y_m_);
|
||||
const double max_pad = static_cast<double>(std::max(grid_.width, grid_.height)) + 2.0;
|
||||
const int64_t pad = static_cast<int64_t>(std::min(max_pad, std::ceil(radius / grid_.resolution) + 2.0));
|
||||
const int32_t x0 = static_cast<int32_t>(std::max<int64_t>(0, static_cast<int64_t>(tx) * 32 - pad));
|
||||
@@ -57,8 +58,8 @@ bool Standability::fits(std::size_t cell)
|
||||
if (rejected_) ++*rejected_;
|
||||
return false;
|
||||
}
|
||||
const double hx = config_.half_x_m + config_.footprint_min_gap_m;
|
||||
const double hy = config_.half_y_m + config_.footprint_min_gap_m;
|
||||
const double hx = half_x_m_;
|
||||
const double hy = half_y_m_;
|
||||
const double radius = std::hypot(hx, hy);
|
||||
const double wx = grid_.origin_x + (x + 0.5) * grid_.resolution;
|
||||
const double wy = grid_.origin_y + (y + 0.5) * grid_.resolution;
|
||||
|
||||
Reference in New Issue
Block a user