Skip to content

102/error correction particle filter#17

Merged
nanairo2743 merged 8 commits into
mainfrom
102/ErrorCorrectionParticleFilter
May 15, 2026
Merged

102/error correction particle filter#17
nanairo2743 merged 8 commits into
mainfrom
102/ErrorCorrectionParticleFilter

Conversation

@nanairo2743

Copy link
Copy Markdown
Collaborator

issue番号

kajiLabTeam/okarin#102

変更内容(写真か動画も一緒に)

particle_filter.mp4
pf_trajectory

影響範囲(あれば)

Copilot AI review requested due to automatic review settings May 15, 2026 03:55
@nanairo2743

Copy link
Copy Markdown
Collaborator Author

@copilot

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

issue #102 に関連して、PDR(歩行者自律航法)での誤差補正・可視化強化と、パーティクルフィルタの挙動改善(アニメーション保存制御、フロアマップ正規化、方位サンプリング改善等)を行うPRです。

Changes:

  • Weinberg モデルのスケール係数を身長で補正する仕組み(compute_weinberg_k / --height-m)を追加
  • センサ時刻 t を使ったジャイロ角の積分・補間、出力ディレクトリ衝突回避、アニメーション保存フラグ(save_animation / --save-animation)を追加
  • PF のフロアマップ正規化・方位ノイズモデル見直し、ステップベクトル画像に加速度射影プロットを追加し、回帰テストを拡充

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_smoke.py ping()compute_weinberg_k() の簡易スモークテストを追加
tests/test_pdr_regressions.py 時刻差分でのジャイロ積分、出力Dir衝突回避、フロアマップ正規化、アニメ保存フラグの回帰テストを追加
src/rikka/config.py 身長補正付き Weinberg 係数(基準身長/基準K)と PF/歩幅推定デフォルト設定を更新
src/rikka/analyze/sensor_plot.py ステップ変位ベクトルに加え、加速度の射影(時系列/分布)を併記する描画を追加
src/rikka/analyze/pdr.py t ベースの dt 積分・角度補間、save_animationheight_m、衝突しない出力Dir生成などを追加
src/rikka/analyze/particle_filter.py フロアマップ正規化、初期方位ばらつき/方位ドリフト、経路平均の算出方法を変更
src/rikka/init.py CLI に --height-mparticle --save-animation を追加し pdr.run() に引き回し
README.md --height-m--save-animation の利用例・設定表の更新、ping の import 修正
pyproject.toml ruff の target-version を py314 に更新
.gitignore AGENTS.md を ignore 対象に変更

Comment thread src/rikka/analyze/pdr.py Outdated
Comment on lines +151 to +153
if len(low_angle) == 0 or sample_index < 0 or sample_index >= len(low_angle):
return None
angle = float(low_angle[sample_index])

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/rikka/analyze/particle_filter.py Outdated
Comment on lines 210 to 214
# 粒子ごとの履歴も状態として保持する。
# 現在位置だけを時系列で平均すると、生存クラスタの切り替わりで
# 軌跡が不連続に飛ぶ。
particle_paths = np.concatenate([particle_paths, particles[:, None, :]], axis=1)
step_lengths.append(sl_det)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanairo2743
nanairo2743 merged commit 81a3bf6 into main May 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants