Euler angle(roll, pitch, yaw)μ—μ„œ 3x3 νšŒμ „ 행렬을 μ–»μ–΄λ³΄μž

κ°œμš”

λ‘œλ³΄ν‹±μŠ€μ—μ„œ μ’Œν‘œκ³„λ₯Ό 닀루닀 보면 ν•΄λ‹Ή 각도 ν‘œν˜„μ„ 많이 μ‚¬μš©ν•˜κ²Œ λœλ‹€.
자주 μ‚¬μš©ν•˜λŠ”λ°λ„ ν—·κ°ˆλ €μ„œ λΈ”λ‘œκ·Έμ— 기둝해둔닀.

Euler –> Rotation Matrix

double roll, pitch, yaw;
roll   = 0.0 * M_PI/180;
pitch  = 0.0 * M_PI/180;
yaw    = 0.0 * M_PI/180;

Eigen::AngleAxisd roll_axis_angle (roll, Eigen::Vector3d::UnitX());
Eigen::AngleAxisd pitch_axis_angle(pitch, Eigen::Vector3d::UnitY());
Eigen::AngleAxisd yaw_axis_angle  (yaw, Eigen::Vector3d::UnitZ());

Eigen::Quaternion<double> q =  yaw_axis_angle*pitch_axis_angle *roll_axis_angle;
Eigen::Matrix3d rot = q.matrix();

Reference

Leave a comment