diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index efdd2121bf369..4cc1ccee403cb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -148,6 +148,7 @@ planning/autoware_behavior_path_external_request_lane_change_module/** fumiya.wa planning/autoware_behavior_velocity_planner/** kosuke.takeuchi@tier4.jp kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp mamoru.sobue@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp planning/autoware_behavior_velocity_template_module/** daniel.sanchez@tier4.jp planning/autoware_behavior_velocity_virtual_traffic_light_module/** kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp +planning/autoware_behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp planning/autoware_planning_test_manager/** kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp planning/autoware_remaining_distance_time_calculator/** ahmed.ebrahim@leodrive.ai planning/autoware_static_centerline_generator/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp @@ -175,7 +176,6 @@ planning/autoware_behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp m planning/behavior_velocity_speed_bump_module/** mdogru@leodrive.ai shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp planning/behavior_velocity_stop_line_module/** fumiya.watanabe@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp zhe.shen@tier4.jp planning/behavior_velocity_traffic_light_module/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp -planning/behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp planning/costmap_generator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp planning/autoware_external_velocity_limit_selector/** satoshi.ota@tier4.jp shinnosuke.hirakawa@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp planning/freespace_planner/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp diff --git a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml index b093bc6295e65..4cf0c541510ed 100644 --- a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml +++ b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml @@ -106,7 +106,7 @@ /> <let name="behavior_velocity_planner_launch_modules" - value="$(eval "'$(var behavior_velocity_planner_launch_modules)' + 'behavior_velocity_planner::WalkwayModulePlugin, '")" + value="$(eval "'$(var behavior_velocity_planner_launch_modules)' + 'autoware::behavior_velocity_planner::WalkwayModulePlugin, '")" if="$(var launch_walkway_module)" /> <let diff --git a/planning/.pages b/planning/.pages index 07643e854b0ca..ac184f4ceb4dc 100644 --- a/planning/.pages +++ b/planning/.pages @@ -35,7 +35,7 @@ nav: - 'Stop Line': planning/behavior_velocity_stop_line_module - 'Traffic Light': planning/behavior_velocity_traffic_light_module - 'Virtual Traffic Light': planning/autoware_behavior_velocity_virtual_traffic_light_module - - 'Walkway': planning/behavior_velocity_walkway_module + - 'Walkway': planning/autoware_behavior_velocity_walkway_module - 'Parking': - 'Freespace Planner': - 'About Freespace Planner': planning/freespace_planner diff --git a/planning/autoware_behavior_velocity_planner/README.md b/planning/autoware_behavior_velocity_planner/README.md index bcef46e90c1ec..af30de556b542 100644 --- a/planning/autoware_behavior_velocity_planner/README.md +++ b/planning/autoware_behavior_velocity_planner/README.md @@ -9,7 +9,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o - [Blind Spot](../behavior_velocity_blind_spot_module/README.md) - [Crosswalk](../behavior_velocity_crosswalk_module/README.md) -- [Walkway](../behavior_velocity_walkway_module/README.md) +- [Walkway](../autoware_behavior_velocity_walkway_module/README.md) - [Detection Area](../behavior_velocity_detection_area_module/README.md) - [Intersection](../behavior_velocity_intersection_module/README.md) - [MergeFromPrivate](../behavior_velocity_intersection_module/README.md#merge-from-private) diff --git a/planning/autoware_behavior_velocity_planner/package.xml b/planning/autoware_behavior_velocity_planner/package.xml index fff1fb8ff91c0..576c4e92887cb 100644 --- a/planning/autoware_behavior_velocity_planner/package.xml +++ b/planning/autoware_behavior_velocity_planner/package.xml @@ -67,6 +67,7 @@ <test_depend>ament_lint_auto</test_depend> <test_depend>autoware_behavior_velocity_run_out_module</test_depend> <test_depend>autoware_behavior_velocity_virtual_traffic_light_module</test_depend> + <test_depend>autoware_behavior_velocity_walkway_module</test_depend> <test_depend>autoware_lint_common</test_depend> <test_depend>behavior_velocity_blind_spot_module</test_depend> <test_depend>behavior_velocity_crosswalk_module</test_depend> @@ -79,7 +80,6 @@ <test_depend>behavior_velocity_speed_bump_module</test_depend> <test_depend>behavior_velocity_stop_line_module</test_depend> <test_depend>behavior_velocity_traffic_light_module</test_depend> - <test_depend>behavior_velocity_walkway_module</test_depend> <!--<test_depend>autoware_behavior_velocity_template_module</test_depend>--> <member_of_group>rosidl_interface_packages</member_of_group> diff --git a/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp b/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp index e741d054afbaf..b21fd6cc0f168 100644 --- a/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp +++ b/planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp @@ -69,7 +69,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode() std::vector<std::string> module_names; module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin"); - module_names.emplace_back("behavior_velocity_planner::WalkwayModulePlugin"); + module_names.emplace_back("autoware::behavior_velocity_planner::WalkwayModulePlugin"); module_names.emplace_back("behavior_velocity_planner::TrafficLightModulePlugin"); module_names.emplace_back("behavior_velocity_planner::IntersectionModulePlugin"); module_names.emplace_back("behavior_velocity_planner::MergeFromPrivateModulePlugin"); @@ -98,7 +98,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode() behavior_velocity_planner_dir + "/config/behavior_velocity_planner.param.yaml", get_behavior_velocity_module_config_no_prefix("blind_spot"), get_behavior_velocity_module_config_no_prefix("crosswalk"), - get_behavior_velocity_module_config_no_prefix("walkway"), + get_behavior_velocity_module_config("walkway"), get_behavior_velocity_module_config_no_prefix("detection_area"), get_behavior_velocity_module_config_no_prefix("intersection"), get_behavior_velocity_module_config_no_prefix("no_stopping_area"), diff --git a/planning/behavior_velocity_walkway_module/CMakeLists.txt b/planning/autoware_behavior_velocity_walkway_module/CMakeLists.txt similarity index 86% rename from planning/behavior_velocity_walkway_module/CMakeLists.txt rename to planning/autoware_behavior_velocity_walkway_module/CMakeLists.txt index 351a240743402..11504d9c8999c 100644 --- a/planning/behavior_velocity_walkway_module/CMakeLists.txt +++ b/planning/autoware_behavior_velocity_walkway_module/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(behavior_velocity_walkway_module) +project(autoware_behavior_velocity_walkway_module) find_package(autoware_cmake REQUIRED) autoware_package() diff --git a/planning/behavior_velocity_walkway_module/README.md b/planning/autoware_behavior_velocity_walkway_module/README.md similarity index 100% rename from planning/behavior_velocity_walkway_module/README.md rename to planning/autoware_behavior_velocity_walkway_module/README.md diff --git a/planning/behavior_velocity_walkway_module/config/walkway.param.yaml b/planning/autoware_behavior_velocity_walkway_module/config/walkway.param.yaml similarity index 100% rename from planning/behavior_velocity_walkway_module/config/walkway.param.yaml rename to planning/autoware_behavior_velocity_walkway_module/config/walkway.param.yaml diff --git a/planning/behavior_velocity_walkway_module/package.xml b/planning/autoware_behavior_velocity_walkway_module/package.xml similarity index 90% rename from planning/behavior_velocity_walkway_module/package.xml rename to planning/autoware_behavior_velocity_walkway_module/package.xml index ea6c7803717f9..59fa84acefcbb 100644 --- a/planning/behavior_velocity_walkway_module/package.xml +++ b/planning/autoware_behavior_velocity_walkway_module/package.xml @@ -1,9 +1,9 @@ <?xml version="1.0"?> <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> <package format="3"> - <name>behavior_velocity_walkway_module</name> + <name>autoware_behavior_velocity_walkway_module</name> <version>0.1.0</version> - <description>The behavior_velocity_walkway_module package</description> + <description>The autoware_behavior_velocity_walkway_module package</description> <maintainer email="satoshi.ota@tier4.jp">Satoshi Ota</maintainer> <maintainer email="tomoya.kimura@tier4.jp">Tomoya Kimura</maintainer> diff --git a/planning/autoware_behavior_velocity_walkway_module/plugins.xml b/planning/autoware_behavior_velocity_walkway_module/plugins.xml new file mode 100644 index 0000000000000..d7f9e948154c1 --- /dev/null +++ b/planning/autoware_behavior_velocity_walkway_module/plugins.xml @@ -0,0 +1,3 @@ +<library path="autoware_behavior_velocity_walkway_module"> + <class type="autoware::behavior_velocity_planner::WalkwayModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/> +</library> diff --git a/planning/behavior_velocity_walkway_module/src/debug.cpp b/planning/autoware_behavior_velocity_walkway_module/src/debug.cpp similarity index 95% rename from planning/behavior_velocity_walkway_module/src/debug.cpp rename to planning/autoware_behavior_velocity_walkway_module/src/debug.cpp index 8814fa8271866..d26a47e512bc4 100644 --- a/planning/behavior_velocity_walkway_module/src/debug.cpp +++ b/planning/autoware_behavior_velocity_walkway_module/src/debug.cpp @@ -22,7 +22,7 @@ #include <vector> -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { using motion_utils::createSlowDownVirtualWallMarker; @@ -34,6 +34,7 @@ using tier4_autoware_utils::createMarkerColor; using tier4_autoware_utils::createMarkerScale; using tier4_autoware_utils::createPoint; using visualization_msgs::msg::Marker; +namespace planning_utils = ::behavior_velocity_planner::planning_utils; namespace { @@ -98,4 +99,4 @@ visualization_msgs::msg::MarkerArray WalkwayModule::createDebugMarkerArray() return debug_marker_array; } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_walkway_module/src/manager.cpp b/planning/autoware_behavior_velocity_walkway_module/src/manager.cpp similarity index 88% rename from planning/behavior_velocity_walkway_module/src/manager.cpp rename to planning/autoware_behavior_velocity_walkway_module/src/manager.cpp index d427e57009cf6..1adea85788d5b 100644 --- a/planning/behavior_velocity_walkway_module/src/manager.cpp +++ b/planning/autoware_behavior_velocity_walkway_module/src/manager.cpp @@ -23,11 +23,15 @@ #include <string> #include <vector> -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::SceneModuleManagerInterface; using lanelet::autoware::Crosswalk; using tier4_autoware_utils::getOrDeclareParameter; +namespace planning_utils = ::behavior_velocity_planner::planning_utils; +using ::behavior_velocity_planner::getCrosswalkIdSetOnPath; +using ::behavior_velocity_planner::getCrosswalksOnPath; WalkwayModuleManager::WalkwayModuleManager(rclcpp::Node & node) : SceneModuleManagerInterface(node, getModuleName()) @@ -100,8 +104,9 @@ WalkwayModuleManager::getModuleExpiredFunction(const PathWithLaneId & path) return walkway_id_set.count(scene_module->getModuleId()) == 0; }; } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #include <pluginlib/class_list_macros.hpp> PLUGINLIB_EXPORT_CLASS( - behavior_velocity_planner::WalkwayModulePlugin, behavior_velocity_planner::PluginInterface) + autoware::behavior_velocity_planner::WalkwayModulePlugin, + ::behavior_velocity_planner::PluginInterface) diff --git a/planning/behavior_velocity_walkway_module/src/manager.hpp b/planning/autoware_behavior_velocity_walkway_module/src/manager.hpp similarity index 86% rename from planning/behavior_velocity_walkway_module/src/manager.hpp rename to planning/autoware_behavior_velocity_walkway_module/src/manager.hpp index 5228445bb4e03..d19bf9c1c1d5f 100644 --- a/planning/behavior_velocity_walkway_module/src/manager.hpp +++ b/planning/autoware_behavior_velocity_walkway_module/src/manager.hpp @@ -31,9 +31,11 @@ #include <set> #include <vector> -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { - +using ::behavior_velocity_planner::PluginWrapper; +using ::behavior_velocity_planner::SceneModuleInterface; +using ::behavior_velocity_planner::SceneModuleManagerInterface; using tier4_planning_msgs::msg::PathWithLaneId; class WalkwayModuleManager : public SceneModuleManagerInterface @@ -56,6 +58,6 @@ class WalkwayModulePlugin : public PluginWrapper<WalkwayModuleManager> { }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // MANAGER_HPP_ diff --git a/planning/behavior_velocity_walkway_module/src/scene_walkway.cpp b/planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.cpp similarity index 91% rename from planning/behavior_velocity_walkway_module/src/scene_walkway.cpp rename to planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.cpp index 4a777d49f4fe6..236654e598216 100644 --- a/planning/behavior_velocity_walkway_module/src/scene_walkway.cpp +++ b/planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.cpp @@ -19,14 +19,22 @@ #include <cmath> -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { namespace bg = boost::geometry; +using ::behavior_velocity_planner::getLinestringIntersects; +using ::behavior_velocity_planner::getPolygonIntersects; +using ::behavior_velocity_planner::getStopLineFromMap; +using ::behavior_velocity_planner::PlanningBehavior; +using ::behavior_velocity_planner::SceneModuleInterface; +using ::behavior_velocity_planner::StopFactor; +using ::behavior_velocity_planner::VelocityFactor; using motion_utils::calcLongitudinalOffsetPose; using motion_utils::calcSignedArcLength; using motion_utils::findNearestSegmentIndex; using tier4_autoware_utils::createPoint; using tier4_autoware_utils::getPose; +namespace planning_utils = ::behavior_velocity_planner::planning_utils; WalkwayModule::WalkwayModule( const int64_t module_id, const lanelet::LaneletMapPtr & lanelet_map_ptr, @@ -165,4 +173,4 @@ bool WalkwayModule::modifyPathVelocity(PathWithLaneId * path, StopReason * stop_ return true; } -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner diff --git a/planning/behavior_velocity_walkway_module/src/scene_walkway.hpp b/planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.hpp similarity index 88% rename from planning/behavior_velocity_walkway_module/src/scene_walkway.hpp rename to planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.hpp index c372a5835f795..1928466400134 100644 --- a/planning/behavior_velocity_walkway_module/src/scene_walkway.hpp +++ b/planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.hpp @@ -31,8 +31,12 @@ #include <utility> #include <vector> -namespace behavior_velocity_planner +namespace autoware::behavior_velocity_planner { +using ::behavior_velocity_planner::DebugData; +using ::behavior_velocity_planner::PathWithLaneId; +using ::behavior_velocity_planner::SceneModuleInterface; +using ::behavior_velocity_planner::StopReason; class WalkwayModule : public SceneModuleInterface { @@ -77,6 +81,6 @@ class WalkwayModule : public SceneModuleInterface // flag to use regulatory element const bool use_regulatory_element_; }; -} // namespace behavior_velocity_planner +} // namespace autoware::behavior_velocity_planner #endif // SCENE_WALKWAY_HPP_ diff --git a/planning/behavior_velocity_walkway_module/plugins.xml b/planning/behavior_velocity_walkway_module/plugins.xml deleted file mode 100644 index 971a49f2cb044..0000000000000 --- a/planning/behavior_velocity_walkway_module/plugins.xml +++ /dev/null @@ -1,3 +0,0 @@ -<library path="behavior_velocity_walkway_module"> - <class type="behavior_velocity_planner::WalkwayModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/> -</library>