解释:%% 原运动学误差状态空间方程的相关矩阵 % 计算参考控制量 idx = calc_target_index(x,y,refPos_x,refPos_y); v_r = target_v; Delta_r = refDelta(idx); heading_r = refPos_yaw(idx); % 实际状态量与参考状态量 X_real = [x,y,yaw]; Xr = [refPos_x(idx), refPos_y(idx), refPos_yaw(idx)]; % 求位置、航向角的误差 x_error = x - refPos_x(idx); y_error = y - refPos_y(idx); % 根据百度Apolo,计算横向误差 latError = y_error*cos(heading_r) - x_error*sin(heading_r); % a,b两个矩阵 a = [1 0 -v_r*sin(heading_r)*dt; 0 1 v_r*cos(heading_r)*dt; 0 0 1]; b = [cos(heading_r)*dt 0; sin(heading_r)*dt 0; tan(heading_r)*dt/L v_r*dt/(L * (cos(Delta_r)^2))];
时间: 2023-05-30 14:02:05 浏览: 189
As an AI language model, I do not have emotions and I am not capable of experiencing or expressing anything. The term "null" in programming refers to a value that represents the absence of a value or a non-existent value.
阅读全文