Skip to content

Commit

Permalink
fix(AbLC, lane_change): fix module name inconsistency (autowarefounda…
Browse files Browse the repository at this point in the history
…tion#6090)

* fix(AbLC): rename

Signed-off-by: satoshi-ota <[email protected]>

* fix(AbLC, LC): fix duplicated rtc setting

Signed-off-by: satoshi-ota <[email protected]>

* fix(bpp): fix module name inconsistency

Signed-off-by: satoshi-ota <[email protected]>

* fix(AbLC): rename

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Jan 18, 2024
1 parent fa0b084 commit 75884b0
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager
public:
AvoidanceByLaneChangeModuleManager()
: LaneChangeModuleManager(
"avoidance_by_lc", route_handler::Direction::NONE,
"avoidance_by_lane_change", route_handler::Direction::NONE,
LaneChangeModuleType::AVOIDANCE_BY_LANE_CHANGE)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
initInterface(node, {"left", "right"});

// init lane change manager
LaneChangeModuleManager::init(node);
LaneChangeModuleManager::initParams(node);

const auto avoidance_params = getParameter(node);
AvoidanceByLCParameters p(avoidance_params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ std::shared_ptr<BehaviorPathPlannerNode> generateNode()
ament_index_cpp::get_package_share_directory("behavior_path_avoidance_module") +
"/config/avoidance.param.yaml",
ament_index_cpp::get_package_share_directory("behavior_path_avoidance_by_lane_change_module") +
"/config/avoidance_by_lc.param.yaml"});
"/config/avoidance_by_lane_change.param.yaml"});

return std::make_shared<BehaviorPathPlannerNode>(node_options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class LaneChangeModuleManager : public SceneModuleManagerInterface
void updateModuleParams(const std::vector<rclcpp::Parameter> & parameters) override;

protected:
void initParams(rclcpp::Node * node);

std::shared_ptr<LaneChangeParameters> parameters_;

Direction direction_;
Expand Down
8 changes: 6 additions & 2 deletions planning/behavior_path_lane_change_module/src/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ namespace behavior_path_planner

void LaneChangeModuleManager::init(rclcpp::Node * node)
{
using tier4_autoware_utils::getOrDeclareParameter;

// init manager interface
initInterface(node, {""});
initParams(node);
}

void LaneChangeModuleManager::initParams(rclcpp::Node * node)
{
using tier4_autoware_utils::getOrDeclareParameter;

LaneChangeParameters p{};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
priority: 4
max_module_size: 1

avoidance_by_lc:
avoidance_by_lane_change:
enable_rtc: false
enable_simultaneous_execution_as_approved_module: false
enable_simultaneous_execution_as_candidate_module: false
Expand Down
8 changes: 3 additions & 5 deletions planning/behavior_path_planner/src/planner_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,11 +859,9 @@ void PlannerManager::resetRootLanelet(const std::shared_ptr<PlannerData> & data)

// when lane change module is running, don't update root lanelet.
const bool is_lane_change_running = std::invoke([&]() {
const auto lane_change_itr =
std::find_if(approved_module_ptrs_.begin(), approved_module_ptrs_.end(), [](const auto & m) {
return m->name().find("lane_change") != std::string::npos ||
m->name().find("avoidance_by_lc") != std::string::npos;
});
const auto lane_change_itr = std::find_if(
approved_module_ptrs_.begin(), approved_module_ptrs_.end(),
[](const auto & m) { return m->isRootLaneletToBeUpdated(); });
return lane_change_itr != approved_module_ptrs_.end();
});
if (is_lane_change_running) {
Expand Down

0 comments on commit 75884b0

Please sign in to comment.