Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(behavior_path_avoidance_by_lane_change_module): prefix package and namespace with autoware_ #6638

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ perception/traffic_light_map_based_detector/** [email protected] tao.zhong
perception/traffic_light_multi_camera_fusion/** [email protected] [email protected]
perception/traffic_light_occlusion_predictor/** [email protected] [email protected]
perception/traffic_light_visualization/** [email protected] [email protected]
planning/autoware_behavior_path_avoidance_by_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_path_dynamic_obstacle_avoidance_module/** [email protected] [email protected] [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_path_planner_common/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Expand All @@ -161,7 +162,6 @@ planning/autoware_planning_topic_converter/** [email protected] satoshi.o
planning/autoware_remaining_distance_time_calculator/** [email protected]
planning/autoware_static_centerline_generator/** [email protected] [email protected]
planning/autoware_velocity_smoother/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_path_avoidance_by_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_path_goal_planner_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_path_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_path_planner/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Expand Down
2 changes: 1 addition & 1 deletion planning/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nav:
- 'Dynamic Drivable Area': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_drivable_area_design
- 'Turn Signal': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_turn_signal_design
- 'Scene Module':
- 'Avoidance by Lane Change': planning/behavior_path_avoidance_by_lane_change_module
- 'Avoidance by Lane Change': planning/autoware_behavior_path_avoidance_by_lane_change_module
- 'Dynamic Obstacle Avoidance': planning/autoware_behavior_path_dynamic_obstacle_avoidance_module
- 'Goal Planner': planning/behavior_path_goal_planner_module
- 'Lane Change': planning/behavior_path_lane_change_module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(behavior_path_avoidance_by_lane_change_module)
project(autoware_behavior_path_avoidance_by_lane_change_module)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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_path_avoidance_by_lane_change_module</name>
<name>autoware_behavior_path_avoidance_by_lane_change_module</name>
<version>0.1.0</version>
<description>The behavior_path_avoidance_by_lane_change_module package</description>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<library path="autoware_behavior_path_avoidance_by_lane_change_module">
<class type="autoware::behavior_path_planner::AvoidanceByLaneChangeModuleManager" base_class_type="behavior_path_planner::SceneModuleManagerInterface"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_
#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_
#ifndef DATA_STRUCTS_HPP_
#define DATA_STRUCTS_HPP_

#include "autoware_behavior_path_static_obstacle_avoidance_module/data_structs.hpp"

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::AvoidanceParameters;

struct AvoidanceByLCParameters : public AvoidanceParameters
{
// execute only when the target object longitudinal distance is larger than this param.
Expand All @@ -30,6 +32,6 @@ struct AvoidanceByLCParameters : public AvoidanceParameters
{
}
};
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner

#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__DATA_STRUCTS_HPP_
#endif // DATA_STRUCTS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "behavior_path_avoidance_by_lane_change_module/interface.hpp"
#include "interface.hpp"

#include "autoware_behavior_path_planner_common/interface/scene_module_interface.hpp"
#include "autoware_behavior_path_planner_common/interface/scene_module_visitor.hpp"

#include <memory>
#include <string>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::State;
using ::route_handler::Direction;

AvoidanceByLaneChangeInterface::AvoidanceByLaneChangeInterface(
const std::string & name, rclcpp::Node & node,
const std::shared_ptr<LaneChangeParameters> & parameters,
Expand Down Expand Up @@ -63,4 +66,4 @@ void AvoidanceByLaneChangeInterface::updateRTCStatus(
uuid_map_.at(direction), isExecutionReady(), state, start_distance, finish_distance,
clock_->now());
}
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_
#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_
#ifndef INTERFACE_HPP_
#define INTERFACE_HPP_

#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp"
#include "behavior_path_avoidance_by_lane_change_module/scene.hpp"
#include "behavior_path_lane_change_module/interface.hpp"
#include "data_structs.hpp"
#include "scene.hpp"

#include <rclcpp/rclcpp.hpp>

#include <memory>
#include <string>
#include <unordered_map>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::LaneChangeInterface;
using ::behavior_path_planner::ObjectsOfInterestMarkerInterface;
using ::behavior_path_planner::RTCInterface;

class AvoidanceByLaneChangeInterface : public LaneChangeInterface
{
public:
Expand All @@ -45,6 +49,6 @@ class AvoidanceByLaneChangeInterface : public LaneChangeInterface
protected:
void updateRTCStatus(const double start_distance, const double finish_distance) override;
};
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner

#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__INTERFACE_HPP_
#endif // INTERFACE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "behavior_path_avoidance_by_lane_change_module/manager.hpp"
#include "manager.hpp"

#include "autoware_behavior_path_static_obstacle_avoidance_module/parameter_helper.hpp"
#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp"
#include "data_structs.hpp"
#include "tier4_autoware_utils/ros/parameter.hpp"
#include "tier4_autoware_utils/ros/update_param.hpp"

Expand All @@ -25,8 +25,10 @@
#include <string>
#include <vector>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::getParameter;
using ::behavior_path_planner::ObjectParameter;

void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
{
Expand Down Expand Up @@ -191,9 +193,9 @@ AvoidanceByLaneChangeModuleManager::createNewSceneModuleInstance()
objects_of_interest_marker_interface_ptr_map_);
}

} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(
behavior_path_planner::AvoidanceByLaneChangeModuleManager,
behavior_path_planner::SceneModuleManagerInterface)
autoware::behavior_path_planner::AvoidanceByLaneChangeModuleManager,
::behavior_path_planner::SceneModuleManagerInterface)
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_
#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_
#ifndef MANAGER_HPP_
#define MANAGER_HPP_

#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp"
#include "behavior_path_avoidance_by_lane_change_module/interface.hpp"
#include "behavior_path_lane_change_module/manager.hpp"
#include "data_structs.hpp"
#include "interface.hpp"

#include <rclcpp/rclcpp.hpp>

Expand All @@ -26,9 +26,12 @@
#include <unordered_map>
#include <vector>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using route_handler::Direction;
using ::behavior_path_planner::LaneChangeModuleManager;
using ::behavior_path_planner::LaneChangeModuleType;
using ::behavior_path_planner::SceneModuleInterface;
using ::route_handler::Direction;

class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager
{
Expand All @@ -47,6 +50,6 @@ class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager
private:
std::shared_ptr<AvoidanceByLCParameters> avoidance_parameters_;
};
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner

#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__MANAGER_HPP_
#endif // MANAGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "behavior_path_avoidance_by_lane_change_module/scene.hpp"
#include "scene.hpp"

#include "autoware_behavior_path_planner_common/utils/drivable_area_expansion/static_drivable_area.hpp"
#include "autoware_behavior_path_planner_common/utils/path_safety_checker/objects_filtering.hpp"
Expand All @@ -28,13 +28,19 @@
#include <boost/geometry/algorithms/centroid.hpp>
#include <boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp>

#include <algorithm>
#include <limits>
#include <optional>
esteve marked this conversation as resolved.
Show resolved Hide resolved
#include <utility>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using behavior_path_planner::utils::lane_change::debug::createExecutionArea;
using ::behavior_path_planner::Direction;
using ::behavior_path_planner::LaneChangeModuleType;
using ::behavior_path_planner::ObjectInfo;
using ::behavior_path_planner::Point2d;
using ::behavior_path_planner::utils::lane_change::debug::createExecutionArea;
namespace utils = ::behavior_path_planner::utils;

AvoidanceByLaneChange::AvoidanceByLaneChange(
const std::shared_ptr<LaneChangeParameters> & parameters,
Expand Down Expand Up @@ -293,4 +299,4 @@ double AvoidanceByLaneChange::calcLateralOffset() const
}
return additional_lat_offset;
}
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_
#define BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_
#ifndef SCENE_HPP_
#define SCENE_HPP_

#include "autoware_behavior_path_static_obstacle_avoidance_module/helper.hpp"
#include "behavior_path_avoidance_by_lane_change_module/data_structs.hpp"
#include "behavior_path_lane_change_module/scene.hpp"
#include "data_structs.hpp"

#include <memory>

namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::DebugData;
using AvoidanceDebugData = DebugData;
using helper::static_obstacle_avoidance::AvoidanceHelper;
using ::behavior_path_planner::AvoidancePlanningData;
using ::behavior_path_planner::LaneChangeParameters;
using ::behavior_path_planner::NormalLaneChange;
using ::behavior_path_planner::ObjectData;
using ::behavior_path_planner::ObjectDataArray;
using ::behavior_path_planner::PredictedObject;
using ::behavior_path_planner::helper::static_obstacle_avoidance::AvoidanceHelper;

class AvoidanceByLaneChange : public NormalLaneChange
{
Expand Down Expand Up @@ -59,6 +66,6 @@ class AvoidanceByLaneChange : public NormalLaneChange
double calcMinimumLaneChangeLength() const;
double calcLateralOffset() const;
};
} // namespace behavior_path_planner
} // namespace autoware::behavior_path_planner

#endif // BEHAVIOR_PATH_AVOIDANCE_BY_LANE_CHANGE_MODULE__SCENE_HPP_
#endif // SCENE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <cmath>
#include <vector>

using behavior_path_planner::BehaviorPathPlannerNode;
using ::behavior_path_planner::BehaviorPathPlannerNode;
using planning_test_utils::PlanningInterfaceTestManager;

std::shared_ptr<PlanningInterfaceTestManager> generateTestManager()
Expand Down Expand Up @@ -52,26 +52,26 @@ std::shared_ptr<BehaviorPathPlannerNode> generateNode()
ament_index_cpp::get_package_share_directory("behavior_path_lane_change_module");

std::vector<std::string> module_names;
module_names.emplace_back("behavior_path_planner::AvoidanceByLaneChangeModuleManager");
module_names.emplace_back("autoware::behavior_path_planner::AvoidanceByLaneChangeModuleManager");

std::vector<rclcpp::Parameter> params;
params.emplace_back("launch_modules", module_names);
node_options.parameter_overrides(params);

test_utils::updateNodeOptions(
node_options,
{planning_test_utils_dir + "/config/test_common.param.yaml",
planning_test_utils_dir + "/config/test_nearest_search.param.yaml",
planning_test_utils_dir + "/config/test_vehicle_info.param.yaml",
behavior_path_planner_dir + "/config/behavior_path_planner.param.yaml",
behavior_path_planner_dir + "/config/drivable_area_expansion.param.yaml",
behavior_path_planner_dir + "/config/scene_module_manager.param.yaml",
behavior_path_lane_change_module_dir + "/config/lane_change.param.yaml",
ament_index_cpp::get_package_share_directory(
"autoware_behavior_path_static_obstacle_avoidance_module") +
"/config/static_obstacle_avoidance.param.yaml",
ament_index_cpp::get_package_share_directory("behavior_path_avoidance_by_lane_change_module") +
"/config/avoidance_by_lane_change.param.yaml"});
node_options, {planning_test_utils_dir + "/config/test_common.param.yaml",
planning_test_utils_dir + "/config/test_nearest_search.param.yaml",
planning_test_utils_dir + "/config/test_vehicle_info.param.yaml",
behavior_path_planner_dir + "/config/behavior_path_planner.param.yaml",
behavior_path_planner_dir + "/config/drivable_area_expansion.param.yaml",
behavior_path_planner_dir + "/config/scene_module_manager.param.yaml",
behavior_path_lane_change_module_dir + "/config/lane_change.param.yaml",
ament_index_cpp::get_package_share_directory(
"autoware_behavior_path_static_obstacle_avoidance_module") +
"/config/static_obstacle_avoidance.param.yaml",
ament_index_cpp::get_package_share_directory(
"autoware_behavior_path_avoidance_by_lane_change_module") +
"/config/avoidance_by_lane_change.param.yaml"});

return std::make_shared<BehaviorPathPlannerNode>(node_options);
}
Expand Down

This file was deleted.

Loading