Skip to main content

Module intersection

Module intersection 

Source
Expand description

A multi-robot intersection benchmark after Parque (2024): every robot crosses a four-way intersection on a lattice roadmap built around its reference path, the lattice of robot i is parameterised by its base b_i and height h_i, and the cost of a parameter vector x = (b_1, h_1, …, b_N, h_N) is the total length of the coordinated, collision-free paths (equation (1) of the paper) plus a price per time step (see below), so any gradient-free optimiser (RADES, DE, CMA-ES) can search the roadmap configurations.

The paper coordinates the robots with dRRT* in the composite roadmap. This benchmark uses prioritised space-time search instead: robots plan in index order on their own roadmaps, each avoiding the already planned ones (positions at every time step and edge midpoint at least safety apart; a robot leaves the scene at its goal). One roadmap edge takes one time step and waiting in place is allowed. Every step, moving or waiting, also costs Intersection::time_cost: with length alone the straight middle row plus waits would make nearly every configuration cost the same, whereas with a price on time a coarse lattice (large b_i, fewer and faster steps) pays off unless it causes conflicts that need waits or detours. A robot that finds no plan adds a penalty of 1000 plus its straight-line distance, so infeasible configurations still compare.

In the Intersection::crossing scene the robots drive straight, and the coarsest lattice (b_i = 6 for all) happens to be conflict-free, so the optimum sits at that corner of the box (cost 412 for eight robots) and the heights h_i only matter for configurations that need detours. It is a smoke benchmark for the optimisers rather than a hard coordination problem; scenes with turning robots are an open extension.

use evolutionary_planning::de::rades::{Config, Rades};
use evolutionary_planning::problems::intersection::Intersection;
use evolutionary_planning::{Limits, SplitMix64};

let mut scene = Intersection::crossing(4);
let mut rades = Rades::new(Config::default(), scene.bounds());
// The paper's budget: 300 function evaluations.
let outcome = rades.run(&mut scene, &mut Limits::evaluations(300), &mut (), &mut SplitMix64::new(1));
let plan = scene.plan(outcome.best_genome().expect("evaluated")).expect("feasible");
assert_eq!(scene.collisions(&plan), 0);

Structs§

Block
An axis-aligned rectangular obstacle [x0, x1] × [y0, y1].
Intersection
The intersection scene.
Robot
One robot: where it enters and where it leaves, and its reference path (a polyline from start to goal through the intersection).

Type Aliases§

Point
A point in the plane.