Skip to content

Commit

Permalink
refactor(planning_validator)!: prefix package and namespace with auto…
Browse files Browse the repository at this point in the history
…ware (#7320)

* add autoware_ prefix to planning_validator

Signed-off-by: kyoichi-sugahara <[email protected]>

* add prefix to package name in .pages

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix link of the image

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
  • Loading branch information
kyoichi-sugahara authored and KhalilSelyan committed Jul 22, 2024
1 parent ccf324e commit 7843035
Show file tree
Hide file tree
Showing 22 changed files with 104 additions and 103 deletions.
2 changes: 1 addition & 1 deletion launch/tier4_planning_launch/launch/planning.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<!-- planning validator -->
<group>
<include file="$(find-pkg-share planning_validator)/launch/planning_validator.launch.xml">
<include file="$(find-pkg-share autoware_planning_validator)/launch/planning_validator.launch.xml">
<arg name="input_trajectory" value="/planning/scenario_planning/velocity_smoother/trajectory"/>
<arg name="output_trajectory" value="/planning/scenario_planning/trajectory"/>
<arg name="planning_validator_param_path" value="$(var planning_validator_param_path)"/>
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_planning_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<exec_depend>autoware_external_velocity_limit_selector</exec_depend>
<exec_depend>autoware_path_optimizer</exec_depend>
<exec_depend>autoware_planning_topic_converter</exec_depend>
<exec_depend>autoware_planning_validator</exec_depend>
<exec_depend>autoware_remaining_distance_time_calculator</exec_depend>
<exec_depend>autoware_surround_obstacle_checker</exec_depend>
<exec_depend>autoware_velocity_smoother</exec_depend>
Expand All @@ -73,7 +74,6 @@
<exec_depend>obstacle_cruise_planner</exec_depend>
<exec_depend>obstacle_stop_planner</exec_depend>
<exec_depend>planning_evaluator</exec_depend>
<exec_depend>planning_validator</exec_depend>
<exec_depend>scenario_selector</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ nav:
- 'Planning Test Utils': planning/planning_test_utils
- 'Planning Test Manager': planning/autoware_planning_test_manager
- 'Planning Topic Converter': planning/autoware_planning_topic_converter
- 'Planning Validator': planning/planning_validator
- 'Planning Validator': planning/autoware_planning_validator
26 changes: 13 additions & 13 deletions planning/autoware_planning_test_manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
node_options.arguments(
{"--ros-args", "--params-file",
planning_test_utils_dir + "/config/test_vehicle_info.param.yaml", "--params-file",
planning_validator_dir + "/config/planning_validator.param.yaml"});
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);
Expand Down Expand Up @@ -70,18 +70,18 @@ TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionTrajectory)
## Implemented tests
| Node | Test name | exceptional input | output | Exceptional input pattern |
| ------------------------- | ----------------------------------------------------------------------------------------- | ----------------- | -------------- | ------------------------------------------------------------------------------------- |
| 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_cruise_planner | NodeTestWithExceptionTrajectory | trajectory | trajectory | Empty, single point, path with duplicate points |
| obstacle_stop_planner | 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 |
| 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_cruise_planner | NodeTestWithExceptionTrajectory | trajectory | trajectory | Empty, single point, path with duplicate points |
| obstacle_stop_planner | 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
Expand Down
30 changes: 15 additions & 15 deletions planning/planning_validator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
cmake_minimum_required(VERSION 3.22)
project(planning_validator)
project(autoware_planning_validator)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(planning_validator_helpers SHARED
ament_auto_add_library(autoware_planning_validator_helpers SHARED
src/utils.cpp
src/debug_marker.cpp
)

# planning validator
ament_auto_add_library(planning_validator_component SHARED
include/planning_validator/planning_validator.hpp
ament_auto_add_library(autoware_planning_validator_component SHARED
include/autoware_planning_validator/planning_validator.hpp
src/planning_validator.cpp
)
target_link_libraries(planning_validator_component planning_validator_helpers)
rclcpp_components_register_node(planning_validator_component
PLUGIN "planning_validator::PlanningValidator"
target_link_libraries(autoware_planning_validator_component autoware_planning_validator_helpers)
rclcpp_components_register_node(autoware_planning_validator_component
PLUGIN "autoware::planning_validator::PlanningValidator"
EXECUTABLE planning_validator_node
)

Expand All @@ -25,7 +25,7 @@ ament_auto_add_library(invalid_trajectory_publisher_node SHARED
src/invalid_trajectory_publisher/invalid_trajectory_publisher.cpp
)
rclcpp_components_register_node(invalid_trajectory_publisher_node
PLUGIN "planning_validator::InvalidTrajectoryPublisherNode"
PLUGIN "autoware::planning_validator::InvalidTrajectoryPublisherNode"
EXECUTABLE invalid_trajectory_publisher
)

Expand All @@ -37,29 +37,29 @@ rosidl_generate_interfaces(

# to use a message defined in the same package
if(${rosidl_cmake_VERSION} VERSION_LESS 2.5.0)
rosidl_target_interfaces(planning_validator_component
rosidl_target_interfaces(autoware_planning_validator_component
${PROJECT_NAME} "rosidl_typesupport_cpp")
else()
rosidl_get_typesupport_target(
cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")
target_link_libraries(planning_validator_component "${cpp_typesupport_target}")
target_link_libraries(autoware_planning_validator_component "${cpp_typesupport_target}")
endif()

if(BUILD_TESTING)
ament_add_ros_isolated_gtest(test_planning_validator
ament_add_ros_isolated_gtest(test_autoware_planning_validator
test/src/test_main.cpp
test/src/test_planning_validator_functions.cpp
test/src/test_planning_validator_helper.cpp
test/src/test_planning_validator_pubsub.cpp
test/src/test_${PROJECT_NAME}_node_interface.cpp
test/src/test_planning_validator_node_interface.cpp

)
ament_target_dependencies(test_planning_validator
ament_target_dependencies(test_autoware_planning_validator
rclcpp
autoware_planning_msgs
)
target_link_libraries(test_planning_validator
planning_validator_component
target_link_libraries(test_autoware_planning_validator
autoware_planning_validator_component
)
endif()

Expand Down
8 changes: 4 additions & 4 deletions planning/planning_validator/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Planning Validator

The `planning_validator` is a module that checks the validity of a trajectory before it is published. The status of the validation can be viewed in the `/diagnostics` and `/validation_status` topics. When an invalid trajectory is detected, the `planning_validator` will process the trajectory following the selected option: "0. publish the trajectory as it is", "1. stop publishing the trajectory", "2. publish the last validated trajectory".
The `autoware_planning_validator` is a module that checks the validity of a trajectory before it is published. The status of the validation can be viewed in the `/diagnostics` and `/validation_status` topics. When an invalid trajectory is detected, the `autoware_planning_validator` will process the trajectory following the selected option: "0. publish the trajectory as it is", "1. stop publishing the trajectory", "2. publish the last validated trajectory".

![planning_validator](./image/planning_validator.drawio.svg)
![autoware_planning_validator](./image/planning_validator.drawio.svg)

## Supported features

Expand All @@ -29,7 +29,7 @@ The following features are to be implemented.

### Inputs

The `planning_validator` takes in the following inputs:
The `autoware_planning_validator` takes in the following inputs:

| Name | Type | Description |
| -------------------- | --------------------------------- | ---------------------------------------------- |
Expand All @@ -48,7 +48,7 @@ It outputs the following:

## Parameters

The following parameters can be set for the `planning_validator`:
The following parameters can be set for the `autoware_planning_validator`:

### System parameters

Expand Down
Loading

0 comments on commit 7843035

Please sign in to comment.