114 const float x = est_q.x;
115 const float y = est_q.y;
116 const float theta = est_q.th;
117 const float cos_theta = std::cos(theta);
118 const float sin_theta = std::sin(theta);
119 const float dx = est_v.tra * cos_theta;
120 const float dy = est_v.tra * sin_theta;
121 const float ddx = est_a.tra * cos_theta;
122 const float ddy = est_a.tra * sin_theta;
126 const float kx = omega_n * omega_n;
127 const float kdx = 2 * zeta * omega_n;
129 const float kdy = kdx;
131 const float dddx_r = ref_dddq.x;
132 const float dddy_r = ref_dddq.y;
133 const float ddx_r = ref_ddq.x;
134 const float ddy_r = ref_ddq.y;
135 const float dx_r = ref_dq.x;
136 const float dy_r = ref_dq.y;
137 const float x_r = ref_q.x;
138 const float y_r = ref_q.y;
139 const float th_r = ref_q.th;
140 const float cos_th_r = std::cos(th_r);
141 const float sin_th_r = std::sin(th_r);
142 const float u1 = ddx_r + kdx * (dx_r - dx) + kx * (x_r - x);
143 const float u2 = ddy_r + kdy * (dy_r - dy) + ky * (y_r - y);
144 const float du1 = dddx_r + kdx * (ddx_r - ddx) + kx * (dx_r - dx);
145 const float du2 = dddy_r + kdy * (ddy_r - ddy) + ky * (dy_r - dy);
146 const float d_xi = u1 * cos_th_r + u2 * sin_th_r;
154 const auto v_d = ref_dq.x * cos_th_r + ref_dq.y * sin_th_r;
155 const auto w_d = ref_dq.th;
156 const auto k1 = 2 * zeta * std::sqrt(w_d * w_d + b * v_d * v_d);
159 const auto v = v_d * std::cos(th_r - theta) +
160 k1 * (cos_theta * (x_r - x) + sin_theta * (y_r - y));
162 k2 * v_d *
sinc(th_r - theta) *
163 (-sin_theta * (x_r - x) + cos_theta * (y_r - y)) +
167 res.dv = ref_ddq.x * cos_th_r + ref_ddq.y * sin_th_r;
176 res.w = (u2 * cos_th_r - u1 * sin_th_r) /
xi;
177 res.dw = -(2 * d_xi * res.w + du1 * sin_th_r - du2 * cos_th_r) /
xi;
static constexpr float sinc(const float x)
自作の sinc 関数 sinc(x) := sin(x) / x
Definition: trajectory_tracker.h:58
float low_b
Definition: trajectory_tracker.h:41
float low_zeta
Definition: trajectory_tracker.h:40
float omega_n
Definition: trajectory_tracker.h:39
float zeta
Definition: trajectory_tracker.h:38