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

fix(simple_planning_simulator): fix bugprone-branch-clone #9725

Merged
merged 4 commits into from
Jan 6, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,7 @@ void SimplePlanningSimulator::set_input(const InputCommand & cmd, const double a
std::visit(
[this, acc_by_slope](auto && arg) {
using T = std::decay_t<decltype(arg)>;
if constexpr (std::is_same_v<T, Control>) {
set_input(arg, acc_by_slope);
} else if constexpr (std::is_same_v<T, ActuationCommandStamped>) {
if constexpr (std::is_same_v<T, Control> || std::is_same_v<T, ActuationCommandStamped>) {
set_input(arg, acc_by_slope);
} else {
throw std::invalid_argument("Invalid input command type");
Expand Down Expand Up @@ -640,7 +638,7 @@ void SimplePlanningSimulator::set_input(const Control & cmd, const double acc_by
input << vel, steer;
} else if ( // NOLINT
vehicle_model_type_ == VehicleModelType::IDEAL_STEER_ACC ||
vehicle_model_type_ == VehicleModelType::DELAY_STEER_ACC) {
vehicle_model_type_ == VehicleModelType::DELAY_STEER_ACC) { // NOLINT
input << combined_acc, steer;
} else if ( // NOLINT
vehicle_model_type_ == VehicleModelType::IDEAL_STEER_ACC_GEARED ||
Expand Down
Loading