Skip to content

feat(trajectory_selector): combine validator and concatenator#12532

Merged
zulfaqar-azmi-t4 merged 25 commits into
autowarefoundation:mainfrom
zulfaqar-azmi-t4:combine_validator_and_concatenator
Jun 5, 2026
Merged

feat(trajectory_selector): combine validator and concatenator#12532
zulfaqar-azmi-t4 merged 25 commits into
autowarefoundation:mainfrom
zulfaqar-azmi-t4:combine_validator_and_concatenator

Conversation

@zulfaqar-azmi-t4

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Description

Merges the previously separate autoware_trajectory_concatenator node and autoware_trajectory_validator library into a single TrajectorySelectorNode. The node collects candidate trajectories from multiple upstream planners, concatenates them into a single set, runs the configured validator plugins, and publishes the surviving trajectories.
Clean public wrappers are introduced for both subsystems (TrajectoryConcatenatorWrapper, TrajectoryValidatorWrapper) so each remains independently readable and testable. The old ValidationStage class is removed. Internal implementation types (TrajectoryValidator, ValidatorContext, TrajectoryValidatorReport) are moved under detail/.

Related links

Parent Issue:

  • Link

How was this PR tested?

  • colcon build — success
  • colcon test — all tests pass, including:
    • Existing plugin unit tests (test_vehicle_constraint_filter, test_traffic_light_filter)
    • Node integration tests (FiltersTrajectoriesViaPlugin, HandlesPluginRejection)
    • New tests for missing-input early returns in take_validator_data() (missing odometry, acceleration, predicted objects)

Notes for reviewers

The trajectory_validator_node ROS node name and its associated topic namespace (~/input/trajectories) are replaced by the ROS node name trajectory_selector_node (executable: autoware_trajectory_selector_node) and two separate input topics (see Interface changes below). Downstream launch files that remap ~/input/trajectories will need to be updated to remap ~/input/trajectories_generative and/or ~/input/trajectories_backup.

Interface changes

Topic changes

Additions and removals

Change type Topic Type Topic Name Message Type Description
Added Sub ~/input/trajectories_generative autoware_internal_planning_msgs/msg/CandidateTrajectories Candidate trajectories from generative planners
Added Sub ~/input/trajectories_backup autoware_internal_planning_msgs/msg/CandidateTrajectories Candidate trajectories from backup planners
Added Pub ~/output/trajectories autoware_internal_planning_msgs/msg/CandidateTrajectories Trajectories that passed all enforced validator plugins
Added Pub ~/debug/processing_time_detail_ms/trajectory_selector autoware_internal_debug_msgs/msg/ProcessingTimeTree Per-function processing time breakdown
Removed Sub ~/input/trajectories autoware_internal_planning_msgs/msg/CandidateTrajectories Replaced by the two topics above

Modifications

Version Topic Type Topic Name Description
Old All /trajectory_validator_node/... Node was named trajectory_validator_node
New All /trajectory_selector_node/... Node renamed to trajectory_selector_node

Effects on system behavior

The node now concatenates trajectories from multiple sources before validation, rather than validating a single pre-concatenated input. Trajectories that arrive on trajectories_generative or trajectories_backup are merged into one candidate set each timer tick before being passed through the validator plugins. Behavior of the validator plugins themselves is unchanged.

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

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

Please ensure:

@github-actions github-actions Bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label May 1, 2026
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 changed the title Combine validator and concatenator feat(trajectory_validator): combine validator and concatenator May 11, 2026
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review May 11, 2026 02:44
Comment thread planning/autoware_trajectory_validator/CMakeLists.txt Outdated
Comment thread planning/autoware_trajectory_validator/CMakeLists.txt Outdated
Comment thread planning/autoware_trajectory_validator/src/trajectory_validator_node.cpp Outdated
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the combine_validator_and_concatenator branch from e373eec to 9765fcb Compare May 12, 2026 05:45
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 12, 2026
@danielsanchezaran danielsanchezaran requested a review from Copilot May 12, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces planning pipeline node count by integrating the trajectory concatenation stage into the TrajectoryValidator node. The standalone concatenator ROS node is removed and replaced with a pure C++ autoware::trajectory_concatenator::TrajectoryConcatenator library that the validator drives via a fixed-rate timer.

Changes:

  • Refactors the trajectory concatenator into a standalone C++ library and removes the ROS node/launch/config artifacts.
  • Updates TrajectoryValidator to subscribe to generative + backup candidate trajectory inputs, buffer them, and run validation on a 30ms timer flush.
  • Adjusts tests/launch/package dependencies to reflect the new in-process concatenation stage and topic interface.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
planning/autoware_trajectory_validator/src/trajectory_validator_node.cpp Adds concatenation buffering + 30ms timer-driven validation pipeline.
planning/autoware_trajectory_validator/include/autoware/trajectory_validator/trajectory_validator_node.hpp Adds concatenator state, new subscriptions, and timer declarations.
planning/autoware_trajectory_validator/include/autoware/trajectory_validator/parameters.hpp Introduces combined validator+concatenator parameter handling.
planning/autoware_trajectory_validator/launch/trajectory_validator.launch.xml Switches input remaps to generative/backup trajectory topics.
planning/autoware_trajectory_validator/package.xml Adds dependency on autoware_trajectory_concatenator.
planning/autoware_trajectory_validator/test/node/test_trajectory_validator_node.cpp Updates integration test to publish on new input topic and set trajectory stamps.
planning/autoware_trajectory_concatenator/include/autoware/trajectory_concatenator/trajectory_concatenator.hpp New pure C++ concatenator API.
planning/autoware_trajectory_concatenator/src/trajectory_concatenator.cpp Implements buffering + time-based pruning + concatenation.
planning/autoware_trajectory_concatenator/CMakeLists.txt Builds/install library instead of registering a component node executable.
planning/autoware_trajectory_concatenator/src/trajectory_concatenator_node.* Removes standalone ROS node implementation.
planning/autoware_trajectory_concatenator/launch/trajectory_concatenator.launch.xml Removes concatenator launch file.
planning/autoware_trajectory_concatenator/config/concatenator.param.yaml Removes concatenator node parameter YAML.
planning/autoware_trajectory_concatenator/src/trajectory_concatenator_structs.hpp Removes now-unused node-only parameter struct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread planning/autoware_trajectory_validator/src/trajectory_validator_node.cpp Outdated
Comment thread planning/autoware_trajectory_validator/src/trajectory_validator_node.cpp Outdated
Comment thread planning/autoware_trajectory_concatenator/src/trajectory_concatenator.cpp Outdated

@danielsanchezaran danielsanchezaran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see how the inclusion of paralelism and mutex is worth it over the removal of a node that is quite simple (concatenator), can you please illustrate the advantages of this new layout? I dont think it is worth it, especially when it is not obvious that the validator should be the one concatenating trajectories

@zulfaqar-azmi-t4

Copy link
Copy Markdown
Contributor Author

@danielsanchezaran

I dont see how the inclusion of paralelism and mutex

The mutex is not new in this PR. It's already present in the original standalone concatenator node, and I ported that logic directly into the validator without modification.

can you please illustrate the advantages of this new layout? I dont think it is worth it

There are three things to highlight

  1. (Main reason) Node count reduction. This is part of the plan to reduce the number of running nodes in the planning pipeline. There is no clear requirement for concatenator to be its own node. If it is for separation of responsibility, it is satisfied just as well by keeping it as a class inside the validator. Unless there's a specific reason for it to be a node, a library called from the validator is the simpler design.
  2. The standalone concat node publishes on a fixed 100ms timer. I assume that the diffusion planner has high latency which requires a longer time buffer. The side effect, however, is that the validator's callback, which based on concat's output subscription, is also capped at ~100ms cadence. Of course we can also add timer based publisher in the validator, but that doesn't make sense if the reason is because we can't wait for concatenator's subscription. Merging the nodes makes it easier to handle this.
  3. The validator node is planned to be renamed to trajectory_selector, and each existing planning-pipeline node will be converted into a library called by the selector. This PR prioritizes the node merge first; the rename and the moving validator out of the package will be done later.

@danielsanchezaran

Copy link
Copy Markdown
Contributor

@danielsanchezaran

I dont see how the inclusion of paralelism and mutex

The mutex is not new in this PR. It's already present in the original standalone concatenator node, and I ported that logic directly into the validator without modification.

can you please illustrate the advantages of this new layout? I dont think it is worth it

There are three things to highlight

  1. (Main reason) Node count reduction. This is part of the plan to reduce the number of running nodes in the planning pipeline. There is no clear requirement for concatenator to be its own node. If it is for separation of responsibility, it is satisfied just as well by keeping it as a class inside the validator. Unless there's a specific reason for it to be a node, a library called from the validator is the simpler design.
  2. The standalone concat node publishes on a fixed 100ms timer. I assume that the diffusion planner has high latency which requires a longer time buffer. The side effect, however, is that the validator's callback, which based on concat's output subscription, is also capped at ~100ms cadence. Of course we can also add timer based publisher in the validator, but that doesn't make sense if the reason is because we can't wait for concatenator's subscription. Merging the nodes makes it easier to handle this.
  3. The validator node is planned to be renamed to trajectory_selector, and each existing planning-pipeline node will be converted into a library called by the selector. This PR prioritizes the node merge first; the rename and the moving validator out of the package will be done later.

The points have been addressed in a private conversation, I am ok with this PR changes given the proposed future changes. @zulfaqar-azmi-t4 please take a look at the copilot review comments too

@danielsanchezaran danielsanchezaran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zulfaqar-azmi-t4 please also update the READMEs

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as draft May 14, 2026 06:11
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the combine_validator_and_concatenator branch 2 times, most recently from 99e3534 to e1d585d Compare May 14, 2026 12:18
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review May 14, 2026 12:18
@danielsanchezaran danielsanchezaran requested a review from Copilot May 15, 2026 01:42
zulfaqar-azmi-t4 and others added 20 commits June 5, 2026 10:01
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
…ustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
…uplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the combine_validator_and_concatenator branch from e42c5cc to 70a4b91 Compare June 5, 2026 01:40
@github-actions github-actions Bot added the type:documentation Creating or refining documentation. (auto-assigned) label Jun 5, 2026
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 merged commit fb73b91 into autowarefoundation:main Jun 5, 2026
29 of 30 checks passed
@github-project-automation github-project-automation Bot moved this from To Triage to Done in Software Working Group Jun 5, 2026
paulsohn-github-app Bot pushed a commit to paulsohn/autoware_universe_planning_2 that referenced this pull request Jun 5, 2026
…refoundation/autoware_universe#12532)

* feat(concatenator): add concatenator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: combine concatenator with validator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove explicit find package, and pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: failing test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: create public interface for concatenator, and move concatenator to detail folder

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: separate validator to validator interface and initialize selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix loading parameters

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(node): publish validated trajectories; remove dead member and unjustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): use validator_ptr_ in validate_trajectories

validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): remove redundant diagnostics clear; merge duplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: rename context

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: return if concatenated is empty

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* doc: docstring

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove failed spellcheck

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix initial processing time value

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: rename interface to wrapper

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* remove processing time and add unit test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* separate trajectory selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: precommit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: addresses copilot comments

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: address minor copilot comment

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
PanConChicharron pushed a commit to PanConChicharron/autoware.universe that referenced this pull request Jun 10, 2026
…refoundation#12532)

* feat(concatenator): add concatenator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: combine concatenator with validator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove explicit find package, and pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: failing test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: create public interface for concatenator, and move concatenator to detail folder

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: separate validator to validator interface and initialize selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix loading parameters

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(node): publish validated trajectories; remove dead member and unjustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): use validator_ptr_ in validate_trajectories

validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): remove redundant diagnostics clear; merge duplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: rename context

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: return if concatenated is empty

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* doc: docstring

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove failed spellcheck

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix initial processing time value

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: rename interface to wrapper

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* remove processing time and add unit test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* separate trajectory selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: precommit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: addresses copilot comments

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: address minor copilot comment

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
zulfaqar-azmi-t4 added a commit to tier4/autoware_universe that referenced this pull request Jun 11, 2026
…refoundation#12532)

* feat(concatenator): add concatenator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: combine concatenator with validator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove explicit find package, and pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: failing test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: create public interface for concatenator, and move concatenator to detail folder

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: separate validator to validator interface and initialize selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix loading parameters

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(node): publish validated trajectories; remove dead member and unjustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): use validator_ptr_ in validate_trajectories

validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): remove redundant diagnostics clear; merge duplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: rename context

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: return if concatenated is empty

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* doc: docstring

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove failed spellcheck

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix initial processing time value

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: rename interface to wrapper

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* remove processing time and add unit test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* separate trajectory selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: precommit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: addresses copilot comments

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: address minor copilot comment

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zulfaqar-azmi-t4 added a commit to tier4/autoware_universe that referenced this pull request Jun 17, 2026
…refoundation#12532)

* feat(concatenator): add concatenator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: combine concatenator with validator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove explicit find package, and pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: failing test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: create public interface for concatenator, and move concatenator to detail folder

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: separate validator to validator interface and initialize selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix loading parameters

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(node): publish validated trajectories; remove dead member and unjustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): use validator_ptr_ in validate_trajectories

validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): remove redundant diagnostics clear; merge duplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: rename context

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: return if concatenated is empty

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* doc: docstring

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove failed spellcheck

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix initial processing time value

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: rename interface to wrapper

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* remove processing time and add unit test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* separate trajectory selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: precommit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: addresses copilot comments

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: address minor copilot comment

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zulfaqar-azmi-t4 added a commit to tier4/autoware_universe that referenced this pull request Jun 17, 2026
…utowarefoundation#12532) (#3031)

* feat(trajectory_selector): combine validator and concatenator (autowarefoundation#12532)

* feat(concatenator): add concatenator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: combine concatenator with validator

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove explicit find package, and pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: failing test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: create public interface for concatenator, and move concatenator to detail folder

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* feat: separate validator to validator interface and initialize selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix loading parameters

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(node): publish validated trajectories; remove dead member and unjustified mutable

on_timer() computed the validated result but never called publish(), making
the node a no-op at the output. Both integration tests were silently timing
out because of this.

Also removed sub_trajectories_ which was declared but never assigned in
subscribers(), and dropped the unjustified `mutable` qualifier from
time_keeper_ (no const method ever writes to it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): use validator_ptr_ in validate_trajectories

validate_trajectories() was constructing a new TrajectoryValidator on
every call (copying the plugins_ vector each time) instead of using the
validator_ptr_ member that is initialized in the constructor for exactly
this purpose. validator_ptr_ was live memory that was never called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix(validator_interface): remove redundant diagnostics clear; merge duplicate DebugPublisher

Two cleanups in validate_trajectories / publishers():

1. The first diagnostics_interface_ptr_->clear() was dead work: the
   diagnostics are cleared again five lines later, just before the
   add_key_value loop, so the first call never had observable effect.

2. pub_validation_reports_ and pub_debug_ were both initialized to a
   DebugPublisher with the identical prefix "~/debug". A single
   DebugPublisher handles multiple sub-topics; the duplicate object
   added confusion without benefit. Removed pub_validation_reports_ and
   routed its one call-site through pub_debug_.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: rename context

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: return if concatenated is empty

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* doc: docstring

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: remove failed spellcheck

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix initial processing time value

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: rename interface to wrapper

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* remove processing time and add unit test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* separate trajectory selector

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: precommit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: addresses copilot comments

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: address minor copilot comment

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: pre-commit

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: add validator to debug namespace

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: PDDP-201 restore route msgs

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: json schema for collision check

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix: update validation reports in planning_evaluator launcher

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants