Skip to content

feat(trajectory_validator): add evaluation tables to propagate filtering results#12445

Draft
zulfaqar-azmi-t4 wants to merge 1 commit intoautowarefoundation:mainfrom
tier4:feat-trajectory-validator-evaluation-table
Draft

feat(trajectory_validator): add evaluation tables to propagate filtering results#12445
zulfaqar-azmi-t4 wants to merge 1 commit intoautowarefoundation:mainfrom
tier4:feat-trajectory-validator-evaluation-table

Conversation

@zulfaqar-azmi-t4
Copy link
Copy Markdown
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented Apr 9, 2026

Description

The current trajectory_validator simply filters trajectories based on plugin results but does not provide a structured mechanism to store or query the specific reasons for failure per plugin. This PR introduces an internal EvaluationTable to capture granular evaluation data during the validation process.

Key Changes:

  • Structured Evaluation Data: Introduced PluginEvaluation and EvaluationTable structs to store the feasibility status and error reasons for each plugin, mapped by the trajectory's generator ID.
  • Plugin Metadata: Added a category field to the ValidatorInterface to allow plugins to be grouped (e.g., by functionality or source).
  • Granular Tracking: Updated the main processing loop to populate an evaluation_tables_ vector. For every trajectory processed, the validator now records:
    • The plugin name and category.
    • The feasibility result (boolean).
    • The specific error message returned by the plugin.
  • Diagnostic Improvement: Updated update_diagnostic to accept both input and filtered trajectories. This enables more accurate diagnostic reporting by comparing what was received against what survived validation, preventing false alarms when input data is missing.

List of Technical Changes

1. Data Structure Definitions (trajectory_validator_node.hpp)

  • PluginEvaluation: A new struct containing plugin_name, is_feasible, and reason.
  • EvaluationTable: A new struct containing generator_id, is_overall_feasible, and an unordered_map of evaluations indexed by plugin category.
  • Added evaluation_tables_ as a member variable to the TrajectoryValidator class.

2. Interface Enhancements (validator_interface.hpp)

  • Added set_category() and category() methods to the ValidatorInterface class.
  • Added a protected category_ string member to store the plugin's functional group.

3. Processing Logic (trajectory_validator_node.cpp)

  • Table Initialization: The process function now clears the evaluation_tables_ at the start of each cycle.
  • Detailed Logging: Inside the plugin loop, instead of just a boolean check, the code now creates a PluginEvaluation object for every plugin/trajectory pair.
  • Failure Capture: If a plugin returns !res (infeasible), the specific error string is captured in evaluation.reason and the overall_feasible flag for that trajectory is set to false.
  • Plugin Categorization: When loading a metric/plugin, the code now extracts a category from the plugin name (using the string before the :: delimiter) and assigns it via set_category.

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the feat-trajectory-validator-evaluation-table branch from c48705a to b573816 Compare April 10, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:planning Route planning, decision-making, and navigation. (auto-assigned)

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant