|
|
Directory dependency graph for global_planning_evaluation:Files | |
| main.cpp | |
| Metrics.cpp | |
| Metrics.h | |
| RoomScene.cpp | |
| RoomScene.h | |
| Sampling.cpp | |
| Sampling.h | |
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:
The room is read from PriorKnowledgeData (--room, default 50_19/R007; --prior-knowledge overrides the package lookup):
navigation-graphs/<room>/rooms.json: the room polygon. Its axis-aligned bounds become the scene bounds, with a wall box along each side.scenes/<room>/<scene>.json: the furniture (--scenes, default static_scene mobile_kitchen). Each object's bounding box (objects/<class>/<name>_bb.json) is posed and projected onto the floor.navigation-graphs/<room>/locations.json: named poses, used by the location requests.Objects without a bounding box, with a degenerate one (under 50 mm) or lying entirely outside the room are dropped. A tilted object is kept with a conservative axis-aligned footprint. Each case is logged as a Scene import warning, so it is always clear what is in the costmap.
data/armarx_navigation/algorithms/spfa-smoothing.cfg, as on the robot. Its min_clearance is the limit the results are judged against, and its clearance sets the default near-obstacle sampling band.--cell-size (default 100 mm) and --robot-radius (default 350 mm).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.
| 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).
--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:
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.