Skip to content

Commit b272b87

Browse files
committed
refactor(autoware_behavior_velocity_planner): move code to autoware::behavior_velocity_planner namespace
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent 490eb12 commit b272b87

File tree

8 files changed

+21
-17
lines changed

8 files changed

+21
-17
lines changed

launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<extra_arg name="use_intra_process_comms" value="false"/>
221221
</composable_node>
222222

223-
<composable_node pkg="autoware_behavior_velocity_planner" plugin="behavior_velocity_planner::BehaviorVelocityPlannerNode" name="behavior_velocity_planner" namespace="">
223+
<composable_node pkg="autoware_behavior_velocity_planner" plugin="autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode" name="behavior_velocity_planner" namespace="">
224224
<!-- topic remap -->
225225
<remap from="~/input/path_with_lane_id" to="path_with_lane_id"/>
226226
<remap from="~/input/vector_map" to="$(var input_vector_map_topic_name)"/>

planning/autoware_behavior_velocity_planner/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ament_auto_add_library(${PROJECT_NAME}_lib SHARED
1919
)
2020

2121
rclcpp_components_register_node(${PROJECT_NAME}_lib
22-
PLUGIN "behavior_velocity_planner::BehaviorVelocityPlannerNode"
22+
PLUGIN "autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode"
2323
EXECUTABLE ${PROJECT_NAME}_node
2424
)
2525

planning/autoware_behavior_velocity_planner/launch/behavior_velocity_planner.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<!-- <arg name="behavior_velocity_planner_template_module_param_path"/> -->
3131
<arg name="behavior_velocity_planner_param_file" default="$(find-pkg-share behavior_velocity_planner)/config/behavior_velocity_planner.param.yaml"/>
3232

33-
<node pkg="behavior_velocity_planner" exec="behavior_velocity_planner_node" name="behavior_velocity_planner" output="screen">
33+
<node pkg="autoware_behavior_velocity_planner" exec="behavior_velocity_planner_node" name="behavior_velocity_planner" output="screen">
3434
<!-- topic remap -->
3535
<remap from="~/input/path_with_lane_id" to="path_with_lane_id"/>
3636
<remap from="~/input/vector_map" to="/map/vector_map"/>

planning/autoware_behavior_velocity_planner/src/node.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ rclcpp::SubscriptionOptions createSubscriptionOptions(rclcpp::Node * node_ptr)
5252
}
5353
} // namespace
5454

55-
namespace behavior_velocity_planner
55+
namespace autoware::behavior_velocity_planner
5656
{
5757
namespace
5858
{
@@ -436,14 +436,14 @@ autoware_auto_planning_msgs::msg::Path BehaviorVelocityPlannerNode::generatePath
436436
std::make_shared<const PlannerData>(planner_data), *input_path_msg);
437437

438438
// screening
439-
const auto filtered_path = filterLitterPathPoint(to_path(velocity_planned_path));
439+
const auto filtered_path = ::behavior_velocity_planner::filterLitterPathPoint(to_path(velocity_planned_path));
440440

441441
// interpolation
442442
const auto interpolated_path_msg =
443-
interpolatePath(filtered_path, forward_path_length_, behavior_output_path_interval_);
443+
::behavior_velocity_planner::interpolatePath(filtered_path, forward_path_length_, behavior_output_path_interval_);
444444

445445
// check stop point
446-
output_path_msg = filterStopPathPoint(interpolated_path_msg);
446+
output_path_msg = ::behavior_velocity_planner::filterStopPathPoint(interpolated_path_msg);
447447

448448
output_path_msg.header.frame_id = "map";
449449
output_path_msg.header.stamp = this->now();
@@ -477,7 +477,7 @@ void BehaviorVelocityPlannerNode::publishDebugMarker(
477477
}
478478
debug_viz_pub_->publish(output_msg);
479479
}
480-
} // namespace behavior_velocity_planner
480+
} // namespace autoware::behavior_velocity_planner
481481

482482
#include <rclcpp_components/register_node_macro.hpp>
483-
RCLCPP_COMPONENTS_REGISTER_NODE(behavior_velocity_planner::BehaviorVelocityPlannerNode)
483+
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode)

planning/autoware_behavior_velocity_planner/src/node.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@
4444
#include <string>
4545
#include <vector>
4646

47-
namespace behavior_velocity_planner
47+
namespace autoware::behavior_velocity_planner
4848
{
4949
using autoware_auto_mapping_msgs::msg::HADMapBin;
5050
using autoware_behavior_velocity_planner::srv::LoadPlugin;
5151
using autoware_behavior_velocity_planner::srv::UnloadPlugin;
5252
using tier4_planning_msgs::msg::VelocityLimit;
53+
using ::behavior_velocity_planner::TrafficSignalStamped;
5354

5455
class BehaviorVelocityPlannerNode : public rclcpp::Node
5556
{
@@ -134,6 +135,6 @@ class BehaviorVelocityPlannerNode : public rclcpp::Node
134135

135136
std::unique_ptr<tier4_autoware_utils::PublishedTimePublisher> published_time_publisher_;
136137
};
137-
} // namespace behavior_velocity_planner
138+
} // namespace autoware::behavior_velocity_planner
138139

139140
#endif // NODE_HPP_

planning/autoware_behavior_velocity_planner/src/planner_manager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <memory>
2020
#include <string>
2121

22-
namespace behavior_velocity_planner
22+
namespace autoware::behavior_velocity_planner
2323
{
2424
namespace
2525
{
@@ -128,4 +128,4 @@ diagnostic_msgs::msg::DiagnosticStatus BehaviorVelocityPlannerManager::getStopRe
128128
{
129129
return stop_reason_diag_;
130130
}
131-
} // namespace behavior_velocity_planner
131+
} // namespace autoware::behavior_velocity_planner

planning/autoware_behavior_velocity_planner/src/planner_manager.hpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@
3636
#include <string>
3737
#include <vector>
3838

39-
namespace behavior_velocity_planner
39+
namespace autoware::behavior_velocity_planner
4040
{
41+
using ::behavior_velocity_planner::PlannerData;
42+
using ::behavior_velocity_planner::PluginInterface;
43+
4144
class BehaviorVelocityPlannerManager
4245
{
4346
public:
@@ -56,6 +59,6 @@ class BehaviorVelocityPlannerManager
5659
pluginlib::ClassLoader<PluginInterface> plugin_loader_;
5760
std::vector<std::shared_ptr<PluginInterface>> scene_manager_plugins_;
5861
};
59-
} // namespace behavior_velocity_planner
62+
} // namespace autoware::behavior_velocity_planner
6063

6164
#endif // PLANNER_MANAGER_HPP_

planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <cmath>
2424
#include <vector>
2525

26-
using behavior_velocity_planner::BehaviorVelocityPlannerNode;
26+
using autoware::behavior_velocity_planner::BehaviorVelocityPlannerNode;
2727
using planning_test_utils::PlanningInterfaceTestManager;
2828

2929
std::shared_ptr<PlanningInterfaceTestManager> generateTestManager()
@@ -50,7 +50,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
5050
const auto planning_test_utils_dir =
5151
ament_index_cpp::get_package_share_directory("planning_test_utils");
5252
const auto behavior_velocity_planner_dir =
53-
ament_index_cpp::get_package_share_directory("behavior_velocity_planner");
53+
ament_index_cpp::get_package_share_directory("autoware_behavior_velocity_planner");
5454
const auto motion_velocity_smoother_dir =
5555
ament_index_cpp::get_package_share_directory("motion_velocity_smoother");
5656

0 commit comments

Comments
 (0)