feat(lane_route): smooth lattice paths (R2) and expose the lattice tier in the plugin (R3)

- lane_route_core: port of the S3 smoother for lattice paths (direct,
  greedy and bounded graph improvement over witness anchors, then
  clothoid corners when budget remains), shape metrics and smoother
  diagnostics in PlanInfo and lane_route_eval.
- lane_route_planner: loads the lattice keys from YAML, logs a config
  summary at start-up and one debug/fallback line per lattice request.

regress7: coverage unchanged from R1, every lattice path smoothed, 0 bad
in the independent recheck. Local snapshot for history only; not pushed.
This commit is contained in:
2026-11-09 16:11:34 +07:00
parent 0c2179fe54
commit ad326f535c
5 changed files with 272 additions and 49 deletions

View File

@@ -14,6 +14,8 @@
#include <lane_route_core/route_planner.h>
namespace robot { class NodeHandle; }
namespace lane_route_planner
{
/** @brief Tunable parameters; footprint and direction limit are supplied per request by the costmap. */
@@ -23,6 +25,7 @@ struct SessionConfig
double clearance_min_margin_m = 0.035; ///< [m] Added to inscribed radius for hard clearance.
double clearance_preferred_margin_m = 0.30; ///< [m] Added to inscribed radius for preferred clearance.
double collision_check_margin_m = 0.056; ///< [m] Added to the bounding rectangle's circumscribed radius.
bool debug_fallback = true; ///< Enable per-request fallback diagnostics.
bool debug_plan = true; ///< Enable plan diagnostics.
bool debug_state = true; ///< Enable state-change diagnostics.
@@ -30,6 +33,12 @@ struct SessionConfig
std::string validate() const;
};
/** @brief Read the plugin namespace with PlannerConfig defaults; malformed types throw. */
SessionConfig loadSessionConfig(const robot::NodeHandle& nh);
/** @brief Log fallback diagnostics when enabled and always report a failed result. */
void logPlanResult(const lane_route_core::PlanResult& result, bool debug_fallback);
/** @brief Inputs for one planner-thread query. Shared snapshots and live bytes must outlive plan(). */
struct SessionRequest
{