Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro jazzy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_planning_test_manager package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

Tags No category tags.
Version 1.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_core.git
VCS Type git
VCS Version main
Last Updated 2025-06-12
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS 2 node for testing interface of the nodes in planning module

Additional Links

No additional links.

Maintainers

  • Kyoichi Sugahara
  • Takamasa Horibe
  • Mamoru Sobue
  • Junya Sasaki

Authors

  • Kyoichi Sugahara

Autoware Planning Test Manager

Background

In each node of the planning module, when exceptional input, such as unusual routes or significantly deviated ego-position, is given, the node may not be prepared for such input and could crash. As a result, debugging node crashes can be time-consuming. For example, if an empty trajectory is given as input and it was not anticipated during implementation, the node might crash due to the unaddressed exceptional input when changes are merged, during scenario testing or while the system is running on an actual vehicle.

Purpose

The purpose is to provide a utility for implementing tests to ensure that node operates correctly when receiving exceptional input. By utilizing this utility and implementing tests for exceptional input, the purpose is to reduce bugs that are only discovered when actually running the system, by requiring measures for exceptional input before merging PRs.

Features

Confirmation of normal operation

For the test target node, confirm that the node operates correctly and publishes the required messages for subsequent nodes. To do this, test_node publish the necessary messages and confirm that the node’s output is being published.

Robustness confirmation for special inputs

After confirming normal operation, ensure that the test target node does not crash when given exceptional input. To do this, provide exceptional input from the test_node and confirm that the node does not crash.

(WIP)

Usage


TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
{
  rclcpp::init(0, nullptr);

  // instantiate test_manager with PlanningInterfaceTestManager type
  auto test_manager = std::make_shared<autoware::planning_test_manager::PlanningInterfaceTestManager>();

  // get package directories for necessary configuration files
  const auto autoware_test_utils_dir =
    ament_index_cpp::get_package_share_directory("autoware_test_utils");
  const auto target_node_dir =
    ament_index_cpp::get_package_share_directory("target_node");

  // set arguments to get the config file
  node_options.arguments(
    {"--ros-args", "--params-file",
     autoware_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
     autoware_planning_validator_dir + "/config/planning_validator.param.yaml"});

  // instantiate the TargetNode with node_options
  auto test_target_node = std::make_shared<TargetNode>(node_options);

  // publish the necessary topics from test_manager second argument is topic name
  test_manager->publishOdometry(test_target_node, "/localization/kinematic_state");
  test_manager->publishMaxVelocity(
    test_target_node, "velocity_smoother/input/external_velocity_limit_mps");

  // set scenario_selector's input topic name(this topic is changed to test node)
  test_manager->setTrajectoryInputTopicName("input/parking/trajectory");

  // test with normal trajectory
  ASSERT_NO_THROW(test_manager->testWithNominalTrajectory(test_target_node));

  // make sure target_node is running
  EXPECT_GE(test_manager->getReceivedTopicNum(), 1);

  // test with trajectory input with empty/one point/overlapping point
  ASSERT_NO_THROW(test_manager->testWithAbnormalTrajectory(test_target_node));

  // shutdown ROS context
  rclcpp::shutdown();
}

Implemented tests

Node Test name exceptional input output Exceptional input pattern
autoware_planning_validator NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
velocity_smoother NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
obstacle_velocity_limiter NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
path_optimizer NodeTestWithExceptionTrajectory trajectory trajectory Empty, single point, path with duplicate points
scenario_selector NodeTestWithExceptionTrajectoryLaneDrivingMode NodeTestWithExceptionTrajectoryParkingMode trajectory scenario Empty, single point, path with duplicate points for scenarios:LANEDRIVING and PARKING
freespace_planner NodeTestWithExceptionRoute route trajectory Empty route
behavior_path_planner NodeTestWithExceptionRoute NodeTestWithOffTrackEgoPose route route odometry Empty route Off-lane ego-position
behavior_velocity_planner NodeTestWithExceptionPathWithLaneID path_with_lane_id path Empty path

Important Notes

During test execution, when launching a node, parameters are loaded from the parameter file within each package. Therefore, when adding parameters, it is necessary to add the required parameters to the parameter file in the target node package. This is to prevent the node from being unable to launch if there are missing parameters when retrieving them from the parameter file during node launch.

Future extensions / Unimplemented parts

(WIP)

CHANGELOG

Changelog for package autoware_planning_test_manager

1.1.0 (2025-05-01)

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml

  • test(autoware_planning_test_manager): add tests (#273)

    • test(autoware_planning_test_manager): add tests

    * style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>

  • feat: adaptation to ROS nodes guidelines about directory structure (#272)

  • feat(autoware_path_generator): function to smooth the path (#227)

    * feat: function to smooth the route (see below) Description: This commit is kind of feature porting from [autoware.universe]{.title-ref} as follows

    * Import [PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref} from the following [autoware.universe]{.title-ref} code https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104

    • Also import all related functions from the [autoware.universe]{.title-ref} side
    • style(pre-commit): autofix
    • bugs: fix remaining conflicts

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    • refactor: as follows
    • Enhance error handlings
    • Remove unused variables
    • Simplify the code
    • Improve readability a little bit
    • style(pre-commit): autofix
    • refactor: enhance error handling
    • style(pre-commit): autofix
    • bug: fix wrong function declaration in header
    • bug: fix wrong point index calculation
    • bug: remove meaningless comment
    • This comment is wrote because of my misunderstanding
    • fix: apply [pre-commit]{.title-ref}
    • fix: smooth path before cropping trajectory points
    • bug: fix shadow variable
    • bug: fix missing parameters for [autoware_path_generator]{.title-ref}
    • bug: fix by cpplint
    • style(pre-commit): autofix
    • bug: apply missing fix proposed by cpplint
    • style(pre-commit): autofix
    • bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
    • fix(autoware_path_generator): add maintainer and author
    • style(pre-commit): autofix
    • fix: by pre-commit
    • Sorry, I was forgetting to do this on my local env.
    • fix: smooth path only when a goal point is included
    • bug: do error handling
    • style(pre-commit): autofix
    • bug: fix wrong distance calculation
    • The goal position is generally separate from the path points
    • fix: remove sanity check temporary as following reasons
    • CI (especially unit tests) fails due to this sanity check

    * As this is out of scope for this PR, we will fix the bug where the start and end are reversed in another PR

    • refactor: fix complexity
    • We should start from the simple one
    • Then we can add the necessary optimization later
    • bug: missing fixes in the include header
    • bug: inconsistent function declaration
    • The type of returned value and arguments were wrong

    * Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

    * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_planning_test_manager at Robotics Stack Exchange