How to get an rvec replacement from quaternion or euler values
Hey, I am using an ArUcolib but want to replace a rvec
form solvePnP
with data from precise IMU. I get that rvec
is a compact Rodrigues notation and theta = sqrt(a^2 + b^2 + c^2)
v = rod2/theta = [a/theta, b/theta, c/theta]
but cannot find a solution for my problem.
How to convert quaternion or Euler angles to a rotation vector that can replace a rvec
?
Easiest thing is to use the Eigen library to handle these kind of conversions. Look at
Eigen::AngleAxisd
andEigen::Quaterniond
classes.Otherwise, look at this: Quaternion to AxisAngle
https://mathworld.wolfram.com/Rodrigu...