102/error correction particle filter#17
Merged
Merged
Conversation
Collaborator
Author
There was a problem hiding this comment.
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_animation、height_m、衝突しない出力Dir生成などを追加 |
| src/rikka/analyze/particle_filter.py | フロアマップ正規化、初期方位ばらつき/方位ドリフト、経路平均の算出方法を変更 |
| src/rikka/init.py | CLI に --height-m と particle --save-animation を追加し pdr.run() に引き回し |
| README.md | --height-m と --save-animation の利用例・設定表の更新、ping の import 修正 |
| pyproject.toml | ruff の target-version を py314 に更新 |
| .gitignore | AGENTS.md を ignore 対象に変更 |
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]) |
Comment on lines
210
to
214
| # 粒子ごとの履歴も状態として保持する。 | ||
| # 現在位置だけを時系列で平均すると、生存クラスタの切り替わりで | ||
| # 軌跡が不連続に飛ぶ。 | ||
| particle_paths = np.concatenate([particle_paths, particles[:, None, :]], axis=1) | ||
| step_lengths.append(sl_det) |
mizunoryuki
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue番号
kajiLabTeam/okarin#102
変更内容(写真か動画も一緒に)
particle_filter.mp4
影響範囲(あれば)