diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d21494d2ccc8f..b932cc62b77ca 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -151,6 +151,7 @@ planning/autoware_freespace_planning_algorithms/** kosuke.takeuchi@tier4.jp taka planning/autoware_mission_planner/** isamu.takagi@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp ryohsuke.mitsudome@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp planning/autoware_objects_of_interest_marker_interface/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp zulfaqar.azmi@tier4.jp planning/autoware_obstacle_cruise_planner/** kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp yuki.takagi@tier4.jp +planning/autoware_obstacle_stop_planner/** berkay@leodrive.ai bnk@leodrive.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp planning/autoware_path_optimizer/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp planning/autoware_path_smoother/** maxime.clement@tier4.jp takayuki.murooka@tier4.jp planning/autoware_planning_test_manager/** kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp @@ -195,7 +196,6 @@ planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limi planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/** maxime.clement@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp planning/motion_velocity_planner/autoware_motion_velocity_planner_common/** maxime.clement@tier4.jp planning/motion_velocity_planner/autoware_motion_velocity_planner_node/** maxime.clement@tier4.jp -planning/obstacle_stop_planner/** berkay@leodrive.ai bnk@leodrive.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp planning/sampling_based_planner/autoware_bezier_sampler/** maxime.clement@tier4.jp planning/sampling_based_planner/autoware_frenet_planner/** maxime.clement@tier4.jp planning/sampling_based_planner/autoware_path_sampler/** maxime.clement@tier4.jp diff --git a/launch/tier4_planning_launch/package.xml b/launch/tier4_planning_launch/package.xml index 1c65c975bc5bf..2b80c2c6ea32e 100644 --- a/launch/tier4_planning_launch/package.xml +++ b/launch/tier4_planning_launch/package.xml @@ -65,6 +65,7 @@ autoware_freespace_planner autoware_mission_planner autoware_obstacle_cruise_planner + autoware_obstacle_stop_planner autoware_path_optimizer autoware_planning_evaluator autoware_planning_topic_converter @@ -74,7 +75,6 @@ autoware_surround_obstacle_checker autoware_velocity_smoother glog_component - obstacle_stop_planner ament_lint_auto autoware_lint_common diff --git a/planning/.pages b/planning/.pages index ac68e6ca9e6b2..424f83cf47611 100644 --- a/planning/.pages +++ b/planning/.pages @@ -48,7 +48,7 @@ nav: - 'Obstacle Cruise Planner': - 'About Obstacle Cruise': planning/autoware_obstacle_cruise_planner - 'How to Debug': planning/autoware_obstacle_cruise_planner/docs/debug - - 'Obstacle Stop Planner': planning/obstacle_stop_planner + - 'Obstacle Stop Planner': planning/autoware_obstacle_stop_planner - 'Path Smoother': - 'About Path Smoother': planning/autoware_path_smoother - 'Elastic Band': planning/autoware_path_smoother/docs/eb diff --git a/planning/obstacle_stop_planner/CMakeLists.txt b/planning/autoware_obstacle_stop_planner/CMakeLists.txt similarity index 60% rename from planning/obstacle_stop_planner/CMakeLists.txt rename to planning/autoware_obstacle_stop_planner/CMakeLists.txt index 5b7edcd559fe5..9e663820b02f1 100644 --- a/planning/obstacle_stop_planner/CMakeLists.txt +++ b/planning/autoware_obstacle_stop_planner/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(obstacle_stop_planner) +project(autoware_obstacle_stop_planner) find_package(autoware_cmake REQUIRED) autoware_package() @@ -7,26 +7,26 @@ autoware_package() find_package(Eigen3 REQUIRED) find_package(PCL REQUIRED) -ament_auto_add_library(obstacle_stop_planner SHARED - src/debug_marker.cpp - src/node.cpp - src/planner_utils.cpp - src/adaptive_cruise_control.cpp +ament_auto_add_library(${PROJECT_NAME} SHARED + DIRECTORY + src ) -target_include_directories(obstacle_stop_planner +target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${PCL_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} + INTERFACE + src ) -target_link_libraries(obstacle_stop_planner +target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} ) -rclcpp_components_register_node(obstacle_stop_planner +rclcpp_components_register_node(${PROJECT_NAME} PLUGIN "motion_planning::ObstacleStopPlannerNode" - EXECUTABLE obstacle_stop_planner_node + EXECUTABLE ${PROJECT_NAME}_node ) if(BUILD_TESTING) diff --git a/planning/obstacle_stop_planner/README.md b/planning/autoware_obstacle_stop_planner/README.md similarity index 100% rename from planning/obstacle_stop_planner/README.md rename to planning/autoware_obstacle_stop_planner/README.md diff --git a/planning/obstacle_stop_planner/config/adaptive_cruise_control.param.yaml b/planning/autoware_obstacle_stop_planner/config/adaptive_cruise_control.param.yaml similarity index 100% rename from planning/obstacle_stop_planner/config/adaptive_cruise_control.param.yaml rename to planning/autoware_obstacle_stop_planner/config/adaptive_cruise_control.param.yaml diff --git a/planning/obstacle_stop_planner/config/common.param.yaml b/planning/autoware_obstacle_stop_planner/config/common.param.yaml similarity index 100% rename from planning/obstacle_stop_planner/config/common.param.yaml rename to planning/autoware_obstacle_stop_planner/config/common.param.yaml diff --git a/planning/obstacle_stop_planner/config/obstacle_stop_planner.param.yaml b/planning/autoware_obstacle_stop_planner/config/obstacle_stop_planner.param.yaml similarity index 100% rename from planning/obstacle_stop_planner/config/obstacle_stop_planner.param.yaml rename to planning/autoware_obstacle_stop_planner/config/obstacle_stop_planner.param.yaml diff --git a/planning/obstacle_stop_planner/config/plot_juggler_adaptive_cruise.xml b/planning/autoware_obstacle_stop_planner/config/plot_juggler_adaptive_cruise.xml similarity index 100% rename from planning/obstacle_stop_planner/config/plot_juggler_adaptive_cruise.xml rename to planning/autoware_obstacle_stop_planner/config/plot_juggler_adaptive_cruise.xml diff --git a/planning/obstacle_stop_planner/config/plot_juggler_slow_down.xml b/planning/autoware_obstacle_stop_planner/config/plot_juggler_slow_down.xml similarity index 100% rename from planning/obstacle_stop_planner/config/plot_juggler_slow_down.xml rename to planning/autoware_obstacle_stop_planner/config/plot_juggler_slow_down.xml diff --git a/planning/obstacle_stop_planner/config/rqt_multiplot_adaptive_cruise.xml b/planning/autoware_obstacle_stop_planner/config/rqt_multiplot_adaptive_cruise.xml similarity index 100% rename from planning/obstacle_stop_planner/config/rqt_multiplot_adaptive_cruise.xml rename to planning/autoware_obstacle_stop_planner/config/rqt_multiplot_adaptive_cruise.xml diff --git a/planning/obstacle_stop_planner/docs/adaptive_cruise.drawio.svg b/planning/autoware_obstacle_stop_planner/docs/adaptive_cruise.drawio.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/adaptive_cruise.drawio.svg rename to planning/autoware_obstacle_stop_planner/docs/adaptive_cruise.drawio.svg diff --git a/planning/obstacle_stop_planner/docs/collision_parameters.svg b/planning/autoware_obstacle_stop_planner/docs/collision_parameters.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/collision_parameters.svg rename to planning/autoware_obstacle_stop_planner/docs/collision_parameters.svg diff --git a/planning/obstacle_stop_planner/docs/keep_stopping.svg b/planning/autoware_obstacle_stop_planner/docs/keep_stopping.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/keep_stopping.svg rename to planning/autoware_obstacle_stop_planner/docs/keep_stopping.svg diff --git a/planning/obstacle_stop_planner/docs/min_longitudinal_margin.svg b/planning/autoware_obstacle_stop_planner/docs/min_longitudinal_margin.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/min_longitudinal_margin.svg rename to planning/autoware_obstacle_stop_planner/docs/min_longitudinal_margin.svg diff --git a/planning/obstacle_stop_planner/docs/restart.svg b/planning/autoware_obstacle_stop_planner/docs/restart.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/restart.svg rename to planning/autoware_obstacle_stop_planner/docs/restart.svg diff --git a/planning/obstacle_stop_planner/docs/restart_prevention.svg b/planning/autoware_obstacle_stop_planner/docs/restart_prevention.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/restart_prevention.svg rename to planning/autoware_obstacle_stop_planner/docs/restart_prevention.svg diff --git a/planning/obstacle_stop_planner/docs/slow_down_parameters.svg b/planning/autoware_obstacle_stop_planner/docs/slow_down_parameters.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/slow_down_parameters.svg rename to planning/autoware_obstacle_stop_planner/docs/slow_down_parameters.svg diff --git a/planning/obstacle_stop_planner/docs/slow_down_target.svg b/planning/autoware_obstacle_stop_planner/docs/slow_down_target.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/slow_down_target.svg rename to planning/autoware_obstacle_stop_planner/docs/slow_down_target.svg diff --git a/planning/obstacle_stop_planner/docs/stop_target.svg b/planning/autoware_obstacle_stop_planner/docs/stop_target.svg similarity index 100% rename from planning/obstacle_stop_planner/docs/stop_target.svg rename to planning/autoware_obstacle_stop_planner/docs/stop_target.svg diff --git a/planning/obstacle_stop_planner/launch/obstacle_stop_planner.launch.xml b/planning/autoware_obstacle_stop_planner/launch/obstacle_stop_planner.launch.xml similarity index 100% rename from planning/obstacle_stop_planner/launch/obstacle_stop_planner.launch.xml rename to planning/autoware_obstacle_stop_planner/launch/obstacle_stop_planner.launch.xml diff --git a/planning/obstacle_stop_planner/package.xml b/planning/autoware_obstacle_stop_planner/package.xml similarity index 94% rename from planning/obstacle_stop_planner/package.xml rename to planning/autoware_obstacle_stop_planner/package.xml index 5aca5efb36384..71eec208f7fdc 100644 --- a/planning/obstacle_stop_planner/package.xml +++ b/planning/autoware_obstacle_stop_planner/package.xml @@ -1,9 +1,9 @@ - obstacle_stop_planner + autoware_obstacle_stop_planner 0.1.0 - The obstacle_stop_planner package + The autoware_obstacle_stop_planner package Satoshi Ota Taiki Tanaka diff --git a/planning/obstacle_stop_planner/src/adaptive_cruise_control.cpp b/planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.cpp similarity index 99% rename from planning/obstacle_stop_planner/src/adaptive_cruise_control.cpp rename to planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.cpp index 1ab368b6f2a8d..c5fcf29466936 100644 --- a/planning/obstacle_stop_planner/src/adaptive_cruise_control.cpp +++ b/planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "obstacle_stop_planner/adaptive_cruise_control.hpp" +#include "adaptive_cruise_control.hpp" #include "autoware/motion_utils/trajectory/trajectory.hpp" @@ -35,6 +35,7 @@ #include #include #include +#include #include namespace bg = boost::geometry; @@ -122,7 +123,7 @@ constexpr double sign(const double value) } } // namespace -namespace motion_planning +namespace autoware::motion_planning { AdaptiveCruiseController::AdaptiveCruiseController( rclcpp::Node * node, const double vehicle_width, const double vehicle_length, @@ -783,4 +784,4 @@ double AdaptiveCruiseController::lowpass_filter( return gain * prev_value + (1.0 - gain) * current_value; } -} // namespace motion_planning +} // namespace autoware::motion_planning diff --git a/planning/obstacle_stop_planner/include/obstacle_stop_planner/adaptive_cruise_control.hpp b/planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.hpp similarity index 97% rename from planning/obstacle_stop_planner/include/obstacle_stop_planner/adaptive_cruise_control.hpp rename to planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.hpp index 55501cf596b07..25664b14320c1 100644 --- a/planning/obstacle_stop_planner/include/obstacle_stop_planner/adaptive_cruise_control.hpp +++ b/planning/autoware_obstacle_stop_planner/src/adaptive_cruise_control.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBSTACLE_STOP_PLANNER__ADAPTIVE_CRUISE_CONTROL_HPP_ -#define OBSTACLE_STOP_PLANNER__ADAPTIVE_CRUISE_CONTROL_HPP_ +#ifndef ADAPTIVE_CRUISE_CONTROL_HPP_ +#define ADAPTIVE_CRUISE_CONTROL_HPP_ #include @@ -29,7 +29,7 @@ #include #include -namespace motion_planning +namespace autoware::motion_planning { using autoware_planning_msgs::msg::TrajectoryPoint; using TrajectoryPoints = std::vector; @@ -232,6 +232,6 @@ class AdaptiveCruiseController static constexpr unsigned int num_debug_values_ = 10; }; -} // namespace motion_planning +} // namespace autoware::motion_planning -#endif // OBSTACLE_STOP_PLANNER__ADAPTIVE_CRUISE_CONTROL_HPP_ +#endif // ADAPTIVE_CRUISE_CONTROL_HPP_ diff --git a/planning/obstacle_stop_planner/src/debug_marker.cpp b/planning/autoware_obstacle_stop_planner/src/debug_marker.cpp similarity index 95% rename from planning/obstacle_stop_planner/src/debug_marker.cpp rename to planning/autoware_obstacle_stop_planner/src/debug_marker.cpp index bbb8dadbcee9d..75d25f3f8db80 100644 --- a/planning/obstacle_stop_planner/src/debug_marker.cpp +++ b/planning/autoware_obstacle_stop_planner/src/debug_marker.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "obstacle_stop_planner/debug_marker.hpp" +#include "debug_marker.hpp" #include #include @@ -24,6 +24,7 @@ #include #endif +#include #include #include @@ -38,7 +39,7 @@ using autoware::universe_utils::createMarkerColor; using autoware::universe_utils::createMarkerScale; using autoware::universe_utils::createPoint; -namespace motion_planning +namespace autoware::motion_planning { ObstacleStopPlannerDebugNode::ObstacleStopPlannerDebugNode( rclcpp::Node * node, const double base_link2front) @@ -458,39 +459,35 @@ MarkerArray ObstacleStopPlannerDebugNode::makeVisualizationMarker() } if (stop_obstacle_point_ptr_ != nullptr) { - auto marker = createDefaultMarker( + auto marker1 = createDefaultMarker( "map", current_time, "stop_obstacle_point", 0, Marker::SPHERE, createMarkerScale(0.25, 0.25, 0.25), createMarkerColor(1.0, 0.0, 0.0, 0.999)); - marker.pose.position = *stop_obstacle_point_ptr_; - msg.markers.push_back(marker); - } + marker1.pose.position = *stop_obstacle_point_ptr_; + msg.markers.push_back(marker1); - if (stop_obstacle_point_ptr_ != nullptr) { - auto marker = createDefaultMarker( + auto marker2 = createDefaultMarker( "map", current_time, "stop_obstacle_text", 0, Marker::TEXT_VIEW_FACING, createMarkerScale(0.0, 0.0, 1.0), createMarkerColor(1.0, 1.0, 1.0, 0.999)); - marker.pose.position = *stop_obstacle_point_ptr_; - marker.pose.position.z += 2.0; - marker.text = "!"; - msg.markers.push_back(marker); + marker2.pose.position = *stop_obstacle_point_ptr_; + marker2.pose.position.z += 2.0; + marker2.text = "!"; + msg.markers.push_back(marker2); } if (slow_down_obstacle_point_ptr_ != nullptr) { - auto marker = createDefaultMarker( + auto marker1 = createDefaultMarker( "map", current_time, "slow_down_obstacle_point", 0, Marker::SPHERE, createMarkerScale(0.25, 0.25, 0.25), createMarkerColor(1.0, 0.0, 0.0, 0.999)); - marker.pose.position = *slow_down_obstacle_point_ptr_; - msg.markers.push_back(marker); - } + marker1.pose.position = *slow_down_obstacle_point_ptr_; + msg.markers.push_back(marker1); - if (slow_down_obstacle_point_ptr_ != nullptr) { - auto marker = createDefaultMarker( + auto marker2 = createDefaultMarker( "map", current_time, "slow_down_obstacle_text", 0, Marker::TEXT_VIEW_FACING, createMarkerScale(0.0, 0.0, 1.0), createMarkerColor(1.0, 1.0, 1.0, 0.999)); - marker.pose.position = *slow_down_obstacle_point_ptr_; - marker.pose.position.z += 2.0; - marker.text = "!"; - msg.markers.push_back(marker); + marker2.pose.position = *slow_down_obstacle_point_ptr_; + marker2.pose.position.z += 2.0; + marker2.text = "!"; + msg.markers.push_back(marker2); } return msg; @@ -542,4 +539,4 @@ VelocityFactorArray ObstacleStopPlannerDebugNode::makeVelocityFactorArray() return velocity_factor_array; } -} // namespace motion_planning +} // namespace autoware::motion_planning diff --git a/planning/obstacle_stop_planner/include/obstacle_stop_planner/debug_marker.hpp b/planning/autoware_obstacle_stop_planner/src/debug_marker.hpp similarity index 96% rename from planning/obstacle_stop_planner/include/obstacle_stop_planner/debug_marker.hpp rename to planning/autoware_obstacle_stop_planner/src/debug_marker.hpp index 2585c8a1141de..4fc8386e92b44 100644 --- a/planning/obstacle_stop_planner/include/obstacle_stop_planner/debug_marker.hpp +++ b/planning/autoware_obstacle_stop_planner/src/debug_marker.hpp @@ -11,8 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBSTACLE_STOP_PLANNER__DEBUG_MARKER_HPP_ -#define OBSTACLE_STOP_PLANNER__DEBUG_MARKER_HPP_ +#ifndef DEBUG_MARKER_HPP_ +#define DEBUG_MARKER_HPP_ #include @@ -34,7 +34,7 @@ #include #include #include -namespace motion_planning +namespace autoware::motion_planning { using geometry_msgs::msg::Point; @@ -154,6 +154,6 @@ class ObstacleStopPlannerDebugNode DebugValues debug_values_; }; -} // namespace motion_planning +} // namespace autoware::motion_planning -#endif // OBSTACLE_STOP_PLANNER__DEBUG_MARKER_HPP_ +#endif // DEBUG_MARKER_HPP_ diff --git a/planning/obstacle_stop_planner/src/node.cpp b/planning/autoware_obstacle_stop_planner/src/node.cpp similarity index 99% rename from planning/obstacle_stop_planner/src/node.cpp rename to planning/autoware_obstacle_stop_planner/src/node.cpp index f3814a2a06a52..dde218c94e77c 100644 --- a/planning/obstacle_stop_planner/src/node.cpp +++ b/planning/autoware_obstacle_stop_planner/src/node.cpp @@ -20,8 +20,8 @@ #include #define EIGEN_MPL2_ONLY -#include "obstacle_stop_planner/node.hpp" -#include "obstacle_stop_planner/planner_utils.hpp" +#include "node.hpp" +#include "planner_utils.hpp" #include #include @@ -38,7 +38,7 @@ #include #endif -namespace motion_planning +namespace autoware::motion_planning { using autoware::motion_utils::calcLongitudinalOffsetPose; using autoware::motion_utils::calcLongitudinalOffsetToSegment; @@ -1601,7 +1601,7 @@ void ObstacleStopPlannerNode::publishDebugData( debug_ptr_->publish(); } -} // namespace motion_planning +} // namespace autoware::motion_planning #include -RCLCPP_COMPONENTS_REGISTER_NODE(motion_planning::ObstacleStopPlannerNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::motion_planning::ObstacleStopPlannerNode) diff --git a/planning/obstacle_stop_planner/include/obstacle_stop_planner/node.hpp b/planning/autoware_obstacle_stop_planner/src/node.hpp similarity index 97% rename from planning/obstacle_stop_planner/include/obstacle_stop_planner/node.hpp rename to planning/autoware_obstacle_stop_planner/src/node.hpp index 6d4f341de6071..fba24061896b6 100644 --- a/planning/obstacle_stop_planner/include/obstacle_stop_planner/node.hpp +++ b/planning/autoware_obstacle_stop_planner/src/node.hpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBSTACLE_STOP_PLANNER__NODE_HPP_ -#define OBSTACLE_STOP_PLANNER__NODE_HPP_ +#ifndef NODE_HPP_ +#define NODE_HPP_ +#include "adaptive_cruise_control.hpp" #include "autoware/universe_utils/ros/logger_level_configure.hpp" #include "autoware/universe_utils/system/stop_watch.hpp" -#include "obstacle_stop_planner/adaptive_cruise_control.hpp" -#include "obstacle_stop_planner/debug_marker.hpp" -#include "obstacle_stop_planner/planner_data.hpp" +#include "debug_marker.hpp" +#include "planner_data.hpp" #include #include @@ -62,7 +62,7 @@ #include #include -namespace motion_planning +namespace autoware::motion_planning { namespace bg = boost::geometry; @@ -319,6 +319,6 @@ class ObstacleStopPlannerNode : public rclcpp::Node std::unique_ptr published_time_publisher_; }; -} // namespace motion_planning +} // namespace autoware::motion_planning -#endif // OBSTACLE_STOP_PLANNER__NODE_HPP_ +#endif // NODE_HPP_ diff --git a/planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_data.hpp b/planning/autoware_obstacle_stop_planner/src/planner_data.hpp similarity index 97% rename from planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_data.hpp rename to planning/autoware_obstacle_stop_planner/src/planner_data.hpp index 1d1e8a3a9844d..bb9cbd59423e9 100644 --- a/planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_data.hpp +++ b/planning/autoware_obstacle_stop_planner/src/planner_data.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBSTACLE_STOP_PLANNER__PLANNER_DATA_HPP_ -#define OBSTACLE_STOP_PLANNER__PLANNER_DATA_HPP_ +#ifndef PLANNER_DATA_HPP_ +#define PLANNER_DATA_HPP_ #include @@ -27,7 +27,7 @@ #include -namespace motion_planning +namespace autoware::motion_planning { using diagnostic_msgs::msg::DiagnosticStatus; @@ -282,6 +282,6 @@ struct PlannerData bool enable_adaptive_cruise{false}; }; -} // namespace motion_planning +} // namespace autoware::motion_planning -#endif // OBSTACLE_STOP_PLANNER__PLANNER_DATA_HPP_ +#endif // PLANNER_DATA_HPP_ diff --git a/planning/obstacle_stop_planner/src/planner_utils.cpp b/planning/autoware_obstacle_stop_planner/src/planner_utils.cpp similarity index 99% rename from planning/obstacle_stop_planner/src/planner_utils.cpp rename to planning/autoware_obstacle_stop_planner/src/planner_utils.cpp index fd8922c500318..bff8f9588215e 100644 --- a/planning/obstacle_stop_planner/src/planner_utils.cpp +++ b/planning/autoware_obstacle_stop_planner/src/planner_utils.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "obstacle_stop_planner/planner_utils.hpp" +#include "planner_utils.hpp" #include #include @@ -29,7 +29,10 @@ #include -namespace motion_planning +#include +#include + +namespace autoware::motion_planning { using autoware::motion_utils::calcDecelDistWithJerkAndAccConstraints; @@ -720,4 +723,4 @@ double calcObstacleMaxLength(const autoware_perception_msgs::msg::Shape & shape) throw std::logic_error("The shape type is not supported in obstacle_cruise_planner."); } -} // namespace motion_planning +} // namespace autoware::motion_planning diff --git a/planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_utils.hpp b/planning/autoware_obstacle_stop_planner/src/planner_utils.hpp similarity index 95% rename from planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_utils.hpp rename to planning/autoware_obstacle_stop_planner/src/planner_utils.hpp index c195ff0cc55f3..21943c46f5ca5 100644 --- a/planning/obstacle_stop_planner/include/obstacle_stop_planner/planner_utils.hpp +++ b/planning/autoware_obstacle_stop_planner/src/planner_utils.hpp @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBSTACLE_STOP_PLANNER__PLANNER_UTILS_HPP_ -#define OBSTACLE_STOP_PLANNER__PLANNER_UTILS_HPP_ +#ifndef PLANNER_UTILS_HPP_ +#define PLANNER_UTILS_HPP_ -#include "obstacle_stop_planner/planner_data.hpp" +#include "planner_data.hpp" #include #include @@ -33,7 +33,7 @@ #include #include -namespace motion_planning +namespace autoware::motion_planning { namespace bg = boost::geometry; @@ -149,6 +149,6 @@ double calcObstacleMaxLength(const autoware_perception_msgs::msg::Shape & shape) rclcpp::SubscriptionOptions createSubscriptionOptions(rclcpp::Node * node_ptr); -} // namespace motion_planning +} // namespace autoware::motion_planning -#endif // OBSTACLE_STOP_PLANNER__PLANNER_UTILS_HPP_ +#endif // PLANNER_UTILS_HPP_ diff --git a/planning/obstacle_stop_planner/test/test_obstacle_stop_planner_node_interface.cpp b/planning/autoware_obstacle_stop_planner/test/test_autoware_obstacle_stop_planner_node_interface.cpp similarity index 94% rename from planning/obstacle_stop_planner/test/test_obstacle_stop_planner_node_interface.cpp rename to planning/autoware_obstacle_stop_planner/test/test_autoware_obstacle_stop_planner_node_interface.cpp index 474ed9a338725..99a1ab46d2304 100644 --- a/planning/obstacle_stop_planner/test/test_obstacle_stop_planner_node_interface.cpp +++ b/planning/autoware_obstacle_stop_planner/test/test_autoware_obstacle_stop_planner_node_interface.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "obstacle_stop_planner/node.hpp" +#include "node.hpp" #include #include @@ -22,8 +22,8 @@ #include +using autoware::motion_planning::ObstacleStopPlannerNode; using autoware::planning_test_manager::PlanningInterfaceTestManager; -using motion_planning::ObstacleStopPlannerNode; std::shared_ptr generateTestManager() { @@ -41,7 +41,7 @@ std::shared_ptr generateNode() const auto autoware_test_utils_dir = ament_index_cpp::get_package_share_directory("autoware_test_utils"); const auto obstacle_stop_planner_dir = - ament_index_cpp::get_package_share_directory("obstacle_stop_planner"); + ament_index_cpp::get_package_share_directory("autoware_obstacle_stop_planner"); node_options.append_parameter_override("enable_slow_down", false); @@ -53,7 +53,7 @@ std::shared_ptr generateNode() obstacle_stop_planner_dir + "/config/adaptive_cruise_control.param.yaml", "--params-file", obstacle_stop_planner_dir + "/config/obstacle_stop_planner.param.yaml"}); - return std::make_shared(node_options); + return std::make_shared(node_options); } void publishMandatoryTopics(