Skip to content

Commit 98f9b47

Browse files
committed
refactor(behavior_velocity_traffic_light_module): prefix package and namespace with autoware_
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent b7fb01c commit 98f9b47

File tree

19 files changed

+60
-35
lines changed

19 files changed

+60
-35
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ perception/traffic_light_occlusion_predictor/** shunsuke.miura@tier4.jp tao.zhon
148148
perception/traffic_light_visualization/** tao.zhong@tier4.jp yukihiro.saito@tier4.jp
149149
planning/autoware_behavior_path_external_request_lane_change_module/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp zulfaqar.azmi@tier4.jp
150150
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
151+
planning/autoware_behavior_velocity_traffic_light_module/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
151152
planning/autoware_planning_test_manager/** kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp
152153
planning/autoware_remaining_distance_time_calculator/** ahmed.ebrahim@leodrive.ai
153154
planning/autoware_static_centerline_generator/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp
@@ -175,7 +176,6 @@ planning/behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp makoto.kur
175176
planning/behavior_velocity_speed_bump_module/** mdogru@leodrive.ai shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
176177
planning/behavior_velocity_stop_line_module/** fumiya.watanabe@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp zhe.shen@tier4.jp
177178
planning/behavior_velocity_template_module/** daniel.sanchez@tier4.jp
178-
planning/behavior_velocity_traffic_light_module/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
179179
planning/behavior_velocity_virtual_traffic_light_module/** kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
180180
planning/behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
181181
planning/costmap_generator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp

planning/.pages

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ nav:
3333
- 'Run Out': planning/behavior_velocity_run_out_module
3434
- 'Speed Bump': planning/behavior_velocity_speed_bump_module
3535
- 'Stop Line': planning/behavior_velocity_stop_line_module
36-
- 'Traffic Light': planning/behavior_velocity_traffic_light_module
36+
- 'Traffic Light': planning/autoware_behavior_velocity_traffic_light_module
3737
- 'Virtual Traffic Light': planning/behavior_velocity_virtual_traffic_light_module
3838
- 'Walkway': planning/behavior_velocity_walkway_module
3939
- 'Parking':

planning/autoware_behavior_velocity_planner/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o
1515
- [MergeFromPrivate](../behavior_velocity_intersection_module/README.md#merge-from-private)
1616
- [Stop Line](../behavior_velocity_stop_line_module/README.md)
1717
- [Virtual Traffic Light](../behavior_velocity_virtual_traffic_light_module/README.md)
18-
- [Traffic Light](../behavior_velocity_traffic_light_module/README.md)
18+
- [Traffic Light](../autoware_behavior_velocity_traffic_light_module/README.md)
1919
- [Occlusion Spot](../behavior_velocity_occlusion_spot_module/README.md)
2020
- [No Stopping Area](../behavior_velocity_no_stopping_area_module/README.md)
2121
- [Run Out](../behavior_velocity_run_out_module/README.md)

planning/autoware_behavior_velocity_planner/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565

6666
<test_depend>ament_cmake_ros</test_depend>
6767
<test_depend>ament_lint_auto</test_depend>
68+
<test_depend>autoware_behavior_velocity_traffic_light_module</test_depend>
6869
<test_depend>autoware_lint_common</test_depend>
6970
<test_depend>behavior_velocity_blind_spot_module</test_depend>
7071
<test_depend>behavior_velocity_crosswalk_module</test_depend>
@@ -77,7 +78,6 @@
7778
<test_depend>behavior_velocity_run_out_module</test_depend>
7879
<test_depend>behavior_velocity_speed_bump_module</test_depend>
7980
<test_depend>behavior_velocity_stop_line_module</test_depend>
80-
<test_depend>behavior_velocity_traffic_light_module</test_depend>
8181
<test_depend>behavior_velocity_virtual_traffic_light_module</test_depend>
8282
<test_depend>behavior_velocity_walkway_module</test_depend>
8383
<!--<test_depend>behavior_velocity_template_module</test_depend>-->

planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp

+21-14
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,19 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
5454
const auto motion_velocity_smoother_dir =
5555
ament_index_cpp::get_package_share_directory("motion_velocity_smoother");
5656

57-
const auto get_behavior_velocity_module_config = [](const std::string & module) {
57+
// TODO(esteve): delete when all the modules are migrated to autoware_behavior_velocity_*
58+
const auto get_behavior_velocity_module_config_no_prefix = [](const std::string & module) {
5859
const auto package_name = "behavior_velocity_" + module + "_module";
5960
const auto package_path = ament_index_cpp::get_package_share_directory(package_name);
6061
return package_path + "/config/" + module + ".param.yaml";
6162
};
6263

64+
const auto get_behavior_velocity_module_config = [](const std::string & module) {
65+
const auto package_name = "autoware_behavior_velocity_" + module + "_module";
66+
const auto package_path = ament_index_cpp::get_package_share_directory(package_name);
67+
return package_path + "/config/" + module + ".param.yaml";
68+
};
69+
6370
std::vector<std::string> module_names;
6471
module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin");
6572
module_names.emplace_back("behavior_velocity_planner::WalkwayModulePlugin");
@@ -90,20 +97,20 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
9097
motion_velocity_smoother_dir + "/config/default_motion_velocity_smoother.param.yaml",
9198
motion_velocity_smoother_dir + "/config/Analytical.param.yaml",
9299
behavior_velocity_planner_dir + "/config/behavior_velocity_planner.param.yaml",
93-
get_behavior_velocity_module_config("blind_spot"),
94-
get_behavior_velocity_module_config("crosswalk"),
95-
get_behavior_velocity_module_config("walkway"),
96-
get_behavior_velocity_module_config("detection_area"),
97-
get_behavior_velocity_module_config("intersection"),
98-
get_behavior_velocity_module_config("no_stopping_area"),
99-
get_behavior_velocity_module_config("occlusion_spot"),
100-
get_behavior_velocity_module_config("run_out"),
101-
get_behavior_velocity_module_config("speed_bump"),
102-
get_behavior_velocity_module_config("stop_line"),
100+
get_behavior_velocity_module_config_no_prefix("blind_spot"),
101+
get_behavior_velocity_module_config_no_prefix("crosswalk"),
102+
get_behavior_velocity_module_config_no_prefix("walkway"),
103+
get_behavior_velocity_module_config_no_prefix("detection_area"),
104+
get_behavior_velocity_module_config_no_prefix("intersection"),
105+
get_behavior_velocity_module_config_no_prefix("no_stopping_area"),
106+
get_behavior_velocity_module_config_no_prefix("occlusion_spot"),
107+
get_behavior_velocity_module_config_no_prefix("run_out"),
108+
get_behavior_velocity_module_config_no_prefix("speed_bump"),
109+
get_behavior_velocity_module_config_no_prefix("stop_line"),
103110
get_behavior_velocity_module_config("traffic_light"),
104-
get_behavior_velocity_module_config("virtual_traffic_light"),
105-
get_behavior_velocity_module_config("out_of_lane"),
106-
get_behavior_velocity_module_config("no_drivable_lane")});
111+
get_behavior_velocity_module_config_no_prefix("virtual_traffic_light"),
112+
get_behavior_velocity_module_config_no_prefix("out_of_lane"),
113+
get_behavior_velocity_module_config_no_prefix("no_drivable_lane")});
107114

108115
// TODO(Takagi, Isamu): set launch_modules
109116
// TODO(Kyoichi Sugahara) set to true launch_virtual_traffic_light

planning/behavior_velocity_traffic_light_module/CMakeLists.txt planning/autoware_behavior_velocity_traffic_light_module/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.14)
2-
project(behavior_velocity_traffic_light_module)
2+
project(autoware_behavior_velocity_traffic_light_module)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()

planning/behavior_velocity_traffic_light_module/package.xml planning/autoware_behavior_velocity_traffic_light_module/package.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>behavior_velocity_traffic_light_module</name>
4+
<name>autoware_behavior_velocity_traffic_light_module</name>
55
<version>0.1.0</version>
6-
<description>The behavior_velocity_traffic_light_module package</description>
6+
<description>The autoware_behavior_velocity_traffic_light_module package</description>
77

88
<maintainer email="satoshi.ota@tier4.jp">Satoshi Ota</maintainer>
99
<maintainer email="tomoya.kimura@tier4.jp">Tomoya Kimura</maintainer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<library path="autoware_behavior_velocity_traffic_light_module">
2+
<class type="autoware::behavior_velocity_planner::TrafficLightModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/>
3+
</library>

planning/behavior_velocity_traffic_light_module/src/debug.cpp planning/autoware_behavior_velocity_traffic_light_module/src/debug.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
2525
#endif
2626

27-
namespace behavior_velocity_planner
27+
namespace autoware::behavior_velocity_planner
2828
{
2929
visualization_msgs::msg::MarkerArray TrafficLightModule::createDebugMarkerArray()
3030
{
@@ -54,4 +54,4 @@ motion_utils::VirtualWalls TrafficLightModule::createVirtualWalls()
5454
return virtual_walls;
5555
}
5656

57-
} // namespace behavior_velocity_planner
57+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_traffic_light_module/src/manager.cpp planning/autoware_behavior_velocity_traffic_light_module/src/manager.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@
2424
#include <set>
2525
#include <string>
2626
#include <utility>
27-
namespace behavior_velocity_planner
27+
namespace autoware::behavior_velocity_planner
2828
{
29+
using ::behavior_velocity_planner::PlanningBehavior;
30+
using ::behavior_velocity_planner::SceneModuleInterface;
31+
using ::behavior_velocity_planner::SceneModuleManagerInterfaceWithRTC;
32+
using ::behavior_velocity_planner::State;
2933
using lanelet::TrafficLight;
3034
using tier4_autoware_utils::getOrDeclareParameter;
35+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
3136

3237
TrafficLightModuleManager::TrafficLightModuleManager(rclcpp::Node & node)
3338
: SceneModuleManagerInterfaceWithRTC(
@@ -189,8 +194,9 @@ bool TrafficLightModuleManager::hasSameTrafficLight(
189194
return false;
190195
}
191196

192-
} // namespace behavior_velocity_planner
197+
} // namespace autoware::behavior_velocity_planner
193198

194199
#include <pluginlib/class_list_macros.hpp>
195200
PLUGINLIB_EXPORT_CLASS(
196-
behavior_velocity_planner::TrafficLightModulePlugin, behavior_velocity_planner::PluginInterface)
201+
autoware::behavior_velocity_planner::TrafficLightModulePlugin,
202+
behavior_velocity_planner::PluginInterface)

planning/behavior_velocity_traffic_light_module/src/manager.hpp planning/autoware_behavior_velocity_traffic_light_module/src/manager.hpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
#include <memory>
2929
#include <optional>
3030

31-
namespace behavior_velocity_planner
31+
namespace autoware::behavior_velocity_planner
3232
{
33+
using ::behavior_velocity_planner::PluginWrapper;
34+
using ::behavior_velocity_planner::SceneModuleInterface;
35+
using ::behavior_velocity_planner::SceneModuleManagerInterfaceWithRTC;
3336
class TrafficLightModuleManager : public SceneModuleManagerInterfaceWithRTC
3437
{
3538
public:
@@ -65,6 +68,6 @@ class TrafficLightModulePlugin : public PluginWrapper<TrafficLightModuleManager>
6568
{
6669
};
6770

68-
} // namespace behavior_velocity_planner
71+
} // namespace autoware::behavior_velocity_planner
6972

7073
#endif // MANAGER_HPP_

planning/behavior_velocity_traffic_light_module/src/scene.cpp planning/autoware_behavior_velocity_traffic_light_module/src/scene.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@
3434
#include <string>
3535
#include <vector>
3636

37-
namespace behavior_velocity_planner
37+
namespace autoware::behavior_velocity_planner
3838
{
3939
namespace bg = boost::geometry;
40+
using ::behavior_velocity_planner::LineString2d;
41+
using ::behavior_velocity_planner::PlanningBehavior;
42+
using ::behavior_velocity_planner::Point2d;
43+
using ::behavior_velocity_planner::VelocityFactor;
44+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
4045

4146
namespace
4247
{
@@ -433,4 +438,4 @@ autoware_auto_planning_msgs::msg::PathWithLaneId TrafficLightModule::insertStopP
433438
return modified_path;
434439
}
435440

436-
} // namespace behavior_velocity_planner
441+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_traffic_light_module/src/scene.hpp planning/autoware_behavior_velocity_traffic_light_module/src/scene.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@
3131
#include <lanelet2_core/LaneletMap.h>
3232
#include <lanelet2_routing/RoutingGraph.h>
3333

34-
namespace behavior_velocity_planner
34+
namespace autoware::behavior_velocity_planner
3535
{
36+
using ::behavior_velocity_planner::PathWithLaneId;
37+
using ::behavior_velocity_planner::SceneModuleInterface;
38+
using ::behavior_velocity_planner::StopReason;
39+
using ::behavior_velocity_planner::TrafficSignalStamped;
3640
class TrafficLightModule : public SceneModuleInterface
3741
{
3842
public:
@@ -129,6 +133,6 @@ class TrafficLightModule : public SceneModuleInterface
129133
// Traffic Light State
130134
TrafficSignal looking_tl_state_;
131135
};
132-
} // namespace behavior_velocity_planner
136+
} // namespace autoware::behavior_velocity_planner
133137

134138
#endif // SCENE_HPP_

planning/behavior_velocity_traffic_light_module/plugins.xml

-3
This file was deleted.

0 commit comments

Comments
 (0)