Skip to content

Commit fcaa48d

Browse files
committed
Added a check for the value of lane_change_velocity_.
1 parent f44ddfd commit fcaa48d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

simulation/behavior_tree_plugin/src/vehicle/lane_change_action.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ BT::NodeStatus LaneChangeAction::tick()
171171
lane_change_velocity_ = curve_->getLength() / lane_change_parameters_->constraint.value;
172172
break;
173173
}
174+
if (target_speed_) {
175+
lane_change_velocity_ = std::clamp(lane_change_velocity_, 0.0, target_speed_.value());
176+
}
174177
} else {
175178
return BT::NodeStatus::FAILURE;
176179
}

0 commit comments

Comments
 (0)