提交 88050759 编写于 作者: K kevin-y-wang 提交者: Qi Luo

Control: fix the static-state MRAC adaption problem on Lat_control

上级 9ca748f9
...@@ -533,8 +533,11 @@ Status LatController::ComputeControlCommand( ...@@ -533,8 +533,11 @@ Status LatController::ComputeControlCommand(
if (mrac_model_order > 1) { if (mrac_model_order > 1) {
steer_state(1, 0) = (steering_position - pre_steering_position_) / ts_; steer_state(1, 0) = (steering_position - pre_steering_position_) / ts_;
} }
steer_angle = mrac_controller_.Control( bool enable_adapt = (std::fabs(vehicle_state->linear_velocity()) >
steer_angle, steer_state, steer_limit, steer_diff_with_max_rate / ts_); control_conf_->minimum_speed_resolution());
steer_angle =
mrac_controller_.Control(steer_angle, steer_state, steer_limit,
steer_diff_with_max_rate / ts_, enable_adapt);
// Set the steer mrac debug message // Set the steer mrac debug message
MracDebug *mracdebug = debug->mutable_steer_mrac_debug(); MracDebug *mracdebug = debug->mutable_steer_mrac_debug();
Matrix steer_reference = mrac_controller_.CurrentReferenceState(); Matrix steer_reference = mrac_controller_.CurrentReferenceState();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册