Skip to content

Commit 9c97653

Browse files
committed
refactor(autoware_velocity_run_out_module): prefix package with autoware_ and move code to the autoware namespace
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent 4a9bb74 commit 9c97653

36 files changed

+64
-42
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ planning/behavior_velocity_no_stopping_area_module/** kosuke.takeuchi@tier4.jp s
171171
planning/behavior_velocity_occlusion_spot_module/** shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp
172172
planning/behavior_velocity_out_of_lane_module/** maxime.clement@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
173173
planning/behavior_velocity_planner_common/** fumiya.watanabe@tier4.jp isamu.takagi@tier4.jp mamoru.sobue@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
174-
planning/behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp makoto.kurihara@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp
174+
planning/autoware_behavior_velocity_run_out_module/** kosuke.takeuchi@tier4.jp makoto.kurihara@tier4.jp shumpei.wakabayashi@tier4.jp takayuki.murooka@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp
175175
planning/behavior_velocity_speed_bump_module/** mdogru@leodrive.ai shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
176176
planning/behavior_velocity_stop_line_module/** fumiya.watanabe@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp zhe.shen@tier4.jp
177177
planning/behavior_velocity_template_module/** daniel.sanchez@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
@@ -30,7 +30,7 @@ nav:
3030
- 'No Stopping Area': planning/behavior_velocity_no_stopping_area_module
3131
- 'Occlusion Spot': planning/behavior_velocity_occlusion_spot_module
3232
- 'Out of Lane': planning/behavior_velocity_out_of_lane_module
33-
- 'Run Out': planning/behavior_velocity_run_out_module
33+
- 'Run Out': planning/autoware_behavior_velocity_run_out_module
3434
- 'Speed Bump': planning/behavior_velocity_speed_bump_module
3535
- 'Stop Line': planning/behavior_velocity_stop_line_module
3636
- 'Traffic Light': planning/behavior_velocity_traffic_light_module

planning/autoware_behavior_velocity_planner/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o
1818
- [Traffic Light](../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)
21-
- [Run Out](../behavior_velocity_run_out_module/README.md)
21+
- [Run Out](../autoware_behavior_velocity_run_out_module/README.md)
2222
- [Speed Bump](../behavior_velocity_speed_bump_module/README.md)
2323
- [Out of Lane](../behavior_velocity_out_of_lane_module/README.md)
2424

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_run_out_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>
@@ -74,7 +75,6 @@
7475
<test_depend>behavior_velocity_no_stopping_area_module</test_depend>
7576
<test_depend>behavior_velocity_occlusion_spot_module</test_depend>
7677
<test_depend>behavior_velocity_out_of_lane_module</test_depend>
77-
<test_depend>behavior_velocity_run_out_module</test_depend>
7878
<test_depend>behavior_velocity_speed_bump_module</test_depend>
7979
<test_depend>behavior_velocity_stop_line_module</test_depend>
8080
<test_depend>behavior_velocity_traffic_light_module</test_depend>

planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
6262

6363
std::vector<std::string> module_names;
6464
module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin");
65-
module_names.emplace_back("behavior_velocity_planner::WalkwayModulePlugin");
65+
module_names.emplace_back("autoware::behavior_velocity_planner::WalkwayModulePlugin");
6666
module_names.emplace_back("behavior_velocity_planner::TrafficLightModulePlugin");
6767
module_names.emplace_back("behavior_velocity_planner::IntersectionModulePlugin");
6868
module_names.emplace_back("behavior_velocity_planner::MergeFromPrivateModulePlugin");

planning/behavior_velocity_run_out_module/CMakeLists.txt planning/autoware_behavior_velocity_run_out_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_run_out_module)
2+
project(autoware_behavior_velocity_run_out_module)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()

planning/behavior_velocity_run_out_module/package.xml planning/autoware_behavior_velocity_run_out_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_run_out_module</name>
4+
<name>autoware_behavior_velocity_run_out_module</name>
55
<version>0.1.0</version>
6-
<description>The behavior_velocity_run_out_module package</description>
6+
<description>The autoware_behavior_velocity_run_out_module package</description>
77

88
<maintainer email="tomohito.ando@tier4.jp">Tomohito Ando</maintainer>
99
<maintainer email="makoto.kurihara@tier4.jp">Makoto Kurihara</maintainer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<library path="autoware_behavior_velocity_run_out_module">
2+
<class type="autoware::behavior_velocity_planner::RunOutModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/>
3+
</library>

planning/behavior_velocity_run_out_module/src/debug.cpp planning/autoware_behavior_velocity_run_out_module/src/debug.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using tier4_autoware_utils::createMarkerOrientation;
2828
using tier4_autoware_utils::createMarkerScale;
2929
using tier4_autoware_utils::createPoint;
3030

31-
namespace behavior_velocity_planner
31+
namespace autoware::behavior_velocity_planner
3232
{
3333
namespace
3434
{
@@ -368,4 +368,4 @@ motion_utils::VirtualWalls RunOutModule::createVirtualWalls()
368368
return debug_ptr_->createVirtualWalls();
369369
}
370370

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

planning/behavior_velocity_run_out_module/src/debug.hpp planning/autoware_behavior_velocity_run_out_module/src/debug.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
#include <memory>
2525
#include <string>
2626
#include <vector>
27-
namespace behavior_velocity_planner
27+
namespace autoware::behavior_velocity_planner
2828
{
2929
using sensor_msgs::msg::PointCloud2;
3030
using tier4_debug_msgs::msg::Float32MultiArrayStamped;
3131
using tier4_debug_msgs::msg::Int32Stamped;
32+
using ::behavior_velocity_planner::Polygon2d;
3233

3334
class DebugValues
3435
{
@@ -149,6 +150,6 @@ class RunOutDebug
149150
double height_{0};
150151
};
151152

152-
} // namespace behavior_velocity_planner
153+
} // namespace autoware::behavior_velocity_planner
153154

154155
#endif // DEBUG_HPP_

planning/behavior_velocity_run_out_module/src/dynamic_obstacle.cpp planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
#include <limits>
3131
#include <string>
3232

33-
namespace behavior_velocity_planner
33+
namespace autoware::behavior_velocity_planner
3434
{
35+
using ::behavior_velocity_planner::splineInterpolate;
36+
using ::behavior_velocity_planner::Point2d;
3537
namespace
3638
{
3739
// create quaternion facing to the nearest trajectory point
@@ -600,4 +602,4 @@ void DynamicObstacleCreatorForPoints::onSynchronizedPointCloud(
600602
std::lock_guard<std::mutex> lock(mutex_);
601603
obstacle_points_map_filtered_ = lateral_nearest_points;
602604
}
603-
} // namespace behavior_velocity_planner
605+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_run_out_module/src/dynamic_obstacle.hpp planning/autoware_behavior_velocity_run_out_module/src/dynamic_obstacle.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include <memory>
4343
#include <vector>
4444

45-
namespace behavior_velocity_planner
45+
namespace autoware::behavior_velocity_planner
4646
{
4747
using autoware_auto_perception_msgs::msg::ObjectClassification;
4848
using autoware_auto_perception_msgs::msg::PredictedObjects;
@@ -54,7 +54,9 @@ using run_out_utils::DynamicObstacleData;
5454
using run_out_utils::DynamicObstacleParam;
5555
using run_out_utils::PlannerParam;
5656
using run_out_utils::PredictedPath;
57+
using ::behavior_velocity_planner::PlannerData;
5758
using PathPointsWithLaneId = std::vector<autoware_auto_planning_msgs::msg::PathPointWithLaneId>;
59+
using ::behavior_velocity_planner::Polygons2d;
5860

5961
/**
6062
* @brief base class for creating dynamic obstacles from multiple types of input
@@ -171,6 +173,6 @@ class DynamicObstacleCreatorForPoints : public DynamicObstacleCreator
171173
pcl::PointCloud<pcl::PointXYZ> obstacle_points_map_filtered_;
172174
};
173175

174-
} // namespace behavior_velocity_planner
176+
} // namespace autoware::behavior_velocity_planner
175177

176178
#endif // DYNAMIC_OBSTACLE_HPP_

planning/behavior_velocity_run_out_module/src/manager.cpp planning/autoware_behavior_velocity_run_out_module/src/manager.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#include <utility>
2121
#include <vector>
2222

23-
namespace behavior_velocity_planner
23+
namespace autoware::behavior_velocity_planner
2424
{
2525
using tier4_autoware_utils::getOrDeclareParameter;
26-
26+
using ::behavior_velocity_planner::SceneModuleManagerInterface;
2727
RunOutModuleManager::RunOutModuleManager(rclcpp::Node & node)
2828
: SceneModuleManagerInterface(node, getModuleName())
2929
{
@@ -200,8 +200,8 @@ void RunOutModuleManager::setDynamicObstacleCreator(
200200
break;
201201
}
202202
}
203-
} // namespace behavior_velocity_planner
203+
} // namespace autoware::behavior_velocity_planner
204204

205205
#include <pluginlib/class_list_macros.hpp>
206206
PLUGINLIB_EXPORT_CLASS(
207-
behavior_velocity_planner::RunOutModulePlugin, behavior_velocity_planner::PluginInterface)
207+
::autoware::behavior_velocity_planner::RunOutModulePlugin, ::behavior_velocity_planner::PluginInterface)

planning/behavior_velocity_run_out_module/src/manager.hpp planning/autoware_behavior_velocity_run_out_module/src/manager.hpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323

2424
#include <memory>
2525

26-
namespace behavior_velocity_planner
26+
namespace autoware::behavior_velocity_planner
2727
{
28+
using ::behavior_velocity_planner::SceneModuleInterface;
29+
using ::behavior_velocity_planner::SceneModuleManagerInterface;
30+
using ::behavior_velocity_planner::PluginWrapper;
2831
class RunOutModuleManager : public SceneModuleManagerInterface
2932
{
3033
public:
@@ -49,6 +52,6 @@ class RunOutModulePlugin : public PluginWrapper<RunOutModuleManager>
4952
{
5053
};
5154

52-
} // namespace behavior_velocity_planner
55+
} // namespace autoware::behavior_velocity_planner
5356

5457
#endif // MANAGER_HPP_

planning/behavior_velocity_run_out_module/src/path_utils.cpp planning/autoware_behavior_velocity_run_out_module/src/path_utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "path_utils.hpp"
1616

1717
#include <motion_utils/trajectory/trajectory.hpp>
18-
namespace behavior_velocity_planner::run_out_utils
18+
namespace autoware::behavior_velocity_planner::run_out_utils
1919
{
2020
geometry_msgs::msg::Point findLongitudinalNearestPoint(
2121
const std::vector<autoware_auto_planning_msgs::msg::PathPointWithLaneId> & points,
@@ -36,4 +36,4 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint(
3636
return min_dist_point;
3737
}
3838

39-
} // namespace behavior_velocity_planner::run_out_utils
39+
} // namespace autoware::behavior_velocity_planner::run_out_utils

planning/behavior_velocity_run_out_module/src/path_utils.hpp planning/autoware_behavior_velocity_run_out_module/src/path_utils.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <utility>
2626
#include <vector>
2727

28-
namespace behavior_velocity_planner
28+
namespace autoware::behavior_velocity_planner
2929
{
3030
namespace run_out_utils
3131
{
@@ -36,5 +36,5 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint(
3636
const std::vector<geometry_msgs::msg::Point> & target_points);
3737

3838
} // namespace run_out_utils
39-
} // namespace behavior_velocity_planner
39+
} // namespace autoware::behavior_velocity_planner
4040
#endif // PATH_UTILS_HPP_

planning/behavior_velocity_run_out_module/src/scene.cpp planning/autoware_behavior_velocity_run_out_module/src/scene.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@
3434
#include <limits>
3535
#include <utility>
3636

37-
namespace behavior_velocity_planner
37+
namespace autoware::behavior_velocity_planner
3838
{
3939
namespace bg = boost::geometry;
4040
using object_recognition_utils::convertLabelToString;
41+
using ::behavior_velocity_planner::PlanningBehavior;
42+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
43+
using ::behavior_velocity_planner::getCrosswalksOnPath;
44+
using ::behavior_velocity_planner::Polygon2d;
4145

4246
RunOutModule::RunOutModule(
4347
const int64_t module_id, const std::shared_ptr<const PlannerData> & planner_data,
@@ -1031,4 +1035,4 @@ bool RunOutModule::isMomentaryDetection()
10311035

10321036
return elapsed_time_since_detection < planner_param_.ignore_momentary_detection.time_threshold;
10331037
}
1034-
} // namespace behavior_velocity_planner
1038+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_run_out_module/src/scene.hpp planning/autoware_behavior_velocity_run_out_module/src/scene.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <utility>
3131
#include <vector>
3232

33-
namespace behavior_velocity_planner
33+
namespace autoware::behavior_velocity_planner
3434
{
3535
using autoware_auto_perception_msgs::msg::PredictedObjects;
3636
using autoware_auto_planning_msgs::msg::PathPointWithLaneId;
@@ -39,6 +39,11 @@ using run_out_utils::PlannerParam;
3939
using run_out_utils::PoseWithRange;
4040
using tier4_debug_msgs::msg::Float32Stamped;
4141
using BasicPolygons2d = std::vector<lanelet::BasicPolygon2d>;
42+
using ::behavior_velocity_planner::SceneModuleInterface;
43+
using ::behavior_velocity_planner::PlannerData;
44+
using ::behavior_velocity_planner::StopReason;
45+
using ::behavior_velocity_planner::PathWithLaneId;
46+
using ::behavior_velocity_planner::Polygon2d;
4247

4348
class RunOutModule : public SceneModuleInterface
4449
{
@@ -177,6 +182,6 @@ class RunOutModule : public SceneModuleInterface
177182

178183
bool isMomentaryDetection();
179184
};
180-
} // namespace behavior_velocity_planner
185+
} // namespace autoware::behavior_velocity_planner
181186

182187
#endif // SCENE_HPP_

planning/behavior_velocity_run_out_module/src/state_machine.cpp planning/autoware_behavior_velocity_run_out_module/src/state_machine.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "state_machine.hpp"
1616

17-
namespace behavior_velocity_planner
17+
namespace autoware::behavior_velocity_planner
1818
{
1919
namespace run_out_utils
2020
{
@@ -107,4 +107,4 @@ void StateMachine::updateState(const StateInput & state_input, rclcpp::Clock & c
107107
}
108108

109109
} // namespace run_out_utils
110-
} // namespace behavior_velocity_planner
110+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_run_out_module/src/state_machine.hpp planning/autoware_behavior_velocity_run_out_module/src/state_machine.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include <string>
2121

22-
namespace behavior_velocity_planner::run_out_utils
22+
namespace autoware::behavior_velocity_planner::run_out_utils
2323
{
2424

2525
class StateMachine
@@ -53,6 +53,6 @@ class StateMachine
5353
std::optional<DynamicObstacle> prev_obstacle_{};
5454
std::optional<DynamicObstacle> target_obstacle_{};
5555
};
56-
} // namespace behavior_velocity_planner::run_out_utils
56+
} // namespace autoware::behavior_velocity_planner::run_out_utils
5757

5858
#endif // STATE_MACHINE_HPP_

planning/behavior_velocity_run_out_module/src/utils.cpp planning/autoware_behavior_velocity_run_out_module/src/utils.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
#endif
3434
#include <motion_utils/trajectory/trajectory.hpp>
3535
#include <tier4_autoware_utils/geometry/geometry.hpp>
36-
namespace behavior_velocity_planner
36+
namespace autoware::behavior_velocity_planner
3737
{
38+
using ::behavior_velocity_planner::PathPointWithLaneId;
39+
using ::behavior_velocity_planner::DetectionRange;
40+
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
3841
namespace run_out_utils
3942
{
4043
Polygon2d createBoostPolyFromMsg(const std::vector<geometry_msgs::msg::Point> & input_poly)
@@ -450,4 +453,4 @@ Polygons2d createMandatoryDetectionAreaPolygon(
450453
}
451454

452455
} // namespace run_out_utils
453-
} // namespace behavior_velocity_planner
456+
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_run_out_module/src/utils.hpp planning/autoware_behavior_velocity_run_out_module/src/utils.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include <string>
3131
#include <vector>
32-
namespace behavior_velocity_planner
32+
namespace autoware::behavior_velocity_planner
3333
{
3434
namespace run_out_utils
3535
{
@@ -45,6 +45,8 @@ using tier4_autoware_utils::Point2d;
4545
using tier4_autoware_utils::Polygon2d;
4646
using tier4_debug_msgs::msg::Float32Stamped;
4747
using vehicle_info_util::VehicleInfo;
48+
using ::behavior_velocity_planner::Polygons2d;
49+
using ::behavior_velocity_planner::PlannerData;
4850
using PathPointsWithLaneId = std::vector<autoware_auto_planning_msgs::msg::PathPointWithLaneId>;
4951
struct CommonParam
5052
{
@@ -271,5 +273,5 @@ Polygons2d createMandatoryDetectionAreaPolygon(
271273
const PathWithLaneId & path, const PlannerData & planner_data,
272274
const PlannerParam & planner_param);
273275
} // namespace run_out_utils
274-
} // namespace behavior_velocity_planner
276+
} // namespace autoware::behavior_velocity_planner
275277
#endif // UTILS_HPP_

planning/behavior_velocity_run_out_module/plugins.xml

-3
This file was deleted.

0 commit comments

Comments
 (0)