Skip to content

Commit

Permalink
fix rtc paramters
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Zulfaqar <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 committed May 1, 2023
1 parent ac4d78f commit 16be270
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ std::string getModuleName(const uint8_t module_type)
return "external_request_lane_change_right";
}
case Module::AVOIDANCE_BY_LC_LEFT: {
return "avoidance_by_lane_change_left";
return "avoidance_by_lane_change";
}
case Module::AVOIDANCE_BY_LC_RIGHT: {
return "avoidance_by_lane_change_right";
return "avoidance_by_lane_change";
}
case Module::AVOIDANCE_LEFT: {
return "avoidance_left";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class AvoidanceByLaneChangeInterface : public LaneChangeInterface
const std::string & name, rclcpp::Node & node,
const std::shared_ptr<LaneChangeParameters> & parameters,
const std::shared_ptr<AvoidanceParameters> & avoidance_parameters,
const std::shared_ptr<AvoidanceByLCParameters> & avoidance_by_lane_change_parameters);
const std::shared_ptr<AvoidanceByLCParameters> & avoidance_by_lane_change_parameters,
const std::unordered_map<std::string, std::shared_ptr<RTCInterface> > & rtc_interface_ptr_map);

ModuleStatus updateState() override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,10 @@ AvoidanceByLaneChangeInterface::AvoidanceByLaneChangeInterface(
const std::string & name, rclcpp::Node & node,
const std::shared_ptr<LaneChangeParameters> & parameters,
const std::shared_ptr<AvoidanceParameters> & avoidance_parameters,
const std::shared_ptr<AvoidanceByLCParameters> & avoidance_by_lane_change_parameters)
const std::shared_ptr<AvoidanceByLCParameters> & avoidance_by_lane_change_parameters,
const std::unordered_map<std::string, std::shared_ptr<RTCInterface> > & rtc_interface_ptr_map)
: LaneChangeInterface{
name, node, parameters, createRTCInterfaceMap(node, name, {""}),
name, node, parameters, rtc_interface_ptr_map,
std::make_unique<AvoidanceByLaneChange>(
parameters, avoidance_parameters, avoidance_by_lane_change_parameters)}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ std::shared_ptr<SceneModuleInterface>
AvoidanceByLaneChangeModuleManager::createNewSceneModuleInstance()
{
return std::make_shared<AvoidanceByLaneChangeInterface>(
name_, *node_, parameters_, avoidance_parameters_, avoidance_by_lane_change_parameters_);
name_, *node_, parameters_, avoidance_parameters_, avoidance_by_lane_change_parameters_,
rtc_interface_ptr_map_);
}

} // namespace behavior_path_planner
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Module getModuleType(const std::string & module_name)
module.type = Module::LANE_CHANGE_LEFT;
} else if (module_name == "lane_change_right") {
module.type = Module::LANE_CHANGE_RIGHT;
} else if (module_name == "avoidance_by_lane_change_left") {
} else if (module_name == "avoidance_by_lane_change") {
module.type = Module::AVOIDANCE_BY_LC_LEFT;
} else if (module_name == "avoidance_by_lane_change_right") {
} else if (module_name == "avoidance_by_lane_change") {
module.type = Module::AVOIDANCE_BY_LC_RIGHT;
} else if (module_name == "avoidance_left") {
module.type = Module::AVOIDANCE_LEFT;
Expand Down
4 changes: 2 additions & 2 deletions planning/rtc_interface/src/rtc_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Module getModuleType(const std::string & module_name)
module.type = Module::EXT_REQUEST_LANE_CHANGE_LEFT;
} else if (module_name == "external_request_lane_change_right") {
module.type = Module::EXT_REQUEST_LANE_CHANGE_RIGHT;
} else if (module_name == "avoidance_by_lane_change_left") {
} else if (module_name == "avoidance_by_lane_change") {
module.type = Module::AVOIDANCE_BY_LC_LEFT;
} else if (module_name == "avoidance_by_lane_change_right") {
} else if (module_name == "avoidance_by_lane_change") {
module.type = Module::AVOIDANCE_BY_LC_RIGHT;
} else if (module_name == "avoidance_left") {
module.type = Module::AVOIDANCE_LEFT;
Expand Down

0 comments on commit 16be270

Please sign in to comment.