c++ - 从 Eigen::Isometry3d 提取旋转时出错?
问题描述
Eigen::Isometry3d M = Eigen::Isometry3d::Identity();
cout << M.rotation <<endl;
当我输入'.'
after时M
,'rotation'
列表中弹出,编译文件并运行,出现错误:
invalid use of non-static member function...
解决方案
它是一个成员函数,因此您需要调用它。尝试
std::cout << M.rotation() << std::endl;
// ^^
这已在标头Transform.h中定义;转到其定义以获取更多详细信息。