Skip to content

Commit

Permalink
fix(autoware_behavior_path_avoidance_by_lane_change_module): fix clan…
Browse files Browse the repository at this point in the history
…g-tidy issues

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed Apr 10, 2024
1 parent 42b7c5f commit 090fd8e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include <memory>
#include <string>

namespace autoware
{
namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
AvoidanceByLaneChangeInterface::AvoidanceByLaneChangeInterface(
const std::string & name, rclcpp::Node & node,
Expand Down Expand Up @@ -62,5 +60,4 @@ void AvoidanceByLaneChangeInterface::updateRTCStatus(
rtc_interface_ptr_map_.at(direction)->updateCooperateStatus(
uuid_map_.at(direction), isExecutionReady(), start_distance, finish_distance, clock_->now());
}
} // namespace behavior_path_planner
} // namespace autoware
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#include <string>
#include <vector>

namespace autoware
{
namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
{
Expand Down Expand Up @@ -190,7 +188,6 @@ AvoidanceByLaneChangeModuleManager::createNewSceneModuleInstance()
objects_of_interest_marker_interface_ptr_map_);
}

} // namespace behavior_path_planner
} // namespace autoware

#include <pluginlib/class_list_macros.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include <optional>
#include <utility>

namespace autoware
{
namespace behavior_path_planner
namespace autoware::behavior_path_planner
{
using ::behavior_path_planner::utils::lane_change::debug::createExecutionArea;

Expand Down Expand Up @@ -303,5 +301,4 @@ double AvoidanceByLaneChange::calcLateralOffset() const
}
return additional_lat_offset;
}
} // namespace behavior_path_planner
} // namespace autoware
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using ::behavior_path_planner::BehaviorPathPlannerNode;
using planning_test_utils::PlanningInterfaceTestManager;

std::shared_ptr<PlanningInterfaceTestManager> generateTestManager()
std::shared_ptr<PlanningInterfaceTestManager> generate_test_manager()
{
auto test_manager = std::make_shared<PlanningInterfaceTestManager>();

Expand All @@ -41,7 +41,7 @@ std::shared_ptr<PlanningInterfaceTestManager> generateTestManager()
return test_manager;
}

std::shared_ptr<BehaviorPathPlannerNode> generateNode()
std::shared_ptr<BehaviorPathPlannerNode> generate_node()
{
auto node_options = rclcpp::NodeOptions{};
const auto planning_test_utils_dir =
Expand Down Expand Up @@ -75,9 +75,9 @@ std::shared_ptr<BehaviorPathPlannerNode> generateNode()
return std::make_shared<BehaviorPathPlannerNode>(node_options);
}

void publishMandatoryTopics(
std::shared_ptr<PlanningInterfaceTestManager> test_manager,
std::shared_ptr<BehaviorPathPlannerNode> test_target_node)
void publish_mandatory_topics(
const std::shared_ptr<PlanningInterfaceTestManager>& test_manager,
const std::shared_ptr<BehaviorPathPlannerNode>& test_target_node)
{
// publish necessary topics from test_manager
test_manager->publishInitialPose(test_target_node, "behavior_path_planner/input/odometry");
Expand All @@ -97,10 +97,10 @@ void publishMandatoryTopics(
TEST(PlanningModuleInterfaceTest, NodeTestWithExceptionRoute)
{
rclcpp::init(0, nullptr);
auto test_manager = generateTestManager();
auto test_target_node = generateNode();
auto test_manager = generate_test_manager();
auto test_target_node = generate_node();

publishMandatoryTopics(test_manager, test_target_node);
publish_mandatory_topics(test_manager, test_target_node);

// test for normal trajectory
ASSERT_NO_THROW_WITH_ERROR_MSG(test_manager->testWithBehaviorNominalRoute(test_target_node));
Expand All @@ -115,9 +115,9 @@ TEST(PlanningModuleInterfaceTest, NodeTestWithOffTrackEgoPose)
{
rclcpp::init(0, nullptr);

auto test_manager = generateTestManager();
auto test_target_node = generateNode();
publishMandatoryTopics(test_manager, test_target_node);
auto test_manager = generate_test_manager();
auto test_target_node = generate_node();
publish_mandatory_topics(test_manager, test_target_node);

// test for normal trajectory
ASSERT_NO_THROW_WITH_ERROR_MSG(test_manager->testWithBehaviorNominalRoute(test_target_node));
Expand Down

0 comments on commit 090fd8e

Please sign in to comment.