Skip to content

Commit

Permalink
refactor(autoware_velocity_virtual_traffic_light_module): prefix pack…
Browse files Browse the repository at this point in the history
…age with autoware_ and move code to the autoware namespace

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed May 28, 2024
1 parent c696905 commit 558d745
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ perception/traffic_light_occlusion_predictor/** [email protected] tao.zhon
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_behavior_velocity_virtual_traffic_light_module/** [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 Down Expand Up @@ -176,7 +177,6 @@ planning/behavior_velocity_speed_bump_module/** [email protected] shumpei.wakab
planning/behavior_velocity_stop_line_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_template_module/** [email protected]
planning/behavior_velocity_traffic_light_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_virtual_traffic_light_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_walkway_module/** [email protected] [email protected] [email protected] [email protected]
planning/costmap_generator/** [email protected] [email protected] [email protected]
planning/external_velocity_limit_selector/** [email protected] [email protected] [email protected] [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
/>
<let
name="behavior_velocity_planner_launch_modules"
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'behavior_velocity_planner::VirtualTrafficLightModulePlugin, '&quot;)"
value="$(eval &quot;'$(var behavior_velocity_planner_launch_modules)' + 'autoware::behavior_velocity_planner::VirtualTrafficLightModulePlugin, '&quot;)"
if="$(var launch_virtual_traffic_light_module)"
/>
<let
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ nav:
- 'Speed Bump': planning/behavior_velocity_speed_bump_module
- 'Stop Line': planning/behavior_velocity_stop_line_module
- 'Traffic Light': planning/behavior_velocity_traffic_light_module
- 'Virtual Traffic Light': planning/behavior_velocity_virtual_traffic_light_module
- 'Virtual Traffic Light': planning/autoware_behavior_velocity_virtual_traffic_light_module
- 'Walkway': planning/behavior_velocity_walkway_module
- 'Parking':
- 'Freespace Planner':
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_behavior_velocity_planner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It loads modules as plugins. Please refer to the links listed below for detail o
- [Intersection](../behavior_velocity_intersection_module/README.md)
- [MergeFromPrivate](../behavior_velocity_intersection_module/README.md#merge-from-private)
- [Stop Line](../behavior_velocity_stop_line_module/README.md)
- [Virtual Traffic Light](../behavior_velocity_virtual_traffic_light_module/README.md)
- [Virtual Traffic Light](../autoware_behavior_velocity_virtual_traffic_light_module/README.md)
- [Traffic Light](../behavior_velocity_traffic_light_module/README.md)
- [Occlusion Spot](../behavior_velocity_occlusion_spot_module/README.md)
- [No Stopping Area](../behavior_velocity_no_stopping_area_module/README.md)
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_behavior_velocity_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_behavior_velocity_virtual_traffic_light_module</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>behavior_velocity_blind_spot_module</test_depend>
<test_depend>behavior_velocity_crosswalk_module</test_depend>
Expand All @@ -78,7 +79,6 @@
<test_depend>behavior_velocity_speed_bump_module</test_depend>
<test_depend>behavior_velocity_stop_line_module</test_depend>
<test_depend>behavior_velocity_traffic_light_module</test_depend>
<test_depend>behavior_velocity_virtual_traffic_light_module</test_depend>
<test_depend>behavior_velocity_walkway_module</test_depend>
<!--<test_depend>behavior_velocity_template_module</test_depend>-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
module_names.emplace_back("behavior_velocity_planner::MergeFromPrivateModulePlugin");
module_names.emplace_back("behavior_velocity_planner::BlindSpotModulePlugin");
module_names.emplace_back("behavior_velocity_planner::DetectionAreaModulePlugin");
module_names.emplace_back("behavior_velocity_planner::VirtualTrafficLightModulePlugin");
module_names.emplace_back("autoware::behavior_velocity_planner::VirtualTrafficLightModulePlugin");
module_names.emplace_back("behavior_velocity_planner::NoStoppingAreaModulePlugin");
module_names.emplace_back("behavior_velocity_planner::StopLineModulePlugin");
module_names.emplace_back("behavior_velocity_planner::OcclusionSpotModulePlugin");
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_virtual_traffic_light_module)
project(autoware_behavior_velocity_virtual_traffic_light_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
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_virtual_traffic_light_module</name>
<name>autoware_behavior_velocity_virtual_traffic_light_module</name>
<version>0.1.0</version>
<description>The behavior_velocity_virtual_traffic_light_module package</description>
<description>The autoware_behavior_velocity_virtual_traffic_light_module package</description>

<maintainer email="[email protected]">Kosuke Takeuchi</maintainer>
<maintainer email="[email protected]">Tomoya Kimura</maintainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<library path="autoware_behavior_velocity_virtual_traffic_light_module">
<class type="autoware::behavior_velocity_planner::VirtualTrafficLightModulePlugin" base_class_type="behavior_velocity_planner::PluginInterface"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using tier4_autoware_utils::createMarkerScale;
using tier4_autoware_utils::toMsg;
using namespace std::literals::string_literals;

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
namespace
{
Expand Down Expand Up @@ -147,4 +147,4 @@ visualization_msgs::msg::MarkerArray VirtualTrafficLightModule::createDebugMarke

return debug_marker_array;
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
#include <unordered_map>
#include <utility>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using lanelet::autoware::VirtualTrafficLight;
using tier4_autoware_utils::getOrDeclareParameter;
namespace planning_utils = ::behavior_velocity_planner::planning_utils;

VirtualTrafficLightModuleManager::VirtualTrafficLightModuleManager(rclcpp::Node & node)
: SceneModuleManagerInterface(node, getModuleName())
Expand Down Expand Up @@ -76,9 +77,9 @@ VirtualTrafficLightModuleManager::getModuleExpiredFunction(
return id_set.count(scene_module->getModuleId()) == 0;
};
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(
behavior_velocity_planner::VirtualTrafficLightModulePlugin,
autoware::behavior_velocity_planner::VirtualTrafficLightModulePlugin,
behavior_velocity_planner::PluginInterface)
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
#include <functional>
#include <memory>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::PluginWrapper;
using ::behavior_velocity_planner::SceneModuleInterface;
using ::behavior_velocity_planner::SceneModuleManagerInterface;
class VirtualTrafficLightModuleManager : public SceneModuleManagerInterface
{
public:
Expand All @@ -48,6 +51,6 @@ class VirtualTrafficLightModulePlugin : public PluginWrapper<VirtualTrafficLight
{
};

} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner

#endif // MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@
#include <string>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::PlanningBehavior;
using ::behavior_velocity_planner::SceneModuleInterface;
using ::behavior_velocity_planner::VelocityFactor;
namespace arc_lane_utils = ::behavior_velocity_planner::arc_lane_utils;
namespace planning_utils = ::behavior_velocity_planner::planning_utils;
namespace
{
using tier4_autoware_utils::calcDistance2d;
Expand Down Expand Up @@ -618,4 +623,4 @@ void VirtualTrafficLightModule::insertStopVelocityAtEndLine(
module_data_.stop_head_pose_at_end_line =
calcHeadPose(stop_pose, planner_data_->vehicle_info_.max_longitudinal_offset_m);
}
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@
#include <string>
#include <vector>

namespace behavior_velocity_planner
namespace autoware::behavior_velocity_planner
{
using ::behavior_velocity_planner::PathWithLaneId;
using ::behavior_velocity_planner::StopReason;
using ::behavior_velocity_planner::Pose;
using ::behavior_velocity_planner::StopReason;
using ::behavior_velocity_planner::SceneModuleInterface;
class VirtualTrafficLightModule : public SceneModuleInterface
{
public:
Expand Down Expand Up @@ -126,5 +131,5 @@ class VirtualTrafficLightModule : public SceneModuleInterface
autoware_auto_planning_msgs::msg::PathWithLaneId * path,
tier4_planning_msgs::msg::StopReason * stop_reason, const size_t end_line_idx);
};
} // namespace behavior_velocity_planner
} // namespace autoware::behavior_velocity_planner
#endif // SCENE_HPP_

This file was deleted.

0 comments on commit 558d745

Please sign in to comment.