Skip to content

Commit 3fedce3

Browse files
committed
refactor(bicycle_motion_model): implement exponential decay for slip angle in state prediction
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
1 parent e69b61d commit 3fedce3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

perception/autoware_multi_object_tracker/lib/tracker/motion_model/bicycle_motion_model.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ bool BicycleMotionModel::predictStateStep(const double dt, KalmanFilter & ekf) c
326326
X_t(IDX::Y) + vel * sin_yaw * dt + 0.5 * vel * cos_slip * w_dtdt; // dy = v * sin(yaw) * dt
327327
X_next_t(IDX::YAW) = X_t(IDX::YAW) + w * dt; // d(yaw) = w * dt
328328
X_next_t(IDX::VEL) = X_t(IDX::VEL);
329-
X_next_t(IDX::SLIP) = X_t(IDX::SLIP); // slip_angle = asin(lr * w / v)
329+
// Apply exponential decay to slip angle over time, with a half-life of 2 seconds
330+
const double decay_rate = std::exp(-dt * 0.69314718056 / 2.0);
331+
X_next_t(IDX::SLIP) = X_t(IDX::SLIP) * decay_rate; // slip_angle = asin(lr * w / v)
330332

331333
// State transition matrix A
332334
Eigen::MatrixXd A = Eigen::MatrixXd::Identity(DIM, DIM);

0 commit comments

Comments
 (0)