128/analysis direction estimation#19
Open
nanairo2743 wants to merge 21 commits into
Open
Conversation
* `plot_sensor_data` を更新し、歩行検出(step detection)およびジャイロバイアス推定手法を引数として受け取れるように変更。データ分析時の柔軟性を向上。 * 新たな歩行検出手法 `paper_vertical_threshold` を統合し、それに対応した可視化処理を追加。 * 歩幅プロット機能を強化し、任意の歩行信号やしきい値を指定できるように改善。 * `plot_step_vectors` に歩行方向(step heading)の表示機能を追加し、各ステップの詳細な出力を実現。 * 新しいデータセットに対応するため、データディレクトリおよび初期方位に関する設定を変更。 * ジャイロバイアス推定や歩行検出アルゴリズムを含む、PDR(Pedestrian Dead Reckoning:歩行者自律航法)機能の包括的なテストを追加。 * `rikka` パッケージの基本動作を確認するためのスモークテストを追加。
* デバイス情報(バージョン、モデル、センサ仕様)を記録する `device.csv` を追加。 * 実験開始時刻およびシステム時刻を記録する `time.csv` を追加。
- Created device.csv with device specifications including version, build, and sensor details. - Created time.csv to log experiment and system times for the session.
- Introduced configurable parameters for sidestep detection: lateral ratio and minimum lateral displacement. - Added validation functions for new parameters in particle filter and PDR modules. - Implemented smoothing for isolated sidesteps in step headings. - Updated motion heading correction to allow disabling and improved handling in step resolution. - Adjusted default configuration values for sidestep detection. - Enhanced tests to cover new functionality and ensure correct behavior of sidestep detection and motion heading correction.
- Created device.csv with device specifications including version, build, and sensor details. - Created time.csv to log experiment and system times for the session.
…sidestep2 - Created device.csv with device specifications including version, build, and sensor details. - Created time.csv to log experiment and system times for the session.
- Created device.csv with device specifications including version, build, and sensor details. - Created time.csv to log experiment and system times for the session.
…script - Created `device.csv` to store device metadata including version, model, and sensor details. - Created `time.csv` to log experiment and system timestamps. - Developed `plot_heading_fix_comparison.py` script to generate diagnostic plots for Ryuki heading guard comparisons, including various motion handling variants and visualization of results.
There was a problem hiding this comment.
Pull request overview
本PRは、PDR の方位推定を gyro_accel_motion を標準とする形に拡張し、横歩き(sidestep)区間の検出・平滑化、ジャイロバイアス推定手法の強化、CLI/可視化/ドキュメント/回帰テストの整備をまとめて行う変更です。歩行データの解析・検証の再現性を上げつつ、横歩きの取り扱いを軌跡へ反映できるようにする狙いに沿っています。
Changes:
- ジャイロバイアス推定(
prewalk_robust/initial_robust/quietest/manual)と、ステップ検出方式(peak/paper_vertical_threshold)の導入・設定化 gyro_accel_motion系の方位/移動特徴(body_headingとmotion_heading)および横歩き判定・平滑化を、PF も含めた推定パイプラインへ統合- CLI オプション追加、可視化の拡張、README/エージェントガイド更新、回帰テスト追加
Reviewed changes
Copilot reviewed 45 out of 81 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_smoke.py | 基本 API/CLI help のスモークテスト追加 |
| tests/test_pdr_regressions.py | PDR/PF/横歩き判定/バイアス推定などの回帰テスト大幅追加 |
| src/rikka/config.py | 新しい推定方式・横歩き関連・バイアス関連の既定値/パラメータ追加 |
| src/rikka/analyze/sensor_plot.py | ステップ検出方式や縦加速度閾値方式の可視化対応、StepHeading 表示対応 |
| src/rikka/analyze/particle_filter.py | gyro_accel_motion/横歩き平滑化/補正を取り込んだ PF 推定と overlay 出力対応 |
| src/rikka/init.py | CLI オプション追加(ステップ検出/方位/バイアス/横歩き等)と sensor 拡張 |
| scripts/plot_heading_fix_comparison.py | 方位ガード比較用の診断スクリプト追加 |
| README.md | 新標準設定・CLI 例・出力の説明などを更新 |
| input/ryuki_nosidestep_1turn_3turn/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_nosidestep_1turn_3turn/meta/device.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep5/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep5/meta/device.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep4/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep4/meta/device.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep3/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep3/meta/device.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep2/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep2/meta/device.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep/meta/time.csv | サンプルデータメタ情報追加 |
| input/ryuki_1turn_rightsidestep_3turn_leftsidestep/meta/device.csv | サンプルデータメタ情報追加 |
| input/nosidestep_1turn_3turn/meta/time.csv | サンプルデータメタ情報追加 |
| input/nosidestep_1turn_3turn/meta/device.csv | サンプルデータメタ情報追加 |
| input/kakeru_nosidestep_1turn_3turn/meta/time.csv | サンプルデータメタ情報追加 |
| input/kakeru_nosidestep_1turn_3turn/meta/device.csv | サンプルデータメタ情報追加 |
| input/kakeru_1turn_rightsidestep_3turn_leftsidestep2/meta/time.csv | サンプルデータメタ情報追加 |
| input/kakeru_1turn_rightsidestep_3turn_leftsidestep2/meta/device.csv | サンプルデータメタ情報追加 |
| input/kakeru_1turn_rightsidestep_3turn_leftsidestep/meta/time.csv | サンプルデータメタ情報追加 |
| input/kakeru_1turn_rightsidestep_3turn_leftsidestep/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep6/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep6/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep5/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep5/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep4/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep4/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep3/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep3/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep2/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep2/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightsidestep_3turn_leftsidestep/meta/device.csv | サンプルデータメタ情報追加 |
| input/1turn_rightcrabstep_3turn_leftcrabstep/meta/time.csv | サンプルデータメタ情報追加 |
| input/1turn_rightcrabstep_3turn_leftcrabstep/meta/device.csv | サンプルデータメタ情報追加 |
| CLAUDE.md | エージェントガイドの移行に伴い削除 |
| AGENTS.md | 新しいエージェント向けガイド追加 |
| .pre-commit-config.yaml | 入力データ配下の自動整形を一部抑制 |
| .gitignore | テスト/ガイドの追跡方針変更に合わせて調整 |
Comments suppressed due to low confidence (1)
src/rikka/init.py:244
-
- 問題: CLI で
--gyro-bias-method manualを指定しても--gyro-bias未指定を事前に弾かないため、実行時にValueErrorがそのまま発生します。
- 問題: CLI で
- 理由: 引数の組み合わせエラーは CLI 側で検知して
UsageError/BadParameterとして返した方が、利用者にとって原因が明確でトラブルシュートしやすいです。 - 修正案:
_run_pdrの冒頭でgyro_bias_method == "manual" and gyro_bias is Noneを検査し、click.UsageErrorを投げてください。
…A_DIR for input path
デバイス情報を含む device.csv と実験時間を記録した time.csv を削除しました。これにより、プロジェクトのクリーンアップが行われ、不要なファイルが整理されました。
コミットメッセージ生成の指示を追加し、日本語での出力を促す設定を強化しました。
PDR (Pedestrian Dead Reckoning) のための新しい機能を追加しました。以下のファイルが新たに作成されました。 - outputs.py: PDR の CSV 出力用データ整形 - plotting.py: 通常 PDR 軌跡の描画処理 - sensors.py: センサーデータの読み込みと前処理 - step_detection.py: PDR のステップ検出手法 - step_length.py: PDR の歩幅推定手法 - time_utils.py: PDR の時刻・サンプル位置ユーティリティ これにより、PDR のデータ処理と可視化がより効率的に行えるようになります。
Collaborator
Author
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#128
変更内容(写真か動画も一緒に)
横歩きの部分の作成
影響範囲(あれば)