Skip to content

Commit

Permalink
refactor(behavior_velocity_planner)!: prefix package and namespace wi…
Browse files Browse the repository at this point in the history
…th autoware_ (autowarefoundation#6693)

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve authored and karishma1911 committed Jun 3, 2024
1 parent c43cf36 commit 196de8a
Show file tree
Hide file tree
Showing 37 changed files with 52 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ perception/traffic_light_multi_camera_fusion/** [email protected] tao.zhon
perception/traffic_light_occlusion_predictor/** [email protected] [email protected]
perception/traffic_light_visualization/** [email protected] [email protected]
planning/autoware_behavior_path_external_request_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_velocity_planner/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_planning_test_manager/** [email protected] [email protected]
planning/autoware_remaining_distance_time_calculator/** [email protected]
planning/autoware_static_centerline_generator/** [email protected] [email protected]
Expand All @@ -179,7 +180,6 @@ planning/behavior_velocity_no_drivable_lane_module/** [email protected]
planning/behavior_velocity_no_stopping_area_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_occlusion_spot_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_out_of_lane_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_planner/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_planner_common/** [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_run_out_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_speed_bump_module/** [email protected] [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<extra_arg name="use_intra_process_comms" value="false"/>
</composable_node>

<composable_node pkg="behavior_velocity_planner" plugin="behavior_velocity_planner::BehaviorVelocityPlannerNode" name="behavior_velocity_planner" namespace="">
<composable_node pkg="autoware_behavior_velocity_planner" plugin="autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode" name="behavior_velocity_planner" namespace="">
<!-- topic remap -->
<remap from="~/input/path_with_lane_id" to="path_with_lane_id"/>
<remap from="~/input/vector_map" to="$(var input_vector_map_topic_name)"/>
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 @@ -57,9 +57,9 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<exec_depend>autoware_behavior_velocity_planner</exec_depend>
<exec_depend>autoware_remaining_distance_time_calculator</exec_depend>
<exec_depend>behavior_path_planner</exec_depend>
<exec_depend>behavior_velocity_planner</exec_depend>
<exec_depend>costmap_generator</exec_depend>
<exec_depend>external_cmd_selector</exec_depend>
<exec_depend>external_velocity_limit_selector</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nav:
- 'Side Shift': planning/behavior_path_side_shift_module
- 'Start Planner': planning/behavior_path_start_planner_module
- 'Behavior Velocity Planner':
- 'About Behavior Velocity': planning/behavior_velocity_planner
- 'About Behavior Velocity': planning/autoware_behavior_velocity_planner
- 'Template for Custom Module': planning/behavior_velocity_template_module
- 'Available Module':
- 'Blind Spot': planning/behavior_velocity_blind_spot_module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(behavior_velocity_planner)
project(autoware_behavior_velocity_planner)

find_package(autoware_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
Expand All @@ -19,7 +19,7 @@ ament_auto_add_library(${PROJECT_NAME}_lib SHARED
)

rclcpp_components_register_node(${PROJECT_NAME}_lib
PLUGIN "behavior_velocity_planner::BehaviorVelocityPlannerNode"
PLUGIN "autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode"
EXECUTABLE ${PROJECT_NAME}_node
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<!-- <arg name="behavior_velocity_planner_template_module_param_path"/> -->
<arg name="behavior_velocity_planner_param_file" default="$(find-pkg-share behavior_velocity_planner)/config/behavior_velocity_planner.param.yaml"/>

<node pkg="behavior_velocity_planner" exec="behavior_velocity_planner_node" name="behavior_velocity_planner" output="screen">
<node pkg="autoware_behavior_velocity_planner" exec="behavior_velocity_planner_node" name="behavior_velocity_planner" output="screen">
<!-- topic remap -->
<remap from="~/input/path_with_lane_id" to="path_with_lane_id"/>
<remap from="~/input/vector_map" to="/map/vector_map"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -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_planner</name>
<name>autoware_behavior_velocity_planner</name>
<version>0.1.0</version>
<description>The behavior_velocity_planner package</description>
<description>The autoware_behavior_velocity_planner package</description>

<maintainer email="[email protected]">Mamoru Sobue</maintainer>
<maintainer email="[email protected]">Takayuki Murooka</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rclcpp::SubscriptionOptions createSubscriptionOptions(rclcpp::Node * node_ptr)
}
} // namespace

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace
{
Expand Down Expand Up @@ -436,14 +436,15 @@ autoware_auto_planning_msgs::msg::Path BehaviorVelocityPlannerNode::generatePath
std::make_shared<const PlannerData>(planner_data), *input_path_msg);

// screening
const auto filtered_path = filterLitterPathPoint(to_path(velocity_planned_path));
const auto filtered_path =
::behavior_velocity_planner::filterLitterPathPoint(to_path(velocity_planned_path));

// interpolation
const auto interpolated_path_msg =
interpolatePath(filtered_path, forward_path_length_, behavior_output_path_interval_);
const auto interpolated_path_msg = ::behavior_velocity_planner::interpolatePath(
filtered_path, forward_path_length_, behavior_output_path_interval_);

// check stop point
output_path_msg = filterStopPathPoint(interpolated_path_msg);
output_path_msg = ::behavior_velocity_planner::filterStopPathPoint(interpolated_path_msg);

output_path_msg.header.frame_id = "map";
output_path_msg.header.stamp = this->now();
Expand Down Expand Up @@ -477,7 +478,7 @@ void BehaviorVelocityPlannerNode::publishDebugMarker(
}
debug_viz_pub_->publish(output_msg);
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(behavior_velocity_planner::BehaviorVelocityPlannerNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode)
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "planner_manager.hpp"
#include "tier4_autoware_utils/ros/logger_level_configure.hpp"

#include <behavior_velocity_planner/srv/load_plugin.hpp>
#include <behavior_velocity_planner/srv/unload_plugin.hpp>
#include <autoware_behavior_velocity_planner/srv/load_plugin.hpp>
#include <autoware_behavior_velocity_planner/srv/unload_plugin.hpp>
#include <behavior_velocity_planner_common/planner_data.hpp>
#include <rclcpp/rclcpp.hpp>
#include <tier4_autoware_utils/ros/published_time_publisher.hpp>
Expand All @@ -44,11 +44,12 @@
#include <string>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using autoware_auto_mapping_msgs::msg::HADMapBin;
using behavior_velocity_planner::srv::LoadPlugin;
using behavior_velocity_planner::srv::UnloadPlugin;
using autoware_behavior_velocity_planner::srv::LoadPlugin;
using autoware_behavior_velocity_planner::srv::UnloadPlugin;
using ::behavior_velocity_planner::TrafficSignalStamped;
using tier4_planning_msgs::msg::VelocityLimit;

class BehaviorVelocityPlannerNode : public rclcpp::Node
Expand Down Expand Up @@ -134,6 +135,6 @@ class BehaviorVelocityPlannerNode : public rclcpp::Node

std::unique_ptr<tier4_autoware_utils::PublishedTimePublisher> published_time_publisher_;
};
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#endif // NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <memory>
#include <string>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace
{
Expand Down Expand Up @@ -50,7 +50,7 @@ diagnostic_msgs::msg::DiagnosticStatus makeStopReasonDiag(
} // namespace

BehaviorVelocityPlannerManager::BehaviorVelocityPlannerManager()
: plugin_loader_("behavior_velocity_planner", "behavior_velocity_planner::PluginInterface")
: plugin_loader_("autoware_behavior_velocity_planner", "behavior_velocity_planner::PluginInterface")
{
}

Expand Down Expand Up @@ -128,4 +128,4 @@ diagnostic_msgs::msg::DiagnosticStatus BehaviorVelocityPlannerManager::getStopRe
{
return stop_reason_diag_;
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
#include <string>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::PlannerData;
using ::behavior_velocity_planner::PluginInterface;

class BehaviorVelocityPlannerManager
{
public:
Expand All @@ -56,6 +59,6 @@ class BehaviorVelocityPlannerManager
pluginlib::ClassLoader<PluginInterface> plugin_loader_;
std::vector<std::shared_ptr<PluginInterface>> scene_manager_plugins_;
};
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#endif // PLANNER_MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <cmath>
#include <vector>

using behavior_velocity_planner::BehaviorVelocityPlannerNode;
using autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode;
using planning_test_utils::PlanningInterfaceTestManager;

std::shared_ptr<PlanningInterfaceTestManager> generateTestManager()
Expand All @@ -50,7 +50,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
const auto planning_test_utils_dir =
ament_index_cpp::get_package_share_directory("planning_test_utils");
const auto behavior_velocity_planner_dir =
ament_index_cpp::get_package_share_directory("behavior_velocity_planner");
ament_index_cpp::get_package_share_directory("autoware_behavior_velocity_planner");
const auto motion_velocity_smoother_dir =
ament_index_cpp::get_package_share_directory("motion_velocity_smoother");

Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_static_centerline_generator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

<test_depend>ament_cmake_gmock</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_behavior_velocity_planner</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>behavior_path_planner</test_depend>
<test_depend>behavior_velocity_planner</test_depend>
<test_depend>ros_testing</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def generate_test_description():
"config/behavior_path_planner.param.yaml",
),
os.path.join(
get_package_share_directory("behavior_velocity_planner"),
get_package_share_directory("autoware_behavior_velocity_planner"),
"config/behavior_velocity_planner.param.yaml",
),
os.path.join(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_blind_spot_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_velocity_crosswalk_module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_crosswalk_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
DIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_detection_area_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_dynamic_obstacle_stop_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
DIRECTORY src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_intersection_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

find_package(OpenCV REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_no_drivable_lane_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_no_stopping_area_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_occlusion_spot_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_out_of_lane_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
DIRECTORY src
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_velocity_run_out_module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_run_out_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_speed_bump_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_velocity_stop_line_module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_stop_line_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_velocity_template_module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_template_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/manager.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_traffic_light_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_virtual_traffic_light_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_velocity_walkway_module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(behavior_velocity_walkway_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
pluginlib_export_plugin_description_file(behavior_velocity_planner plugins.xml)
pluginlib_export_plugin_description_file(autoware_behavior_velocity_planner plugins.xml)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug.cpp
Expand Down

0 comments on commit 196de8a

Please sign in to comment.