global_planning_evaluation Directory Reference
+ Directory dependency graph for global_planning_evaluation:

Files

 main.cpp
 
 Metrics.cpp
 
 Metrics.h
 
 RoomScene.cpp
 
 RoomScene.h
 
 Sampling.cpp
 
 Sampling.h
 

Detailed Description

global_planning_evaluation measures the global planner offline. It builds a room from PriorKnowledgeData, samples many start/goal requests in it, plans each one with SPFAImpl – the same planner, smoothing and checks the navigator runs – and records what came out. Use it to check that a change to planning or smoothing does not make paths worse, or to reproduce a planning problem without a robot.

The same seed always produces the same requests and results, so two runs can be diffed record by record across code revisions. Only planned_seconds varies.

Run from the package root after building:

./build/bin/global_planning_evaluation # R007, furnished, 400 requests
./build/bin/global_planning_evaluation --serpentine 1300 --out serpentine.jsonl
./build/bin/global_planning_evaluation --no-smoothing # baseline without smoothing
./build/bin/global_planning_evaluation --help # all options

Inputs

Scene modifiers

By default the room is used as furnished. These options make it harder on purpose; they are applied in this order:

Option Effect
--corridor <width> Removes the furniture and builds a dead-end corridor of this clear width (length --corridor-length, default 5000 mm) running north from the south wall. Use with --corridor-exits.
--serpentine <width> Removes the furniture and adds --serpentine-walls (default 6) walls across the room, with openings of this width on alternating sides. Every path has to thread each opening and reverse direction.
--clutter <n> Scatters up to n random boxes that keep at least --clutter-gap (default 1000 mm) from every other obstacle. Reports how many fit.

A modifier logs a warning when the passages it creates are too narrow for any path to be accepted, because such a sweep measures the scene rather than the planner.

--corridor and --serpentine should not be combined: the serpentine removes the corridor walls, but corridor_exit requests are still drawn from where the corridor was.

Requests

Kind Option (default) Start and goal
uniform --uniform (100) Random cells in open space, i.e. with clearance above the near-obstacle band. At least 1500 mm apart.
near_obstacle --near-obstacle (200) Random cells whose clearance lies in the near-obstacle band. At least 1500 mm apart. This is where smoothing is under the most load.
location --locations (100) Random pairs of named locations, orientation included. Locations inside an obstacle for this robot radius are excluded with a warning.
corridor_exit --corridor-exits (0) Start inside the corridor facing the goal, goal at least 500 mm beyond its mouth. Needs --corridor.

The near-obstacle band defaults to [clearance + 5, clearance + 305] mm, which keeps every endpoint above the checker's limit. --endpoint-clearance-min and --endpoint-clearance-max override it, for instance to include endpoints the checker would refuse.

Other options: --seed (default 1), --resample (waypoint spacing before smoothing; negative uses the planner's default), --no-smoothing and --log-level (default important, because a sweep provokes planning failures on purpose and each one logs at error level).

Output

--out (default evaluation.jsonl) receives one JSON object per request, written as the sweep runs. The main fields:

Field Meaning
kind, index, start, goal, start_name, goal_name The request. index counts within one kind. Names appear only for location requests.
planned Whether the planner returned a path at all.
smoothing_ran, smoothing_applied Whether smoothing ran and whether its result was accepted.
smoothing_collision_free, smoothing_geometry_valid Which check a rejected smoothing result failed.
smoothing_repaired_waypoints Folded waypoints the smoother removed.
min_clearance, start_clearance, goal_clearance Costmap clearance [mm] along the returned path (sampled every 50 mm) and at the two endpoints.
sharpest_turn_deg, sharp_turns, total_turning_deg, mean_turn_deg Direction changes along the returned path. sharp_turns counts turns over 30 deg.
sharpest_grid_turn_deg The sharpest turn in the raw grid-search path, to tell whether a sharp turn came from the search or was introduced later.
folds_in_result Reversals of 90 deg or more in the returned path, as found by the smoother's own detector.
spacing_ratio, directness Longest over shortest segment, and straight-line distance over path length.
path_length, separation, waypoints, planned_seconds Size of the path and of the request, and planning time.

The remaining fields copy the smoother's own report (input_*, output_min_clearance, collisions, endpoint_collisions, worst_collision_clearance, judged_against_input).

--dump-scene <file> also writes the final obstacles (min, max, yaw), the scene bounds and the first --dump-count (default 6) planned paths as JSON, for plotting.

At the end, a summary per request kind is printed to stdout:

category n planned smoothed rej:coll rej:fold repaired folded tight-in smoothed* clr p05 turn p99 ms p50
----------------------------------------------------------------------------------------------------------------------------------
ALL 400 96% 100% 0% 0% 0% 0% 0% 100% 84 16.0 8.1
location 100 100% 100% 0% 0% 0% 0% 0% 100% 80 12.0 5.1
near_obstacle 200 92% 100% 0% 0% 0% 0% 0% 100% 84 16.9 9.6
uniform 100 100% 100% 0% 0% 0% 0% 0% 100% 221 10.7 8.5

smoothed, rej:coll, rej:fold, repaired and tight-in are shares of the requests where smoothing ran. tight-in counts requests whose start or goal was already below min_clearance, and smoothed* is the acceptance rate over the others – the fairer measure of the smoother. folded counts only reversals of 90 deg or more, so read turn p99 (99th-percentile sharpest turn) for smaller kinks. clr p05 is the 5th-percentile minimum clearance [mm] and ms p50 the median planning time. The legend below the table repeats this.