SLAM Engineer

๐ŸŒˆ Error-state Kalman Filter ์ด์•ผ๊ธฐ (Feat. On-manifold Optimization)


Error-state Kalman Filter ๋ž€?

  • ์ตœ๊ทผ SLAM ํ•™/์—…๊ณ„์—์„œ๋Š” visual์€ OpenVINS, lidar๋Š” Fast-LIO ๊ฐ€ ๋Œ€์„ธ๊ฐ€ ๋œ ๋“ฏํ•˜๋‹ค.
    • ์ด ๋‘˜์€ ๋ชจ๋‘ on-manifold EKF ํ˜น์€ error-state Kalman filter ๋ผ๊ณ  ๋ถˆ๋ฆฌ๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค.
  • ๊ทธ๋ž˜์„œ Error-state Kalman Filter (ESKF) ์— ๋Œ€ํ•ด ๊ณต๋ถ€ํ•ด๋ณด์•˜๋‹ค.
  • ์ตœ๋Œ€ํ•œ ์‰ฝ๊ฒŒ ํฐ๊ทธ๋ฆผ ์œ„์ฃผ๋กœ ์ดํ•ดํ•ด๋ณด์ž.

ํฐ ๊ทธ๋ฆผ

  • ์ผ๋‹จ ESKF์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐ ํ•˜๋ ค๋ฉด
    1. EKF (Extended Kalman Filter)๋ฅผ ์•Œ์•„์•ผ ํ•˜๊ณ 
    2. ๊ทธ ์ „์— KF (Kalman Filter)๋ฅผ ์•Œ์•„์•ผ ํ•œ๋‹ค.
    3. ๊ทธ๋ฆฌ๊ณ  GN (Gauss-Newton) Opt ์— ๋Œ€ํ•ด์„œ๋„ ์ดํ•ดํ•ด์•ผ ํ•œ๋‹ค.
  • ๋ญ”๊ฐ€ ๋งŽ์•„ ๋ณด์ด์ง€๋งŒ, ํฐ ๊ทธ๋ฆผ์—์„œ ์ˆ˜ํ•™์—†์ด ์ด์•ผ๊ธฐํ•ด๋ณด๋Š” ๊ฒƒ์ด ์ด ํฌ์ŠคํŠธ์˜ ๋ชฉ์ ์ด๋‹ค.

KF ํ†บ์•„๋ณด๊ธฐ

  • KF ์— ๋Œ€ํ•œ (์ˆ˜ํ•™์ ) ์„ค๋ช…์„ ์—ฌ๊ธฐ์„œ ๋Š˜์–ด๋†“์„ ์ƒ๊ฐ์€ ์—†๋‹ค..
    • KF๋ฅผ ์•ฝ๊ฐ„ ๋ฌด์‹ํ•˜๊ฒŒ ํ•œ์ค„ ์š”์•ฝํ•˜์ž๋ฉด 1. ์ €์งˆ๋Ÿฌ๋ณด๊ณ , 2. ์ˆ˜์ •ํ•˜๊ธฐ, ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.
      • ์˜ˆ๋ฅผ ๋“ค์–ด ํ˜„์žฌ ๋ฒฝ์œผ๋กœ๋ถ€ํ„ฐ ๋‚ด๊ฐ€ 1m ๋–จ์–ด์ ธ์„œ ์„œ์žˆ์Œ์„ ์•ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚ด ๋ณดํญ ํ•œ ์นธ์€ 50cm ์ •๋„ ๋˜๊ณ  ๋‚ด ํŒ”๊ธธ์ด๋Š” 50cm ๋ผ๊ณ  ํ•˜์ž. ๋‚ด๊ฐ€ ์•ž์œผ๋กœ ํ•œ์นธ ์›€์ง์ด๋ฉด ๋‚˜๋Š” ๋ฒฝ์œผ๋กœ๋ถ€ํ„ฐ ์–ผ๋งˆ๋‚˜ ๋–จ์–ด์ ธ์žˆ์„๊นŒ?
        1. ์ €์งˆ๋Ÿฌ๋ณด๊ธฐ: ์ผ๋‹จ ์›€์ง์ด์ž! 50cm ๋ผ๊ณ  ์น˜์ž. ๊ทธ๋Ÿฌ๋ฉด ๋‚˜๋Š” ๋ฒฝ์œผ๋กœ๋ถ€ํ„ฐ 100-50 = 50 cm ๋งŒํผ ๋–จ์–ด์ ธ์žˆ๊ฒ ์ง€?
          • ํ•˜์ง€๋งŒ ๋ฌธ์ œ๋Š” ๋ณดํญ์ด ํ•ญ์ƒ ์ •๋ฐ€ํ•˜๊ฒŒ ๋”ฑ 50cm ์ผ๋ฆฌ๋Š” ๋งŒ๋ฌดํ•˜๋‹ค.
        2. ์ˆ˜์ •ํ•˜๊ธฐ: ๊ทธ๋ž˜์„œ ํŒ”์„ ํ•œ๋ฒˆ ๋ป—์–ด๋ณด์•˜๋‹ค. ๊ทผ๋ฐ ํŒ”์„ ๋๊นŒ์ง€ ์ญ‰ ๋ป—์—ˆ๋Š”๋ฐ๋„ ๊ณต๊ฐ„์ด ์กฐ๊ธˆ ๋‚จ๋„ค. ๊ทธ๋Ÿฌ๋ฉด 50cm ๋ณด๋‹ค๋Š” ์ผ๋‹จ ๋œ ๊ฐ„ ๊ฑด ์•Œ๊ฒ ๋‹ค. ๊ทธ๋Ÿผ ์•„๊นŒ 50cm ๋–จ์–ด์ ธ์žˆ๋‹ค๊ณ  ์ €์งˆ๋ €๋˜ ์˜ˆ์ธก๊ฐ’์„ ์กฐ๊ธˆ ์ˆ˜์ •ํ•ด์ฃผ๋ฉด ๋˜๊ฒ ๋‹ค.
      • ๊ทผ๋ฐ ํŒ”๊ธธ์ด๋กœ ๊ธธ์ด๋ฅผ ๋Œ€์ถฉ ์žฌ๋Š” ๊ฒƒ๋„ ์—„์ฒญ ์ •๋ฐ€ํ•˜์ง€๋Š” ์•Š์€๋ฐ.
        • ๋‚˜๋Š” ๋ฒฝ์œผ๋กœ๋ถ€ํ„ฐ 60cm ๋–จ์–ด์ ธ์žˆ๋‹ค๊ณ  ํ•ด์•ผ ํ•˜๋‚˜..? 55cm ๋–จ์–ด์ ธ์žˆ๋‹ค๊ณ  ํ•ด์•ผ ํ•˜๋‚˜..? ๋ณดํญ๊ณผ ํŒ”๊ธธ์ด๊ธฐ๋ฐ˜์ธก์ • ์˜ ๊ฒฐ๊ณผ๋ฅผ ์„œ๋กœ ๋‹ค๋ฅธ ์‹ ๋ขฐ๋„์— ๊ธฐ๋ฐ˜ํ•ด์„œ ์–ด๋–ป๊ฒŒ ์ ์ ˆํžˆ ์ž˜ ์œตํ•ฉํ•  ์ˆ˜ ์—†์„๊นŒ? ๊ทธ๊ฒƒ์— ๋Œ€ํ•œ ์ˆ˜ํ•™์ ์ธ ๊ธฐ๊ณ„์  ๊ณผ์ •์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์ด KF๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.
    • ์ด์— ๋Œ€ํ•œ ๊ณต๋ถ€์ž๋ฃŒ๋Š” An Introduction to the Kalman Filter (2006 ver) ๋ฅผ ์ถ”์ฒœํ•œ๋‹ค.
      • KF ๊ณต๋ถ€์ž๋ฃŒ์•ผ ์›Œ๋‚™ ๋งŽ์ง€๋งŒโ€ฆ ์ด๊ฒŒ ๊ฐ€์žฅ ๋ถ„๋Ÿ‰๋„ ์ ์ ˆํ•œ ๋“ฏํ•˜๋‹ค (๋„ˆ๋ฌด ์ƒ๋žต๋˜์–ด์žˆ๊ฑฐ๋‚˜ ๋„ˆ๋ฌด ์“ธ๋ฐ์—†์ด ์ž…๋ฌธ์ž์—๊ฒŒ ๋ถˆํ•„์š”ํ•˜๊ฒŒ ๋งŽ์ง€์•Š๋‹ค).
      • 95๋…„์— ์ฒ˜์Œ ๋‚˜์˜จ report ์ธ๋ฐ ํ˜„์žฌ (2022.09) ๋ฌด๋ ค 10000ํšŒ ์ธ์šฉ์ด ๋„˜์—ˆ๋‹ค. ์ด report ๋Š” ๋˜๊ฒŒ ๊ฐ„๊ฒฐํ•œ ํŽธ์ด๋ฉฐ ๋”์šฑ ์ž์„ธํ•œ ์œ ๋„ ๋“ฑ์€ ์—ฌ๊ธฐ์— reference ๋“ค์ด ์ž˜ ์ถ”์ฒœ๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ (e.g., Maybeck79) ์ถ”๊ฐ€์ ์œผ๋กœ ๋” ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์œผ๋ฉด ์ฐธ๊ณ ํ•˜๋ฉด ์ข‹๋‹ค.
  • ์š”์•ฝํ•˜์ž๋ฉด KF๋Š” prior (์ €์งˆ๋Ÿฌ ๋ณธ ๊ฒƒ)์™€ measurement (์žฌ ๋ณธ ๊ฒƒ) ์‚ฌ์ด์˜ weighted sum (๋‘ ๊ฒฐ๊ณผ ํ† ๋Œ€๋กœ ์ˆ˜์ •ํ•œ ๊ฒƒ)์„ ํ•ด์ฃผ๋Š” ์žฅ์น˜์ด๋‹ค.
    • ์ด ๋•Œ ๊ณ ์ •๋œ ์ƒ์ˆ˜๋กœ ์œตํ•ฉํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ, a posteriori ์˜ covariance ๋ฅผ minimize ํ•˜๋Š” ๊ฒƒ์„ cost ๋กœ ํ•˜์—ฌ ์ตœ์  gain ์„ ๊ฒฐ์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค (๋”ฐ๋ผ์„œ Kalman gain ์€ blending factor๋ผ๊ณ ๋„ ๋ถˆ๋ฆฐ๋‹ค).
    • ์•”ํŠผ ํ•ต์‹ฌ์€ KF๋Š” ๋ฐฉ๊ธˆ ์„ค๋ช…ํ–ˆ๋“ฏ a posteriori ์˜ covariance ๋ฅผ minimize ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, optimal estimator ๋ผ๊ณ  ๋ถˆ๋ฆฐ๋‹ค.
      • ํ˜น์€ ์œ„ํ‚ค๋ฅผ ๋ณด๋ฉด, KF๋Š” linear quadratic estimation (LQE) ๋ผ๊ณ ๋„ ๋ถˆ๋ฆฐ๋‹ค๊ณ  ๋‚˜์™€์žˆ๋‹ค.
        • covariance ๋Š” ๊ทธ ์ •์˜์ƒ random variable error vector์˜ ์ œ๊ณฑ๊ผด์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
  • ์žก์ฐ
    • ps1. Philโ€™s Lab ์˜ ์œ ํŠœ๋ธŒ ์˜์ƒ๋„ KF์— ๋Œ€ํ•ด ์ •๋ง ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๊ฒŒ ์ž˜ ์„ค๋ช…ํ•ด์ค€๋‹ค. ์ถ”์ฒœ! (1ํŽธ, 2ํŽธ, 3ํŽธ, 4ํŽธ)
      • 2ํŽธ์—์„œ ์ƒ์ˆ˜ weight ๋น„์œจ๋กœ fusion ํ•˜๋Š” (e.g,, 0.5 and 0.5) complementary filter ๋ฅผ ๋จผ์ € ๋ณด์—ฌ์ฃผ๊ณ  EKF๋กœ ๋„˜์–ด๊ฐ€๋Š” ์Šคํ† ๋ฆฌ๊ฐ€ ์•„์ฃผ ์ผํ’ˆ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์‹ค์ œ๋กœ IMU ์„ผ์„œ ๋ฐ์ดํ„ฐ๋ฅผ ํ†ตํ•ด ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ฃผ๊ธฐ ๋•Œ๋ฌธ์— KF ๊ฐ€ ํ˜„์‹ค์„ธ๊ณ„์™€ ๋™๋–จ์–ด์ง„ ๋ฌด์–ธ๊ฐ€๋กœ ๋Š๊ปด์ง€์ง€ ์•Š๋Š”๋‹ค.
    • ps2. KF์—์„œ prior ๋ผ๋Š” ์šฉ์–ด๊ฐ€ ๊ผญ ๋งค์šฐ ์ตœ์ดˆ์˜ ์–ด๋–ค ์ •๋ณด๋งŒ์„ ์˜๋ฏธํ•˜์ง€๋Š” ์•Š๋Š”๋‹ค. KF๋Š” Bayesian filtering ์ด๋ฉฐ Bayesian filtering ์˜ ์ฒ ํ•™์€ ํ˜„์žฌ์˜ ์ตœ์ ๊ฐ’์ด, ๋‹ค์Œ ํ„ด์˜ ์‚ฌ์ „์ •๋ณด๊ฐ€ ๋œ๋‹ค, ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ์ฆ‰ ํ˜„์žฌ์˜ posterior ๊ฐ€ ๋‹ค์Œ ํ„ด์˜ prior ๋กœ์จ ์—ญํ• ํ•˜๋Š” ๊ฒƒ.
      • ๊ทธ๋‚˜์ €๋‚˜ Bayesian filtering ์ด์•ผ๊ธฐ๊ฐ€ ๋‚˜์˜จ ๊น€์—โ€ฆ KF๋Š” ์›๋ž˜ ์ƒ๋‹นํžˆ ์ตœ์ ํ™” ์Šค๋Ÿฌ์šด (== least square optimization ์Šค๋Ÿฌ์šด) ๋Š๋‚Œ์œผ๋กœ๋ถ€ํ„ฐ ์œ ๋„ ๋˜์—ˆ์ง€๋งŒ (๋ฐฉ๊ธˆ ๋งํ–ˆ๋“ฏ cov๋ฅผ ์ตœ์†Œํ™” ํ•˜๋„๋ก), ๊ทธ nature ๋ฅผ ๋“ค์—ฌ๋‹ค๋ณด๋ฉด Probabilisticํ•œ ๋ฉด์ด ์žˆ๋‹ค. ์ด ์ด์•ผ๊ธฐ๊ฐ€ The Probabilistic Origins of the Filter ๋ผ๋ฉด์„œ ์œ„์—์„œ ์ถ”์ฒœํ•œ ์ž๋ฃŒ์—๋„ ๋‚˜์˜จ๋‹ค. ๋˜๋Š” Sรคrkkรค, Simo. Bayesian filtering and smoothing. No. 3. Cambridge University Press, 2013. ์ด ์ฑ…์˜ ์•ž๋ถ€๋ถ„์„ ์ฐธ๊ณ  (์š”์•ฝ 1ํŽธ, ์š”์•ฝ 2ํŽธ).

EKF ํ†บ์•„๋ณด๊ธฐ

  • ์ด์ œ ์šฐ๋ฆฌ๋Š” KF์— ๋Œ€ํ•ด ์•Œ์•˜๋‹ค. ๊ทธ๋Ÿผ EKF๋กœ ๋„˜์–ด๊ฐ€๋ณด์ž.
    • (E-, ES-) KF๋ฅ˜๋ฅผ ๊ตฌ์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ฐ€์žฅ ๋จผ์ € system model์ด ์ •์˜๋˜์–ด์•ผ ํ•œ๋‹ค.
        1. process model ๊ณผ 2. measurement model ์ด ์žˆ๋‹ค.
    • ์•ž์„œ ๊ณต๋ถ€์ž๋ฃŒ An Introduction to the Kalman Filter (2006 ver) ์˜ ์‹ 1.1, 1.2 ์—์„œ์ฒ˜๋Ÿผ ์ด ๋ชจ๋ธ๋“ค์ด, ์šฐ๋ฆฌ๊ฐ€ ์•Œ๊ณ ์‹ถ์€ state ๋‚˜ measurement vector ์™€ ๊ทธ์ € matrix ๊ณฑ์œผ๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์œผ๋ฉด linear ํ•˜๋‹ค๋ผ๊ณ  ํ•œ๋‹ค.
    • ๊ทธ๋Ÿฐ๋ฐ ํ˜„์‹ค์„ธ๊ณ„์—์„œ๋Š” ๋‹ค์–‘ํ•œ ์ด์œ ๋“ค๋กœ ์ธํ•ด nonlinearity๊ฐ€ ์ƒ๊ธด๋‹ค.
      • state ๊ฐ€ nonlinear ํ•  ์ˆ˜ ์žˆ๋‹ค (e.g., rotation ์„ ์ถ”์ •ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ)
      • ํ˜น์€ measurement model ์ด nonlinear ํ•  ์ˆ˜ ์žˆ๋‹ค (e.g., ์ œ๊ณฑ, exponential ๋“ฑ๋“ฑ์ด ๋“ค์–ด๊ฐ€๋Š” ๋ณต์žกํ•œ ํ˜•ํƒœ)
    • ๊ทธ๋ž˜์„œ ์ด๋Ÿฐ nonlinear ํ•œ process model $f(\cdot)$ or observation model $h(\cdot)$ ์„ ํ…Œ์ผ๋Ÿฌ ๊ธ‰์ˆ˜๋กœ ํŽธ ๋‹ค์Œ์— 1์ฐจ ๊ทผ์‚ฌ (== linear term๋งŒ ๋‚จ๊น€) ํ•ด์„œ ์“ฐ๊ฒ ๋‹ค๋Š”๊ฒŒ EKF์ด๋‹ค.

ESKF ํ†บ์•„๋ณด๊ธฐ โ€ฆ ์ „์—

  • ๊ทธ๋Ÿผ EKF์™€ ESKF๋Š” ๋ฌด์—‡์ด ๋‹ค๋ฅธ๊ฐ€?
  • ์ด ์ด์•ผ๊ธฐ๋ฅผ ํ•˜๊ธฐ ์ „์— ์šฐ๋ฆฌ๋Š” ์ž ์‹œ KF ๋ผ๋Š” ๊ฒƒ ์ž์ฒด๋กœ๋ถ€ํ„ฐ ๋ฉ€์–ด์งˆ ํ•„์š”๊ฐ€ ์žˆ๋‹ค.
  • ์ฆ‰ ESKF ์™€ EKF๋Š” ์ด๋ ‡๊ฒŒ ๋‹ฌ๋ผ, ํ•˜๊ณ  ๊ทธ ๋ฌผ์งˆ์ ์ธ ๋ฉด์„ ๋ณด๊ณ  ์™ธ์šฐ๋Š” ๊ฒƒ๋ณด๋‹ค, ๋ฌด์—‡๋ณด๋‹ค ESKF๊ฐ€ ์™œ ํ•„์š”ํ•˜๊ฒŒ ๋˜์—ˆ๋Š”์ง€๋ฅผ ์‚ดํŽด๋ณด์ž๋Š” ๊ฒƒ์ด๋‹ค.
    • ํ‚ค์›Œ๋“œ ํžŒํŠธ: EKF on manifold
      • ์ฆ‰, manifold ์—์„œ EKF๋ฅผ ํ•˜๋ ค๋ฉด ๋ญ”๊ฐ€ ์ข€ ํŠน๋ณ„ํ•˜๊ฒŒ care ํ•ด์ค˜์•ผ ํ•  ๊ฒŒ ์žˆ๋‹ค๋Š” ๊ฒƒ์ธ๋ฐ. ์ด๊ฒŒ ๋ญ”์†Œ๋ฆฐ๊ฐ€ ํ•˜๋‹ˆ ์ฐจ์ฐจ ์•Œ์•„๋ณด์ž.
  • ์•ž์„œ KF๋„ optimal estimator ๋ผ๊ณ  ํ–ˆ๋‹ค. ์ฆ‰ covariance ๋ผ๋Š” squared loss ๋ฅผ ์ตœ์†Œํ™” ํ•˜๋Š” ์ตœ์ ํ™”๊ธฐ๊ธฐ ์ธ ๊ฒƒ์ด๋‹ค.
    • ์ฆ‰ ์ด๋ถ€๋ถ„์—์„œ KF๋Š” least square optimization ์˜ ๋Œ€ํ‘œ์ฃผ์ž์ธ Gauss-Netwon optimization (GN) ์„ ๋‹ฎ์•˜๋‹ค.
      • GN (or can be LM, just damping ์ด ์ถ”๊ฐ€๋œ GN)์ด ๋ณ€ํ™”๋Ÿ‰์ด ์–ด๋Š์ •๋„๋ณด๋‹ค ์ž‘์•„์งˆ ๋•Œ๊นŒ์ง€ ๊ณ„์† iteration ์„ ๋ฐ˜๋ณตํ•ด์„œ $\delta \textbf{x}^*$ ๋ฅผ ์ฐพ์•„๊ฐ€๋Š” ๊ฒƒ์ด๋ผ๋ฉด (for details, see the post: Nonlinear ICP ๋ฐ‘๋ฐ”๋‹ฅ๋ถ€ํ„ฐ ๊ตฌํ˜„ํ•ด๋ณด๊ธฐ),
      • KF๋Š” ์ตœ์ ์˜ weight ๋น„์œจ์„ ํ•œ๋ฐฉ์— ๋”ฑ ์ฐพ์•„๋‚ด์„œ ๋”ฑ ํ•œ๋ฒˆ๋งŒ update ํ•ด์ฃผ๋Š” GN optimizer ๋ผ๊ณ  ์ƒ๊ฐํ•ด๋ณผ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.
        • ps1. ์™„์ „ํžˆ ๊ฐ™๋‹ค๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ, ๊ทธ ๋Š๋‚Œ๋งŒ ๊ณต์œ ํ•˜์žโ€ฆ GN์—์„œ๋Š” ๋ช…์‹œ์ ์ธ prediction step์ด ์—†์œผ๋ฏ€๋กœ (๊ทธ์ € initial value๊ฐ€ ์ฃผ์–ด์ง) GN์€ ์—ฌ๋Ÿฌ measurement (squared) loss์˜ weighted sum์„ minimize ํ•˜๋Š” updator ๋ถ€๋ถ„๋งŒ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ด๋ณผ ์ˆ˜ ์žˆ๊ฒ ๋‹ค.
        • ps2. ๋ฌผ๋ก  KF์—์„œ๋„, ํ•œ๋ฒˆ์˜ propagate ์— ๋Œ€ํ•ด ์—ฌ๋Ÿฌ๋ฒˆ์˜ (์ˆ˜๋ ดํ•  ๋•Œ๊นŒ์ง€) update ๋ฅผ ํ•ด์ฃผ๋Š” ๋ฐฉ์‹์œผ๋กœ iterative ํ•˜๊ฒŒ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๊ธดํ•˜๋‹ค (์˜ˆ์‹œ: se3_localization_iekf)
    • ๊ทธ๋ž˜์„œ GN ์ด์•ผ๊ธฐ๋ฅผ ์ข€ ๋” ํ•ด๋ณด์ž.

GN ํ†บ์•„๋ณด๊ธฐ

  • GN์—์„œ ๊ฐœ๋… ์ž์ฒด๋Š” ๋„ˆ๋ฌด ๊ฐ„๋‹จํ•˜๋‹ค.
    • ๊ธฐ๋ณธ์ ์ธ ๊ฐœ๋…์— ๋Œ€ํ•ด์„œ๋Š” ๋Š˜ ์ถ”์ฒœํ•˜๋Š” Grisetti ๊ต์ˆ˜๋‹˜์˜ ICRA tutorial ์ž๋ฃŒ๋ฅผ ๋ณด๊ณ  ์˜ค๊ธฐ๋ฅผ ์ถ”์ฒœโ€ฆ ํ•˜๊ณ  ์—ฌ๊ธฐ์„œ๋Š” GN ์— ๋Œ€ํ•ด์„œ๋Š” ์„ค๋ช…ํ•˜์ง€ ์•Š๊ธฐ๋กœ ํ•˜๊ณ .
    • ๊ฒฐ๊ณผ๋งŒ ์ด์•ผ๊ธฐํ•˜์ž๋ฉด GN์ด๋ž€ ๊ทธ์ € $J^{T}J \delta \textbf{x} = -J^{T}e$ ๋ฅผ ํ‘ธ๋Š”๊ฒŒ ์ „๋ถ€์ด๋‹ค.
      • ์ด๊ฑธ ํ’€์–ด์„œ ๋‚˜์˜จ $\delta \textbf{x}^{*}$ ๋ฅผ ๊ธฐ์กด ํ•ด $\textbf{x}$ ์— ๋”ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  $\delta \textbf{x}$ ๊ฐ€ ์ถฉ๋ถ„ํžˆ ์ž‘๋‹ค๋ฉด ์ˆ˜๋ ดํ•œ ๊ฒƒ์œผ๋กœ ๋ณด๊ณ  iteration ์„ ์ข…๋ฃŒํ•˜๋ฉด ๋œ๋‹ค. ์ด๊ฑธ from scratch (๋ฐ‘๋ฐ”๋‹ฅ๋ถ€ํ„ฐ)๋กœ ๊ตฌํ˜„ํ•ด๋ณธ ๊ฒƒ์ด the previous post: Robust Optimization Tutorial.
    • ๊ทธ๋Ÿฐ๋ฐ ์ด๋ถ€๋ถ„์€ ์ •๋ง ๊ธฐ๊ณ„์ ์ธ ๋ถ€๋ถ„์ด๊ณ . ์ค‘์š”ํ•œ ์ง€์ ์€ ์ € $J$ ๋ž€๊ฒŒ ๋ญ๋ƒ, ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.
      • ps. (GN์—์„œ ๋ช…์‹œ์ ์ธ prediction ์€ ์—†์œผ๋ฏ€๋กœ) ์ผ๋‹จ measurement model ์— ๋Œ€ํ•ด์„œ๋งŒ J๊ฐ€ ๋ฌด์—‡์ธ์ง€ ์ด์•ผ๊ธฐํ•ด๋ณด์ž.
  • ์ œ์ผ ํฐ ๊ทธ๋ฆผ์œผ๋กœ ๋งํ•ด์„œ, $J$๋Š” ๊ธฐ์šธ๊ธฐ ์ด๋‹ค.
    • ์ด๊ฑด ๊ณ ๋“ฑํ•™๊ต ๋ฏธ๋ถ„์—์„œ๋„ ๋‚˜์˜ค๋Š” ๋‚ด์šฉ. ์–ด์ฉŒ๊ตฌ ์ €์ฉŒ๊ตฌ, ๋ฏธ๋ถ„ํ•ด์„œ 0์ด ๋˜๋Š” $x$๊ฐ€ ์ตœ์ ๊ฐ’ .. ์ด๋Ÿฐ ์ด์•ผ๊ธฐ๋Š” ์ต์ˆ™ํ•  ๊ฒƒ์ด๋‹ค.
    • ์ด ๋•Œ ๊ทธ ๋ฏธ๋ถ„ ๊ฐ’์ด ๊ณง $J$ ์— ํ•ด๋‹นํ•œ๋‹ค.
    • ๊ทธ๋ฆฌ์„ธํ‹ฐ ๊ต์ˆ˜๋‹˜์˜ ์Šฌ๋ผ์ด๋“œ ์—์„œ ์ด ์–˜๊ธฐ๋ฅผ ๋ฐœ์ทŒํ•ด์˜ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

    • ์—ฌ๊ธฐ์„œ ์•Œ ์ˆ˜ ์žˆ๋Š” ๊ฑด $J$๊ฐ€ ๊ธฐ์šธ๊ธฐ๋Š” ๊ธฐ์šธ๊ธฐ ์ธ๋ฐ, ์ข€ ๋” ์ž์„ธํžˆ ์„ค๋ช…ํ•˜์ž๋ฉด error (loss)์— ๋Œ€ํ•œ $\textbf{x}$ ์˜ ๊ธฐ์šธ๊ธฐ ๋ผ๋Š” ๊ฒƒ์ด๋‹ค. ์ด ๋•Œ ์กฐ์‹ฌํ•ด์•ผํ•˜๋Š” ๊ฒƒ์€, ๊ทธ๋ƒฅ ๊ธฐ์šธ๊ธฐ๋ผ๊ณ  ๋งํ•˜๋Š” ๊ฒƒ์€ too vague ํ•˜๋‹ค๋Š” ์ .
      • ์ฆ‰, $\textbf{x}$ ๊ฐ€ ๋ณ€ํ•  ๋•Œ cost ๊ฐ€ ์–ผ๋งˆ๋‚˜ ๋ณ€ํ™” ํ•˜๋Š๋ƒ ์— ๊ด€ํ•œ ๊ฒƒ์ด๋‹ค.
        • ps. $J$๋Š” $k$ by $n$ matrix ๊ฐ€ ๋˜๋Š”๋ฐ, $k$๋Š” cost vector ์˜ dimension, $n$์€ ์˜ˆ์ธกํ•˜๊ณ ์ž ํ•˜๋Š” state vector์˜ dimension์ด๋‹ค.
          • ์—ญ์‹œ, ์•ž์„  ํฌ์ŠคํŠธ์—์„œ ์‹ค์Šต์„ ํ†ตํ•ด์„œ ์ด shape ์„ ์ง์ ‘ ๋Š๋ผ๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•จ: Robust Optimization Tutorial
  • ๊ทธ๋Ÿฐ๋ฐ Grisetti ๊ต์ˆ˜๋‹˜์˜ ICRA tutorial ์ž๋ฃŒ ์—์„œ ์ตœ์ข…์ ์œผ๋กœ ํ•˜๋Š” ๋ง์€ ๊ฒฐ๊ตญ ์ด๊ฒƒ์ด๋‹ค.
    • state ์— nonlinear ํ•œ element ๊ฐ€ ์žˆ๋‹ค๋ฉด, ๊ทธ๊ฒƒ์˜ tangent space ์—์„œ update ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.
    • ์ด๊ฒŒ ๋ญ” ๋ง์ธ๊ณ  ํ•˜๋‹ˆ, ์˜ˆ๋ฅผ ๋“ค์–ด ๋ณด๋ฉด
      • 3์ฐจ์› ๊ณต๊ฐ„์—์„œ rotation ์€ ๋ณดํ†ต SO(3) ๋กœ ํ‘œํ˜„๋˜๋ฉฐ ์ด๋Š” 3 by 3 matrix ์ด๋‹ค. rotation์„ ์ตœ์ ํ™” ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ด๋ฅผ 9-dimension vector ๋กœ ๋งŒ๋“ค๊ณ , ์ด 9๊ฐœ์˜ ๊ฐ’์„ ์กฐ๊ธˆ์กฐ๊ธˆ์”ฉ ์กฐ์ ˆํ•ด์„œ cost ์กฐ์ ˆํ•ด๋‚˜๊ฐ€๋ฉด ๋ ๊นŒ? ์ฆ‰ $J$๊ฐ€ $k$ by $9$ ๊ฐ€ ๋˜๋„๋ก (state ์—๋Š” rotation ๋งŒ ์žˆ๋‹ค๊ณ  ์น˜์ž) $J$๋ฅผ ๊ณ„์‚ฐํ•ด๋‚˜๊ฐ€๋ฉด ๋ ๊นŒ?
      • ๊ทธ๋Ÿฌ๋ฉด ์•ˆ๋œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.
      • ์ด๋Ÿฐ nonlinear entity (e.g,. rotation) ๋“ค์€ vector space ๊ฐ€ ์•„๋‹ˆ๋ฏ€๋กœ, ๊ธฐ์กด์˜ ๊ธฐ๊ณ„์ ์ธ GN pipeline ์— ๋ฐ”๋กœ ์ ์šฉํ•  ์ˆ˜ ์—†๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.
    • ๊ทธ๋ž˜์„œ ํ•ด๊ฒฐ๋ฒ•์€,
      • nonlinear entity ์˜ ์ ‘ํ‰๋ฉด ๊ณต๊ฐ„ (tangent space)๋Š” ๊ตญ์†Œ์ ์œผ๋กœ vector space๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ
        1. ๊ทธ ์ ‘ํ‰๋ฉด ๊ณต๊ฐ„์— ์‚ฌ๋Š”(live) variable ์— ๋Œ€ํ•œ error ์˜ ๊ธฐ์šธ๊ธฐ๋ฅผ ๊ณ„์‚ฐํ•ด์ฃผ์ž๋Š” ๊ฒƒ์ด๋‹ค!
          • ์˜ˆ๋ฅผ ๋“ค์–ด rotation ์€ ๊ตญ์†Œ์ ์œผ๋กœ angle-axis ๋ผ๋Š” 3-dim vector ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค.
        2. ๊ทธ๋Ÿฌ๋ฉด cost ๋ฅผ ์ตœ์†Œํ™”ํ•˜๋ ค๋ฉด ์ ‘ํ‰๋ฉด ์—์„œ ๋ณ€์ˆ˜๋ฅผ ์–ผ๋งˆ๋‚˜ ์กฐ์ ˆํ•ด์•ผํ•˜๋Š”์ง€ ์•Œ ์ˆ˜ ์žˆ๋‹ค.
          • ps. ์ด ์ ‘ํ‰๋ฉด์— ์‚ฌ๋Š” ๋ณ€์ˆ˜๋ฅผ ์ผ์ปฌ์–ด Ceres ์—์„œ๋Š” local parametrization ๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค (2.2.0๋ถ€ํ„ฐ๋Š” ์ด๋ฆ„์ด manifold๋กœ ๋ฐ”๋€Œ์—ˆ๋‹ค).
        3. ๊ทธ๋Ÿฐ ๋‹ค์Œ, ์ ‘ํ‰๋ฉด ๊ณต๊ฐ„์— ์‚ฌ๋Š” ๋ณ€์ˆ˜์™€ ์›๋ž˜ ๊ณต๊ฐ„(nonlinear)์— ์‚ฌ๋Š” ๋ณ€์ˆ˜ ์‚ฌ์ด์—๋Š” ์ž˜ ์•Œ๋ ค์ง„ ๊ด€๊ณ„๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ์›๋ž˜ ๊ณต๊ฐ„์—์„œ ์–ผ๋งˆ๋‚˜ ํ•ด๋ฅผ ์กฐ์ ˆํ•ด์•ผ ํ•˜๋Š”์ง€ ์•Œ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.
          • ps. ์ด๋ ‡๊ฒŒ ์›๋ž˜์˜ ๊ณต๊ฐ„์œผ๋กœ ์ตœ์ ์กฐ์ ˆ๋ถ„๋Ÿ‰์„ ๋Œ๋ ค๋ณด๋‚ด๋Š” ๊ฒƒ์„ retraction ์ด๋ผ๊ณ  ํ•œ๋‹ค.
      • ๊ด€๋ จ ์‹ค์Šต
        • ์ด๋ฏธ ์•ž์„  ํฌ์ŠคํŠธ Robust Optimization Tutorial ์—์„œ SymForce๋ฅผ ์ด์šฉํ•ด์„œ ์œ„์˜ 1-3 step ์„ ๊ฑฐ์ณ rotation ์„ ์ตœ์ ํ™” ํ•ด๋ณธ ๋ฐ” ์žˆ๋‹ค. ์•„๋ž˜ ์ฝ”๋“œ์ฒ˜๋Ÿผ rotation ์„ 3-dim vector๋กœ parametrization ํ–ˆ์—ˆ์—ˆ๋‹ค. (ps. SymForce ์˜ ์žฅ์ ์€, ์ ‘ํ‰๋ฉด์—์„œ ๊ทธ๋ž˜์„œ ๊ธฐ์šธ๊ธฐ๋ฅผ ์–ด๋–ป๊ฒŒ ๊ณ„์‚ฐํ•ด? ์™€ ๊ฐ™์€ ์ˆ˜ํ•™์ ์ธ ๋ถ€๋ถ„์„ ๊ธฐ๊ณ„์ ์œผ๋กœ ์ž๋™ํ™”+์ตœ์ ํ™” ํ•˜์—ฌ ์—”์ง€๋‹ˆ์–ด๊ฐ€ ์‹ ๊ฒฝ์“ฐ์ง€ ์•Š์•„๋„ ๋˜๊ฒŒ ํ•œ ๊ฒƒ)
          rotvec   = sf.V3.symbolic("Theta") # i.e., angle-axis parametrization
          rotmat   = LieGroupOps.from_tangent(sf.Rot3, rotvec) # for debug, display(rotmat.to_rotation_matrix())
          
      • ๊ด€๋ จ ๋…ผ๋ฌธ
        1. ๋ฐฉ๊ธˆ ํ•œ 1-3 step์— ๊ด€ํ•œ ์ด์•ผ๊ธฐ์— ๋Œ€ํ•œ ์ •๋ง ์ž์„ธํ•œ ์ด์•ผ๊ธฐ๋Š” A micro Lie theory for state estimation in robotics ์—์„œ ์†Œ๊ฐœ๋˜๊ณ  ์žˆ๋‹ค.
          • ์ด ๋ฆฌํฌํŠธ๋ฅผ ๋ฐ”๋กœ ๋ณด๋ฉด ์˜จ๊ฐ– ์ˆ˜ํ•™๊ธฐํ˜ธ๊ฐ€ ๊ดœํžˆ ์–ด๋ ต๊ฒŒ ๋Š๊ปด์งˆ ์ˆ˜ ์žˆ์ง€๋งŒ, ํ•ต์‹ฌ์€ ์œ„์˜ 1-3์ด ์ „๋ถ€๋ผ ์ƒ๊ฐํ•œ๋‹ค.
        2. Kalman Filters on Differentiable Manifolds ์—๋„ ๊ด€๋ จ ์„ค๋ช…์ด ์ž˜ ๋‚˜์™€์žˆ๋‹ค. ์•„๋ž˜ ๊ทธ๋ฆผ์ด ์œ„์˜ step 1-3 ์„ ์‹œ๊ฐํ™” ํ•œ ๊ฒƒ.

  • ์•„๋ฌดํŠผ ์ด๋Ÿฌํ•œ ์ด์œ ๋กœ ์ธํ•ด, Grisetti ๊ต์ˆ˜๋‹˜์˜ ICRA tutorial ์ž๋ฃŒ ์—์„œ๋Š” ์ตœ์ข…์ ์œผ๋กœ non-manifold ๋ฒ„์ „์˜ GN๊ณผ manifold ๋ฒ„์ „์˜ GN ๋‘๊ฐœ๋ฅผ ๋น„๊ตํ•˜๋Š” ๊ฒƒ์„ ๋ณด์—ฌ์ค€๋‹ค.
    • ์—ฌ๊ธฐ์„œ ์šฐ๋ฆฌ๊ฐ€ ๋ด์•ผํ•  ๋ถ€๋ถ„์€, ๊ทธ๋ž˜์„œ ๊ทธ ๋‘ ๊ฐœ๊ฐ€ ๋ญ๋Š” ๊ฐ™๊ณ  ๋ญ๊ฐ€ ๋‹ค๋ฅด๋ƒ? ํ•˜๋Š” ์ ์ด๋‹ค.
      • ๋ฏธ๋ฆฌ ์Šคํฌ๋ฅผ ํ•˜์ž๋ฉด, ๊ทธ๊ฒŒ ๊ณง EKF์™€ ESKF๊ฐ€ ๋ญ๊ฐ€ ๊ฐ™๊ณ  ๋ญ๊ฐ€ ๋‹ค๋ฅด๋ƒ? ํ•˜๋Š” ์งˆ๋ฌธ๊ณผ ์ผ๋งฅ์ƒํ†ตํ•œ๋‹ค.
    • ๋น„๊ต

      • ๊ฒฐ๋ก ๋ถ€ํ„ฐ ๋งํ•˜์ž๋ฉด ๋‘ ๋ถ€๋ถ„ ๋นผ๊ณ  ์ „์ฒด ๊ธฐ๊ณ„์ ์ธ ํŒŒ์ดํ”„๋ผ์ธ ์ž์ฒด๋Š” ์™„์ „ํžˆ ๋™์ผํ•˜๋‹ค.
        • ๋‹ค๋ฅธ ๋ถ€๋ถ„ 1: ๋นจ๊ฐ• ๋ถ€๋ถ„. non-manifold ๋ฒ„์ „์—์„œ๋Š” x์™€ dx ๊ฐ€ ๋™์ผํ•œ ๊ณต๊ฐ„ (e.g., $R^n$)์— ์‚ด๊ณ  ์žˆ์œผ๋ฏ€๋กœ ๊ทธ์ € ๋”ํ•˜๊ณ  ๋นผ๋ฉด ๋˜์—ˆ๋‹ค๋ฉด, manifold ๋ฒ„์ „์—์„œ๋Š” x์™€ dx ๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ๊ณต๊ฐ„ (homeomorphic ํ•˜๋‹ค๊ณ  ํ•œ๋‹ค) ์— ์‚ด๊ณ  ์žˆ์œผ๋ฏ€๋กœ ๋ฐ”๋กœ ๋”ํ•ด์ค„ ์ˆ˜ ์—†๊ณ , ์•ฝ๊ฐ„์˜ ๋ณ€ํ™˜์„ ๊ฑฐ์ณ ๋”ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. ์ด๋ฅผ ํŽธ์˜์ƒ boxminus ์™€ boxplus ๋กœ ํ‘œ์‹œํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ. ์‹ค์ œ ์—ฐ์‚ฐ์„ ์œ„ํ•ด์„œ๋Š” $\text{Exp}(\cdot)$, $\text{Log}(\cdot)$ ์ด๋Ÿฐ ์ด์•ผ๊ธฐ๊ฐ€ ๋‚˜์˜ค๊ฒŒ ๋˜๋Š”๋ฐ โ€ฆ ์ž์„ธํ•œ ์„ค๋ช…์€ ์—ฌ๊ธฐ์„œ๋Š” ์ƒ๋žตํ•˜๊ณ  A micro Lie theory for state estimation in robotics ๋ฅผ ๋ณด๊ธฐ๋ฅผ ์ถ”์ฒœํ•จ.
        • ๋‹ค๋ฅธ ๋ถ€๋ถ„ 2: ํŒŒ๋ž‘ ๋ถ€๋ถ„. Jacobain ๊ณ„์‚ฐ์ด ๋‹ฌ๋ผ์ ธ์•ผ ํ•œ๋‹ค. ์•ž์„œ Jacobian์€ error์— ๋Œ€ํ•œ ์กฐ์ ˆํ•˜๊ณ ์‹ถ์€ ๋ณ€์ˆ˜์˜ ๊ธฐ์šธ๊ธฐ, ๋ผ๊ณ  ์ด์•ผ๊ธฐํ–ˆ์—ˆ๋‹ค.
          • ์ฆ‰, error ์˜ ์กฐ์ ˆ๋Ÿ‰์ด, ์–ด๋–ค ๋ณ€์ˆ˜์— ๋Œ€ํ•œ ๊ฒƒ์ธ๊ฐ€? ๊ฐ€ ๋ช…์‹œ๋˜์–ด์•ผ ํ•œ๋‹ค.
          • manifold(์›๋ž˜ ๊ณต๊ฐ„) ์—์„œ์˜ variable ์— ๋Œ€ํ•œ๊ฒƒ์ธ๊ฐ€? or tangent space ์—์„œ์˜ variable ์— ๋Œ€ํ•œ๊ฒƒ์ธ๊ฐ€? ์˜ ์ฐจ์ด๊ฐ€ ์œ„ ๊ทธ๋ฆผ์—์„œ ํŒŒ๋ž‘ ๋ถ€๋ถ„์ด๋‹ค.
          • ์˜ˆ๋ฅผ ๋“ค์–ด, ์œ„ ์˜ˆ์‹œ์—์„œ Jacobian์€ ์•„๋ž˜์™€ ๊ฐ™์ด ๋‹ฌ๋ผ์ง€๊ฒŒ ๋œ๋‹ค.

            • ์ด๋Š” ์œ„ ํŠœํ† ๋ฆฌ์–ผ์—์„œ ์†Œ๊ฐœํ•˜๋Š” ICP๋ผ๋Š” application์— ํ•œ์ •๋œ ํ•˜๋‚˜์˜ ์˜ˆ์‹œ์ด๊ณ โ€ฆ
              • A micro Lie theory for state estimation in robotics ์—์„œ ํ•จ๊ป˜ ๊ณต๊ฐœํ•œ manif ๋ผ๋Š” library๋Š” robotics ์—์„œ ํ”ํ•œ ๊ธฐ๋ณธ์ ์ธ ์—ฐ์‚ฐ๋“ค์— ๋Œ€ํ•ด ์ด๋Ÿฐ Jacobian๋“ค์„ ์—ฎ์–ด๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋Š” ๋จธ์‹œ๋„ˆ๋ฆฌ๋ฅผ ์ œ๊ณตํ•œ๋‹ค.

ESKF ํ†บ์•„๋ณด๊ธฐ

  • ESKF ๊ฐ€ ํ•„์š”ํ•˜๊ฒŒ ๋œ ์ด์œ ์— ๋Œ€ํ•ด์„œ ์ด์ œ ๋งํ•  ์ˆ˜ ์žˆ๊ฒ ๋‹ค.
    • Intro์—์„œ OpenVINS๋‚˜ FAST_LIO๊ฐ™์€ state estaimation application ์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐํ–ˆ์œผ๋ฏ€๋กœ, ์—ฌ๊ธฐ์— ํ•œ์ •ํ•ด์„œ ์ƒ๊ฐํ•ด๋ณด์ž.
  • robot state estimation ์„ ํ•˜๋‹ค๋ณด๋ฉด rotation์ด ํ•ญ์ƒ ๋ฌธ์ œ์ด๋‹ค. rotation์€ nonlinear ํ•˜๋‹ค.
  • ๊ทธ๋ž˜์„œ rotation์ด ๋“ค์–ด๊ฐ„ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด์„œ๋Š” ํ†ต์ƒ์ ์œผ๋กœ ์ด๋Ÿฐ ๊ณผ์ •์„ ๊ฑฐ์นœ๋‹ค.
    1. ์ข‹์€ initial ์„ ๊ณต๊ธ‰ํ•œ๋‹ค.
    2. rotation์„ tangent space parametrization ์œผ๋กœ ํ‘œํ˜„ํ•˜์—ฌ, ๊ทธ ๊ณต๊ฐ„์—์„œ ์ตœ์ ํ™”๋ฅผ ์ˆ˜ํ–‰ํ•œ ํ›„, retract(==์›๋ž˜ ๊ณต๊ฐ„์œผ๋กœ ๋ณด๋‚ธ๋‹ค) ํ•œ๋‹ค.
  • ESKF๋„ ๊ฐ™์€ ๋งฅ๋ฝ์ธ ๊ฒƒ์ด๋‹ค.
    • EKF๋ฅผ ํ•˜๊ณ  ์‹ถ์€๋ฐ, ์šฐ๋ฆฌ๊ฐ€ ์˜ˆ์ธกํ•˜๊ณ  ์‹ถ์€ staet vector์— rotation์ด ๋“ค์–ด์žˆ๋‹ค.
    • ๊ทธ๋ž˜์„œ rotation์„ minimal (i.e,. 3-dim) ๋กœ reparametrization ํ•˜๊ณ , ์ด ๊ณต๊ฐ„์—์„œ KF update ๋ฅผ ์ˆ˜ํ–‰ํ•˜์ž๋Š” ๊ฒƒ.
    • ์ฆ‰ error-state ๋ž€ ์•ž์„œ GN์˜ˆ์ œ์—์„œ ์†Œ๊ฐœํ•œ tangent space์—์„œ ์‚ด๊ณ  ์žˆ๋Š” ๋ณ€์ˆ˜, ๋กœ ์ดํ•ดํ•˜๋ฉด ์‰ฌ์šธ ๊ฒƒ์ด๋‹ค.
  • ๊ทผ๋ฐ ๊ทธ๋ž˜์„œ EKF์—์„œ ์–ด๋–ค ๋ถ€๋ถ„์„ ๋‹ค๋ฅด๊ฒŒ ํ•ด์ฃผ์–ด์•ผ ํ•˜๋ƒ? ๋ฐฉ๊ธˆ ์œ„์—์„œ ๋น„๊ตํ•ด์˜จ ๊ฒƒ๊ณผ ์™„์ „ ๋™์ผํ•˜๋‹ค.
    1. J ๋ฅผ error state ์ „์šฉ์œผ๋กœ ๊ณ„์‚ฐํ•ด์ค€๋‹ค.
    2. ๊ธฐ์กด EKF pipeline ์— ๊ทธ๋Œ€๋กœ ํƒœ์šด๋‹ค.
    3. $\delta \textbf{x}^*$ ๋ฅผ ์›๋ž˜ ๊ณต๊ฐ„์˜ initial ํ•ด์— boxplus (oplus๋กœ๋„ ์”€. ์‹ค์ œ๋กœ๋Š” $\text{Exp}$ ์—ฐ์‚ฐ.) ๋ฅผ ํ†ตํ•ด ๋”ํ•ด์ค€๋‹ค.
  • ์ด ์–˜๊ธฐ๊ฐ€ A micro Lie theory for state estimation in robotics ๋…ผ๋ฌธ์—๋Š” ์ด๋ ‡๊ฒŒ ์„ค๋ช…๋˜์–ด ์žˆ๋‹ค.

    • ์•ž์„œ ์ดํ•ด๋ฅผ ๋•๊ธฐ ์œ„ํ•ด ๋จผ์ € ์†Œ๊ฐœํ•œ GN ์˜ˆ์ œ์—์„œ๋Š” prediction ๋ถ€๋ถ„์€ ์—†์œผ๋ฏ€๋กœ, correction ๋ถ€๋ถ„์„ ์œ„์ฃผ๋กœ ๋น„๊ตํ•ด๋ณด๋ฉด ์ดํ•ดํ•˜๊ธฐ ์ข‹์„ ๊ฒƒ์ด๋‹ค.
      • ์ผ๋ถ€๋Ÿฌ ์•ž์˜ GN ์˜ˆ์ œ์—์„œ ์‚ฌ์šฉํ•˜์˜€๋˜ ๋ถ€๋ถ„๊ณผ ๊ฐ™์€ ๊ฐ•์กฐ์ƒ‰๊น”์„ ์‚ฌ์šฉํ•˜์˜€๋‹ค.
    • ์ด ๋…ผ๋ฌธ์—์„œ๋„ EKF์™€ ESKF๊ฐ€ (correction step์—์„œ) ๋‹ค๋ฅธ ์ ์€ ๋”ฑ ๋‘๊ฐ€์ง€๋ผ๊ณ  ์ด์•ผ๊ธฐํ•˜๊ณ  ์žˆ๋‹ค. (์œ„ ๊ทธ๋ฆผ์—์„œ ๋นจ๊ฐ• ๋ฐ‘์ค„ ์นœ ๋ถ€๋ถ„)
      1. manifold ์™€ tangent space ์‚ฌ์ด์˜ ์—ฐ์‚ฐ์„ ํ•  ์ˆ˜ ์žˆ๋Š” oplus ์‚ฌ์šฉ
      2. Jacobian์„ tangent space์—์„œ ๊ณ„์‚ฐ
        • ps. correction (update) step์—์„œ ์‚ฌ์šฉํ•˜๋Š” measurement model์„ ๋ณดํ†ต $h(\cdot)$ ์œผ๋กœ ๋งŽ์ด ์“ฐ๊ธฐ ๋•Œ๋ฌธ์—, $ error = h(\cdot) - z $ ์˜ ๋ฏธ๋ถ„์„ $H$ ๋กœ ํ‘œ๊ธฐํ•˜์˜€๋‹ค (z๋Š” ์ƒ์ˆ˜์ด๋ฏ€๋กœ ๋‚ ์•„๊ฐ€๊ณ ). ์ฆ‰ ์—ฌ๊ธฐ์„œ H ๋Š” Hessian ($= J^T J$) ์ด ์•„๋‹ˆ๋ผ, ์•ž์„œ ์ด์•ผ๊ธฐํ•ด์™”๋˜ $J$ ์ด๋‹ค! ํ—ท๊ฐˆ๋ฆฌ์ง€ ์•Š๋„๋ก ๋ฌธ๋งฅ์„ ์ž˜ ์‚ดํ”ผ์ž.
        • $H$ (i.e,. $J$) ๊ฐ€ Lie theory ๋ฅผ ํ†ตํ•ด ๊ณ„์‚ฐ๋˜๊ณ , ์ด๊ฒƒ์ด ๊ฒฐ๊ณผ์ ์œผ๋กœ $K$์— ์˜ํ–ฅ์„ ์ฃผ๊ฒŒ ๋œ๋‹ค. ์ฆ‰, tangent space์—์„œ์˜ blending factor ๋ฅผ ์ž˜ ๊ณ„์‚ฐํ•ด์ฃผ๋Š” ๊ฒƒ์ด๋‹ค.
    • ์œ„์˜ ์˜ˆ์‹œ๊ฐ€ ์ฝ”๋“œ๋กœ๋„ ์žˆ๋‹ค: manif/examples/se2_localization.py
      • ์‹ค์ œ๋กœ Jacobian๋ถ€๋ถ„์€ manif ๊ฐ€ ์•Œ์•„์„œ ํ•ด์ฃผ๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, retract ํ•˜๋Š” ๋ถ€๋ถ„ (i.e,. + SE2Tangent(dx)) ์„ ์ œ์™ธํ•˜๋ฉด ์ฝ”๋“œ ์ƒ์—์„œ ๊ฒ‰๋ณด๊ธฐ๋กœ๋Š” EKF์™€ ํฌ๊ฒŒ ๋‹ค๋ฅผ ๋ฐ”๊ฐ€ ์—†๊ฒŒ ๋Š๊ปด์ง„๋‹ค.
    • Note:
      • ๋ฌผ๋ก  GN๊ณผ ๋‹ฌ๋ฆฌ (ES)KF์—๋Š” prediction step ์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ์ด ๋•Œ tangent space ์— ์‚ด๊ณ  ์žˆ๋Š” ๋ณ€์ˆ˜(==error state)์˜ covariance๋ฅผ propagation ํ•˜๋Š” ๊ณผ์ •์ด ์ถ”๊ฐ€์ ์œผ๋กœ ํ•„์š”ํ•˜๋‹ค. ๊ทธ๊ฒƒ์ด ์œ„์˜ ๊ทธ๋ฆผ์—์„œ ์™ผ์ชฝ ๋ถ€๋ถ„์— ํ•ด๋‹นํ•˜๋Š” ๊ฒƒ์ด๊ณ , ์—ฌ๊ธฐ์„œ $P$๋Š” error-state ์˜ covariance ์ž„์„ ์ฃผ์˜ํ•˜์ž.
        • ๊ฒฐ๊ตญ ์ด๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” error-state ์— ๋Œ€ํ•œ (discrete-time) kinematics ๋ฅผ ์œ ๋„ํ•˜๊ธด ํ•ด์•ผ ํ•œ๋‹ค. (์ฆ‰, process model์„ error state version์œผ๋กœ ๋งŒ๋“ค์–ด์•ผ ํ•จ)
        • ์ด ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ๋Š” Quaternion kinematics for the error-state Kalman filter ์— ์•„๋ž˜์™€ ๊ฐ™์ด ์ž˜ ์„ค๋ช…๋˜์–ด ์žˆ์Œ. ์ž์„ธํ•œ ์„ค๋ช…์€ ํ•ด๋‹น ๋ฌธ์„œ๋ฅผ ๋ณด์‹œ๊ธธ โ€ฆ

  • ps.
    • Error-state space (tangent space) ์—์„œ์˜ Jacobian ๊ณ„์‚ฐ๋ฒ•์— ๊ด€๋ จํ•˜์—ฌ, Quaternion kinematics for the error-state Kalman filter ์— ์ข€ ๋” ์ž์„ธํ•˜๊ฒŒ ์„ค๋ช…์ด ๋˜์–ด ์žˆ๋‹ค.

      • ์—ฌ๊ธฐ์„œ $H$๋Š” ์•ž์„œ ๊ณ„์† ๋งํ–ˆ๋“ฏ, Jacobian, ๊ธฐ์šธ๊ธฐ, ์ฆ‰ tangent space์—์„œ ๋ณ€์ˆ˜๋ฅผ ์กฐ์ ˆํ•˜๋ฉด error cost ๊ฐ€ ์–ผ๋งˆ๋‚˜ ๋ณ€ํ• ๊นŒํ•˜๋Š” ์ €๋„. Chain rule ๋กœ ์ด๊ฑธ x ์— ๊ด€ํ•œ ๋ฏธ๋ถ„๊ณผ dx ์— ๊ด€ํ•œ ๋ฏธ๋ถ„์˜ ๋‘ term์œผ๋กœ ์ชผ๊ฐœ์–ด ๋ณด์•˜๋‹ค (์‹ 277).
      • ๊ทธ๋Ÿฐ๋ฐ ์‹ 279๋ฅผ ๋ณด๋ฉด rotation term ์™ธ์—๋Š” ๋ชจ๋‘ identity ์ž„์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ์ฆ‰, ์˜ˆ๋ฅผ ๋“ค์–ด, ์˜ˆ๋ฅผ ๋“ค์–ด translation ๋ถ€๋ถ„์€ vector space์ด๊ธฐ ๋•Œ๋ฌธ์— ์›๋ž˜ ๊ณต๊ฐ„๊ณผ tangent space ๊ฐ€ ๋™์ผํ•œ ๊ฒƒ.

๊ฒฐ๋ก 

  • ์›น์—์„œ error-state kf ๋ผ๊ณ  ๊ฒ€์ƒ‰ํ–ˆ์„ ๋•Œ, ์ž๋ฃŒ๊ฐ€ ๋งŽ์ด ๋‚˜์˜ค์ง€ ์•Š์•„ ๊ฒธ์‚ฌ๊ฒธ์‚ฌ ์ •๋ฆฌํ•ด๋ณด๊ฒŒ ๋˜์—ˆ๋‹ค.
  • ์š”์•ฝ
    1. ESKF๋Š” rotation ๋“ฑ nonlinear ํ•œ state element ๋“ค์„ ํšจ๊ณผ์ ์œผ๋กœ ์ตœ์ ํ™” ํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค.
      • ์ฆ‰. On-manifold EKF ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋‹ค. (vector space์ธ) tangent space ์—์„œ ์ตœ์ ๊ฐ’์„ ๊ตฌํ•œ ํ›„ ์›๋ž˜ space๋กœ ์˜ฌ๋ ค์ค€๋‹ค.
    2. EKF๋‚˜ ESKF ๊ธฐ๊ณ„์ ์ธ ํ˜•ํƒœ๋Š” ๊ฐ™๋‹ค. (์˜ˆ์‹œ: manif/examples/se2_localization.py)
    3. ๋‹ค๋ฅธ ์ 
      1. prediction step: error state ์— ๋Œ€ํ•ด process model ์„ ์„ธ์›Œ์ฃผ์–ด์•ผ ํ•œ๋‹ค. ์ด๋ฅผ ์ด์šฉํ•ด์„œ error state ์˜ covariance ๋ฅผ propagate ํ•ด์ค€๋‹ค.
      2. correction step: Jacobian์„ nominal state ์— ๋Œ€ํ•ด ๊ตฌํ•˜๋Š” ๊ฒƒ์ด๋ƒ error state ์— ๋Œ€ํ•ด ๊ตฌํ•˜๋Š” ๊ฒƒ์ด๋ƒ ํ•˜๋Š” ๊ฒƒ์ด EKF์™€ ESKF์˜ ์ฐจ์ด์ด๋‹ค. ๊ฒฐ๊ณผ์ ์œผ๋กœ Kalman gain $K$ ๊ฐ€ tangent space ์—์„œ weight blending ์„ ์ž˜ ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์ง„๋‹ค.
  • ์ถ”์ฒœ์ž๋ฃŒ ์ •๋ฆฌ
    1. Quaternion kinematics for the error-state Kalman filter
    2. A micro Lie theory for state estimation in robotics
    3. Kalman Filters on Differentiable Manifolds
      • ์œ„ 3๊ฐœ๋ฅผ ์ˆœ์„œ๋Œ€๋กœ ๋ณด๋Š” ๊ฒƒ์ด ์ข‹์„ ๋“ฏ ํ•˜๋‹ค.
        • ์œ„ ์„ธ ๋…ผ๋ฌธ๋“ค์ด robot state estimation ๋ฌธ์ œ๋ฅผ ์ค‘์ ์ ์œผ๋กœ ๋‹ค๋ฃจ๊ณ  ์žˆ๊ณ , error-state / tangent space / manifold / Lie theory ์™€ ๊ฐ™์€ ๊ฐœ๋…๋“ค์ด ํ•œ๋ฐ ๋‚˜์˜ค๊ธฐ ๋•Œ๋ฌธ์— ์ข‹์€ ๋“ฏํ•˜๋‹ค.
        • ๋ณด๋Š” ์ˆœ์„œ์˜ ์ด์œ ๋Š” 1,2,3 ์ˆœ์œผ๋กœ ์„ค๋ช…์ด ๋” ์นœ์ ˆํ•œ ๋“ฏ ํ•˜๊ธฐ ๋•Œ๋ฌธ.
      • others
        • FAST-LIVO ๋…ผ๋ฌธ์„ ๋ณด๋ฉด, an iterative optimization has been proven to be equivalent to an iterated Kalman filter [21]. ์ด๋Ÿฐ ๋ง์ด ์žˆ๋‹ค. 93๋…„๋„ The Iterated Kalman Filter Update as a Gauss-Newton Method ๋ผ๋Š” ๋…ผ๋ฌธ. ESKF์™€ GN ์‚ฌ์ด์˜ ๊ด€๊ณ„์— ๋Œ€ํ•ด ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๊ฒ ๋‹ค.
  • ps.
    • ์œ ์‚ฌํ•˜๊ฒŒ GN ๊ด€์ ์—์„œ imu kinematics ๋ฅผ on-manifold ์—์„œ ๋‹ค๋ฃจ๋Š” ์‹œ๋„ ์ค‘ ๊ฐ€์žฅ ์œ ๋ช…ํ•œ ๋ฐฉ๋ฒ•์€ IMU Preintegration on Manifold for Efficient Visual-Inertial Maximum-a-Posteriori Estimation ์ด๋‹ค.
      • ์ด ๋ฐฉ๋ฒ•๊ณผ ๊ฐ™์€ batch (sliding window ํฌํ•จ) ์ตœ์ ํ™” ์ž…์žฅ์—์„œ๋Š” recursive nature ๊ฐ€ ์—†๊ธฐ ๋•Œ๋ฌธ์—, error state ์˜ covariance propagation ์— ๋Œ€ํ•ด์„œ๋Š” less care ํ•ด๋„ ๋˜์—ˆ์ง€๋งŒ, ๋Œ€์‹  ๊ทธ๋Ÿฌ๋ฉด ๋งค์šฐ ๋น ๋ฅด๊ฒŒ ๋“ค์–ด์˜ค๋Š” IMU measurement ๋“ค์„ ๋ชจ๋‘ ๋‹ค residual ๋กœ ๋„ฃ์–ด์ค˜์•ผ ํ•˜๋ƒ? ๋น„์šฉ์ด ๋„ˆ๋ฌด ๋น„์‹ธ๋‹ค, ๋ผ๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์ด ๋…ผ๋ฌธ์€ preintegration ์„ ํ†ตํ•ด ์ด๋ฅผ ํ•ด๊ฒฐํ•œ ๊ฒƒ (๋ฌผ๋ก  reference๋ณด๋ฉด preintegration์ด๋ž€ ๊ฐœ๋…์€ ์ด๋ฏธ ์žˆ์—ˆ์ง€๋งŒ ๊ทธ๊ฑธ on-manifold ์—์„œ ํ–ˆ๋‹ค๋Š” ๊ฒƒ์ด ์ด ๋…ผ๋ฌธ์˜ ํฌ์ธํŠธ).
    • ๊ทธ๋ž˜์„œ ์•”ํŠผ ๋ณด๋‹ค๋ณด๋ฉด On-manifold GN๊ณผ ESKF๊ฐ€ ์ƒ๋‹นํžˆ ๋‹ฎ์•„ ์žˆ์Œ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.
      • ๊ฒฐ๊ตญ recursive nature ๋ฅผ ๊ฐ€์ง€๋Š”์ง€ ์—ฌ๋ถ€์— ๋”ฐ๋ผ ์ดํ›„ GN vs KF ๊ณ„์—ด์˜ ๋ง›์ด ๋‹ฌ๋ผ์ง€๊ฒŒ ๋œ๋‹ค.
        • ์ฆ‰, error state process model์„ ๋‹ค์‹œ ์„ธ์šฐ๋Š” ๋ฐ ์กฐ๊ธˆ ๋” ๋…ธ๋ ฅ์„ ๋“ค์—ฌ์•ผ ํ•˜๋Š”์ง€,
        • ์•„๋‹ˆ๋ฉด ์ˆ˜๋งŽ์€ imu measurements ๋“ค์„ ํ•˜๋‚˜์˜ a single measurement ๋กœ ์••์ถ•ํ•ด์„œ ํšจ์œจ์ ์ธ batch GN optimization ์„ ๊ฐ€์ ธ๊ฐˆ์ง€, ์™€ ๊ฐ™์€ ๊ณ ๋ฏผ๋“ค.