MCPcopy Index your code
hub / github.com/AtsushiSakai/PythonRobotics / motion_model

Function motion_model

SLAM/FastSLAM2/fast_slam2.py:338–352  ·  view source on GitHub ↗
(x, u)

Source from the content-addressed store, hash-verified

336
337
338def 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
355def pi_2_pi(angle):

Callers 2

predict_particlesFunction · 0.70
observationFunction · 0.70

Calls 1

pi_2_piFunction · 0.70

Tested by

no test coverage detected