g2o 的 SE3Quat的成员变量
时间: 2024-05-04 13:22:35 浏览: 9
g2o中的SE3Quat表示三维欧几里得变换,它的成员变量包括:
1. 一个四元数(Quaterniond)表示旋转部分;
2. 一个三维向量(Vector3d)表示平移部分;
因此,SE3Quat的定义如下:
```
class SE3Quat {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
SE3Quat();
SE3Quat(const Quaterniond& r, const Vector3d& t);
inline const Quaterniond& rotation() const { return _r; }
inline Quaterniond& rotation() { return _r; }
inline const Vector3d& translation() const { return _t; }
inline Vector3d& translation() { return _t; }
// ...
protected:
Quaterniond _r;
Vector3d _t;
};
```
相关问题
INV_WXYZ_QUAT
INV_WXYZ_QUAT 是一个宏定义或常量,它在代码中用于判断是否从DMP中读取到了四元数数据。根据代码中的判断条件,如果sensors与INV_WXYZ_QUAT进行按位与操作的结果为真,说明从DMP中读取到了四元数数据。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [平衡小车趟过的那些坑](https://blog.csdn.net/ben392797097/article/details/79922158)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [STM32+Cube MX使用MPU6050 DMP时,在外部中断中调用read_dmp函数发生系统卡死问题的根本原因分析](https://blog.csdn.net/phmatthaus/article/details/120749696)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
matlab axang2quat
The axang2quat function in MATLAB converts an axis-angle representation of a rotation to a quaternion representation.
Syntax:
q = axang2quat(axang)
Input:
axang - Axis-angle rotation representation as a 1-by-4 vector, where the first three elements represent the axis of rotation and the fourth element represents the angle of rotation in radians.
Output:
q - Quaternion representation of the rotation as a 1-by-4 vector, where the first three elements represent the imaginary components and the fourth element represents the real component.
Example:
% Convert axis-angle representation of rotation to quaternion
axang = [0.7071, 0, 0.7071, pi/4]; % Rotation of pi/2 radians around the y-axis
q = axang2quat(axang)
Output:
q = [0.9239, 0, 0.3827, 0]