fix(crane_world_model_publisher): estimateInitialVelocityが減速度引数を無視する不具合を修正 - #1395
Open
HansRobo wants to merge 1 commit into
Open
fix(crane_world_model_publisher): estimateInitialVelocityが減速度引数を無視する不具合を修正#1395HansRobo wants to merge 1 commit into
HansRobo wants to merge 1 commit into
Conversation
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.
概要
crane_world_model_publisherのオフライン較正ツールにおいて、SimpleBallPhysicsOptimizer::estimateInitialVelocityが引数で渡された減速度decelerationを無視していた不具合を修正します。問題
estimateInitialVelocityは引数decelerationを/* deceleration */とコメントアウトして未使用にしており、v(t) = v0 - deceleration * tのコメント記述に反して、傾き・切片を自由に推定する2パラメータ線形回帰の切片をそのまま初速度としていました。このため、別途最適化された「グローバル減速度」が初速度推定に一切反映されず、出力される初速度と減速度の2パラメータが物理的に整合しない状態でした。コメント「固定減速度を使用して初速度を推定」とも矛盾していました。
原因
固定傾き(固定減速度)モデルで初速度のみを推定する意図に反し、
performLinearRegressionによる自由2パラメータ回帰の切片を初速度に採用していたため、引数decelerationが使われていませんでした。修正内容
/* deceleration */を解除し、decelerationを使用するように修正。v(t) = v0 - deceleration * tに基づき、各時刻についてv0 = v(t) + deceleration * tを算出し、その平均値を初速度推定値としました。検証
cwm の独立オーバーレイ worktree 上で対象パッケージ
crane_world_model_publisherをcolcon build(--no-rdeps)し、コンパイルが正常に完了することを確認しました(Build complete.)。レビュー観点
fix/ball-calib-global-decel-v0と同種の修正方針です。v0 = mean(velocities + deceleration * time_points)の妥当性。本PRはソースコード監査ワークフローで検出・敵対的検証されたバグに対する単一修正です。