Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix imu system #36

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Fix imu system #36

wants to merge 3 commits into from

Conversation

nyxrobotics
Copy link

Summary

IMUを用いたシステムの状態推定の計算を修正

Detail

Impact

Test

wheeltecのgazebo環境で動作確認
目視ではほぼ変化なし

@nyxrobotics nyxrobotics force-pushed the feature/fix_imu_sysem branch from f349f63 to 4a2b06f Compare January 9, 2024 10:12
@nyxrobotics nyxrobotics marked this pull request as ready for review January 9, 2024 10:15
Comment on lines 59 to 60
dq = Eigen::AngleAxisf(gyro[0] * dt_, Vector3t::UnitX()) * Eigen::AngleAxisf(gyro[1] * dt_, Vector3t::UnitY()) *
Eigen::AngleAxisf(gyro[2] * dt_, Vector3t::UnitZ());

Choose a reason for hiding this comment

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

あまり詳しくないのですが,unit vectorで回転する式は以下だと思いましたが違いますか?

$$q = cos(\frac{w\Delta t}{2}) + sin(\frac{w\Delta t}{2}) \cdot \vec{u}$$

Copy link
Author

@nyxrobotics nyxrobotics Jan 11, 2024

Choose a reason for hiding this comment

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

参照記事教えてもらえますか

Choose a reason for hiding this comment

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

上記の式の書き方ちょっとミスっていると思います. 🙇

認識正しければ,上記のコードだと $\theta = w \Delta t$ みたいに角速度を角度変換しているため axis angle -> quaternion変換する式を調べていました.

この2つから参考しました
https://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm
https://gamedev.stackexchange.com/questions/98011/correct-way-to-integrate-scaled-axis-angular-velocity-into-a-quaternion

@nyxrobotics nyxrobotics marked this pull request as draft January 12, 2024 04:05
@nyxrobotics nyxrobotics marked this pull request as ready for review January 17, 2024 09:03
@nyxrobotics nyxrobotics marked this pull request as draft January 17, 2024 12:32
@nyxrobotics
Copy link
Author

色々試しましたが有意差が見られないので一旦後回しにしようと思います

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.

カルマンフィルタでIMUのシステムの計算が間違っている
2 participants