feat(lane_route): footprint-zone rule with entry/exit transition, longer lane-end links (R2.11)
- A footprint may overlap a direction zone against its heading only within zone_transition_m (default 1.0 m) of path where the centre is inside that same zone, or at a parked endpoint. Checked on whole paths by the verifier. - The lattice C-space keeps the strict per-pose rule so its paths always pass. - Lane-end junction links reach 8 m with up to 24 links (was 6 m / 12 tries). - lane_route_eval can dump the graph, attempts and routes per query.
This commit is contained in:
@@ -20,6 +20,9 @@ smoothing; a graph result or an early failure can prevent it from running.
|
||||
|
||||
Keys (defaults from `PlannerConfig`):
|
||||
|
||||
- `zone_transition_m: 1.0` [m]: a footprint may temporarily overlap a direction zone outside its query deviation
|
||||
limit when the path centre enters the same connected zone within this path distance before or after the overlap.
|
||||
Zero disables this transition allowance; the parked endpoint allowance remains available.
|
||||
- `lattice_enabled: false`, `lattice_heading_bins: 72`, `lattice_closed_resolution_m: 0.10`,
|
||||
`lattice_heuristic_weight: 3.0`, `lattice_bucket_width_m: 0.25`.
|
||||
- `lattice_field_clearance_weight_m: 0.25`, `lattice_wall_weight_m: 0.25`,
|
||||
|
||||
@@ -57,6 +57,7 @@ SessionConfig loadSessionConfig(const robot::NodeHandle& nh)
|
||||
load("clearance_preferred_margin_m", config.clearance_preferred_margin_m, defaults.clearance_preferred_margin_m);
|
||||
load("collision_check_margin_m", config.collision_check_margin_m, defaults.collision_check_margin_m);
|
||||
load("footprint_min_gap_m", p.footprint_min_gap_m, d.footprint_min_gap_m);
|
||||
load("zone_transition_m", p.zone_transition_m, d.zone_transition_m);
|
||||
load("footprint_gap_shortcut_raise_m", p.footprint_gap_shortcut_raise_m, d.footprint_gap_shortcut_raise_m);
|
||||
load("deviation_ladder_deg", p.deviation_ladder_deg, d.deviation_ladder_deg);
|
||||
load("route_too_long_ratio", p.route_too_long_ratio, d.route_too_long_ratio);
|
||||
@@ -169,9 +170,9 @@ bool LaneRoutePlanner::initialize(std::string name, robot_costmap_2d::Costmap2DR
|
||||
costmap_ = costmap;
|
||||
session_.setConfig(config_);
|
||||
initialized_ = true;
|
||||
robot::log_info("[lane_route_planner] %s: time_limit=%.2fs min_radius=%.3fm clearance_margin=%.3fm gap=%.3fm debug_plan=%d debug_state=%d",
|
||||
robot::log_info("[lane_route_planner] %s: time_limit=%.2fs min_radius=%.3fm clearance_margin=%.3fm gap=%.3fm zone_transition_m=%.3f debug_plan=%d debug_state=%d",
|
||||
name.c_str(), p.time_limit_s, p.min_turn_radius_m, config_.clearance_min_margin_m,
|
||||
p.footprint_min_gap_m, config_.debug_plan, config_.debug_state);
|
||||
p.footprint_min_gap_m, p.zone_transition_m, config_.debug_plan, config_.debug_state);
|
||||
robot::log_info("[lane_route_planner] fallback: lattice_enabled=%d fallback_time_limit_s=%.2f lattice_preferred_gap_m=%.3f lattice_preferred_time_fraction=%.2f lattice_smooth_enabled=%d lattice_smooth_max_checks=%lld lattice_heuristic_weight=%.2f lattice_heading_bins=%d lattice_max_memory_mb=%lld lattice_field_standability_relax_m=%.3f lattice_field_zone_margin_deg=%.1f lattice_alt_field_enabled=%d lattice_alt_field_relax_m=%.3f lattice_alt_field_switch_fraction=%.2f debug/fallback=%d",
|
||||
p.lattice_enabled, p.fallback_time_limit_s, p.lattice_preferred_gap_m, p.lattice_preferred_time_fraction,
|
||||
p.lattice_smooth_enabled, static_cast<long long>(p.lattice_smooth_max_checks), p.lattice_heuristic_weight, p.lattice_heading_bins,
|
||||
|
||||
@@ -222,6 +222,9 @@ TEST(AdapterConfig, RejectsInvalidParameters)
|
||||
c.planner.min_turn_radius_m = 0;
|
||||
EXPECT_FALSE(c.validate().empty());
|
||||
c = SessionConfig();
|
||||
c.planner.zone_transition_m = -0.01;
|
||||
EXPECT_FALSE(c.validate().empty());
|
||||
c = SessionConfig();
|
||||
c.planner.max_route_attempts = 0;
|
||||
EXPECT_FALSE(c.validate().empty());
|
||||
c = SessionConfig();
|
||||
@@ -234,6 +237,7 @@ TEST(AdapterConfig, LatticeYamlReachesPlannerConfig)
|
||||
robot::NodeHandle root;
|
||||
root.setParam("LaneRouteLatticeConfigTest", YAML::Load(R"(
|
||||
lattice_enabled: true
|
||||
zone_transition_m: 0.7
|
||||
lattice_preferred_gap_m: 0.18
|
||||
lattice_preferred_time_fraction: 0.35
|
||||
lattice_smooth_enabled: false
|
||||
@@ -267,6 +271,7 @@ TEST(AdapterConfig, LatticeYamlReachesPlannerConfig)
|
||||
const auto& p = config.planner;
|
||||
EXPECT_TRUE(config.validate().empty());
|
||||
EXPECT_TRUE(p.lattice_enabled);
|
||||
EXPECT_DOUBLE_EQ(p.zone_transition_m, 0.7);
|
||||
EXPECT_DOUBLE_EQ(p.lattice_preferred_gap_m, 0.18);
|
||||
EXPECT_DOUBLE_EQ(p.lattice_preferred_time_fraction, 0.35);
|
||||
EXPECT_FALSE(p.lattice_smooth_enabled);
|
||||
@@ -299,6 +304,7 @@ TEST(AdapterConfig, LatticeYamlReachesPlannerConfig)
|
||||
const auto defaults = loadSessionConfig(robot::NodeHandle(root, "LaneRouteLatticeDefaultsTest"));
|
||||
const PlannerConfig expected;
|
||||
EXPECT_FALSE(defaults.planner.lattice_enabled);
|
||||
EXPECT_DOUBLE_EQ(defaults.planner.zone_transition_m, 1.0);
|
||||
EXPECT_EQ(defaults.planner.lattice_heading_bins, expected.lattice_heading_bins);
|
||||
EXPECT_DOUBLE_EQ(defaults.planner.lattice_preferred_gap_m, expected.lattice_preferred_gap_m);
|
||||
EXPECT_DOUBLE_EQ(defaults.planner.lattice_preferred_time_fraction, expected.lattice_preferred_time_fraction);
|
||||
|
||||
Reference in New Issue
Block a user