如何解决Eigen :使用四元数设置 Eigen::Isometry3d 的旋转矩阵
有人可以帮我处理特征吗?
我有一个四元数值 (w,x,y,z) 来为 Isometry3D 变量设置旋转矩阵。
为此,我尝试使用 matrix()
和 toRotationMatrix ()
方法,但出现错误:
error: no match for ‘operator=’ (operand types are ‘const LinearMatrixType {aka const Eigen::Matrix<double,3,3>}’ and ‘Eigen::RotationBase<Eigen::Quaternion<double>,3>::RotationMatrixType {aka Eigen::Matrix<double,3>}’)
transform.rotation() = quaternion.matrix();error: no match for ‘operator=’ (operand types are ‘const LinearMatrixType {aka const Eigen::Matrix<double,3>}’)
transform.rotation() = quaternion.matrix();
然后我尝试使用以下方法设置它:
transform.rotation(quaternion.matrix());
error: no matching function for call to ‘Eigen::Transform<double,1>::rotation(Eigen::RotationBase<Eigen::Quaternion<double>,3>::RotationMatrixType)’
transform.rotation(quaternion.matrix());
变量的完整声明是:
Eigen::Isometry3d transform;
transform.translation() << 0.0,0.0,0.88446;
Eigen::Quaternion<double> quaternion(0.96593,0.25878,0.0);
transform.rotation(quaternion.matrix());
有人可以帮我吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。