Skip to content

Commit 2022fc9

Browse files
refactor(autoware_velocity_walkway_module): prefix package with autoware_ and move code to the autoware namespace (#7153)
* refactor(autoware_velocity_walkway_module): prefix package with autoware_ and move code to the autoware namespace Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp> * style(pre-commit): autofix Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp> * fix: fix issue loading packages that have been prefixed Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp> --------- Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5d9fa04 commit 2022fc9

File tree

17 files changed

+45
-25
lines changed

17 files changed

+45
-25
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ planning/autoware_behavior_path_external_request_lane_change_module/** fumiya.wa
148148
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
149149
planning/autoware_behavior_velocity_template_module/** daniel.sanchez@tier4.jp
150150
planning/autoware_behavior_velocity_virtual_traffic_light_module/** kosuke.takeuchi@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
151+
planning/autoware_behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@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/autoware_behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp m
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_traffic_light_module/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
178-
planning/behavior_velocity_walkway_module/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
179179
planning/costmap_generator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
180180
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
181181
planning/freespace_planner/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp

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
@@ -106,7 +106,7 @@
106106
/>
107107
<let
108108
name="behavior_velocity_planner_launch_modules"
109-
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'behavior_velocity_planner::WalkwayModulePlugin, '&quot;)"
109+
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'autoware::behavior_velocity_planner::WalkwayModulePlugin, '&quot;)"
110110
if="$(var launch_walkway_module)"
111111
/>
112112
<let

planning/.pages

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ nav:
3535
- 'Stop Line': planning/behavior_velocity_stop_line_module
3636
- 'Traffic Light': planning/behavior_velocity_traffic_light_module
3737
- 'Virtual Traffic Light': planning/autoware_behavior_velocity_virtual_traffic_light_module
38-
- 'Walkway': planning/behavior_velocity_walkway_module
38+
- 'Walkway': planning/autoware_behavior_velocity_walkway_module
3939
- 'Parking':
4040
- 'Freespace Planner':
4141
- 'About Freespace Planner': planning/freespace_planner

planning/autoware_behavior_velocity_planner/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o
99

1010
- [Blind Spot](../behavior_velocity_blind_spot_module/README.md)
1111
- [Crosswalk](../behavior_velocity_crosswalk_module/README.md)
12-
- [Walkway](../behavior_velocity_walkway_module/README.md)
12+
- [Walkway](../autoware_behavior_velocity_walkway_module/README.md)
1313
- [Detection Area](../behavior_velocity_detection_area_module/README.md)
1414
- [Intersection](../behavior_velocity_intersection_module/README.md)
1515
- [MergeFromPrivate](../behavior_velocity_intersection_module/README.md#merge-from-private)

planning/autoware_behavior_velocity_planner/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<test_depend>ament_lint_auto</test_depend>
6868
<test_depend>autoware_behavior_velocity_run_out_module</test_depend>
6969
<test_depend>autoware_behavior_velocity_virtual_traffic_light_module</test_depend>
70+
<test_depend>autoware_behavior_velocity_walkway_module</test_depend>
7071
<test_depend>autoware_lint_common</test_depend>
7172
<test_depend>behavior_velocity_blind_spot_module</test_depend>
7273
<test_depend>behavior_velocity_crosswalk_module</test_depend>
@@ -79,7 +80,6 @@
7980
<test_depend>behavior_velocity_speed_bump_module</test_depend>
8081
<test_depend>behavior_velocity_stop_line_module</test_depend>
8182
<test_depend>behavior_velocity_traffic_light_module</test_depend>
82-
<test_depend>behavior_velocity_walkway_module</test_depend>
8383
<!--<test_depend>autoware_behavior_velocity_template_module</test_depend>-->
8484

8585
<member_of_group>rosidl_interface_packages</member_of_group>

planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
6969

7070
std::vector<std::string> module_names;
7171
module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin");
72-
module_names.emplace_back("behavior_velocity_planner::WalkwayModulePlugin");
72+
module_names.emplace_back("autoware::behavior_velocity_planner::WalkwayModulePlugin");
7373
module_names.emplace_back("behavior_velocity_planner::TrafficLightModulePlugin");
7474
module_names.emplace_back("behavior_velocity_planner::IntersectionModulePlugin");
7575
module_names.emplace_back("behavior_velocity_planner::MergeFromPrivateModulePlugin");
@@ -98,7 +98,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
9898
behavior_velocity_planner_dir + "/config/behavior_velocity_planner.param.yaml",
9999
get_behavior_velocity_module_config_no_prefix("blind_spot"),
100100
get_behavior_velocity_module_config_no_prefix("crosswalk"),
101-
get_behavior_velocity_module_config_no_prefix("walkway"),
101+
get_behavior_velocity_module_config("walkway"),
102102
get_behavior_velocity_module_config_no_prefix("detection_area"),
103103
get_behavior_velocity_module_config_no_prefix("intersection"),
104104
get_behavior_velocity_module_config_no_prefix("no_stopping_area"),

planning/behavior_velocity_walkway_module/CMakeLists.txt planning/autoware_behavior_velocity_walkway_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_walkway_module)
2+
project(autoware_behavior_velocity_walkway_module)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()

planning/behavior_velocity_walkway_module/package.xml planning/autoware_behavior_velocity_walkway_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_walkway_module</name>
4+
<name>autoware_behavior_velocity_walkway_module</name>
55
<version>0.1.0</version>
6-
<description>The behavior_velocity_walkway_module package</description>
6+
<description>The autoware_behavior_velocity_walkway_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_walkway_module">
2+
<class type="autoware::behavior_velocity_planner::WalkwayModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/>
3+
</library>

planning/behavior_velocity_walkway_module/src/debug.cpp planning/autoware_behavior_velocity_walkway_module/src/debug.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include <vector>
2424

25-
namespace behavior_velocity_planner
25+
namespace autoware::behavior_velocity_planner
2626
{
2727

2828
using motion_utils::createSlowDownVirtualWallMarker;
@@ -34,6 +34,7 @@ using tier4_autoware_utils::createMarkerColor;
3434
using tier4_autoware_utils::createMarkerScale;
3535
using tier4_autoware_utils::createPoint;
3636
using visualization_msgs::msg::Marker;
37+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
3738

3839
namespace
3940
{
@@ -98,4 +99,4 @@ visualization_msgs::msg::MarkerArray WalkwayModule::createDebugMarkerArray()
9899

99100
return debug_marker_array;
100101
}
101-
} // namespace behavior_velocity_planner
102+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_walkway_module/src/manager.cpp planning/autoware_behavior_velocity_walkway_module/src/manager.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@
2323
#include <string>
2424
#include <vector>
2525

26-
namespace behavior_velocity_planner
26+
namespace autoware::behavior_velocity_planner
2727
{
2828

29+
using ::behavior_velocity_planner::SceneModuleManagerInterface;
2930
using lanelet::autoware::Crosswalk;
3031
using tier4_autoware_utils::getOrDeclareParameter;
32+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
33+
using ::behavior_velocity_planner::getCrosswalkIdSetOnPath;
34+
using ::behavior_velocity_planner::getCrosswalksOnPath;
3135

3236
WalkwayModuleManager::WalkwayModuleManager(rclcpp::Node & node)
3337
: SceneModuleManagerInterface(node, getModuleName())
@@ -100,8 +104,9 @@ WalkwayModuleManager::getModuleExpiredFunction(const PathWithLaneId & path)
100104
return walkway_id_set.count(scene_module->getModuleId()) == 0;
101105
};
102106
}
103-
} // namespace behavior_velocity_planner
107+
} // namespace autoware::behavior_velocity_planner
104108

105109
#include <pluginlib/class_list_macros.hpp>
106110
PLUGINLIB_EXPORT_CLASS(
107-
behavior_velocity_planner::WalkwayModulePlugin, behavior_velocity_planner::PluginInterface)
111+
autoware::behavior_velocity_planner::WalkwayModulePlugin,
112+
::behavior_velocity_planner::PluginInterface)

planning/behavior_velocity_walkway_module/src/manager.hpp planning/autoware_behavior_velocity_walkway_module/src/manager.hpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
#include <set>
3232
#include <vector>
3333

34-
namespace behavior_velocity_planner
34+
namespace autoware::behavior_velocity_planner
3535
{
36-
36+
using ::behavior_velocity_planner::PluginWrapper;
37+
using ::behavior_velocity_planner::SceneModuleInterface;
38+
using ::behavior_velocity_planner::SceneModuleManagerInterface;
3739
using tier4_planning_msgs::msg::PathWithLaneId;
3840

3941
class WalkwayModuleManager : public SceneModuleManagerInterface
@@ -56,6 +58,6 @@ class WalkwayModulePlugin : public PluginWrapper<WalkwayModuleManager>
5658
{
5759
};
5860

59-
} // namespace behavior_velocity_planner
61+
} // namespace autoware::behavior_velocity_planner
6062

6163
#endif // MANAGER_HPP_

planning/behavior_velocity_walkway_module/src/scene_walkway.cpp planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,22 @@
1919

2020
#include <cmath>
2121

22-
namespace behavior_velocity_planner
22+
namespace autoware::behavior_velocity_planner
2323
{
2424
namespace bg = boost::geometry;
25+
using ::behavior_velocity_planner::getLinestringIntersects;
26+
using ::behavior_velocity_planner::getPolygonIntersects;
27+
using ::behavior_velocity_planner::getStopLineFromMap;
28+
using ::behavior_velocity_planner::PlanningBehavior;
29+
using ::behavior_velocity_planner::SceneModuleInterface;
30+
using ::behavior_velocity_planner::StopFactor;
31+
using ::behavior_velocity_planner::VelocityFactor;
2532
using motion_utils::calcLongitudinalOffsetPose;
2633
using motion_utils::calcSignedArcLength;
2734
using motion_utils::findNearestSegmentIndex;
2835
using tier4_autoware_utils::createPoint;
2936
using tier4_autoware_utils::getPose;
37+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
3038

3139
WalkwayModule::WalkwayModule(
3240
const int64_t module_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,
@@ -165,4 +173,4 @@ bool WalkwayModule::modifyPathVelocity(PathWithLaneId * path, StopReason * stop_
165173

166174
return true;
167175
}
168-
} // namespace behavior_velocity_planner
176+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_walkway_module/src/scene_walkway.hpp planning/autoware_behavior_velocity_walkway_module/src/scene_walkway.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@
3131
#include <utility>
3232
#include <vector>
3333

34-
namespace behavior_velocity_planner
34+
namespace autoware::behavior_velocity_planner
3535
{
36+
using ::behavior_velocity_planner::DebugData;
37+
using ::behavior_velocity_planner::PathWithLaneId;
38+
using ::behavior_velocity_planner::SceneModuleInterface;
39+
using ::behavior_velocity_planner::StopReason;
3640

3741
class WalkwayModule : public SceneModuleInterface
3842
{
@@ -77,6 +81,6 @@ class WalkwayModule : public SceneModuleInterface
7781
// flag to use regulatory element
7882
const bool use_regulatory_element_;
7983
};
80-
} // namespace behavior_velocity_planner
84+
} // namespace autoware::behavior_velocity_planner
8185

8286
#endif // SCENE_WALKWAY_HPP_

planning/behavior_velocity_walkway_module/plugins.xml

-3
This file was deleted.

0 commit comments

Comments
 (0)