(x, u)
| 336 | |
| 337 | |
| 338 | def motion_model(x, u): |
| 339 | |
| 340 | F = np.array([[1.0, 0, 0], |
| 341 | [0, 1.0, 0], |
| 342 | [0, 0, 1.0]]) |
| 343 | |
| 344 | B = np.array([[DT * math.cos(x[2, 0]), 0], |
| 345 | [DT * math.sin(x[2, 0]), 0], |
| 346 | [0.0, DT]]) |
| 347 | |
| 348 | x = F @ x + B @ u |
| 349 | |
| 350 | x[2, 0] = pi_2_pi(x[2, 0]) |
| 351 | |
| 352 | return x |
| 353 | |
| 354 | |
| 355 | def pi_2_pi(angle): |
no test coverage detected