Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNSS和Localization的pose计算逻辑 #15645

Open
zhuxinxi opened this issue Feb 12, 2025 · 1 comment
Open

GNSS和Localization的pose计算逻辑 #15645

zhuxinxi opened this issue Feb 12, 2025 · 1 comment

Comments

@zhuxinxi
Copy link

System information

  • OS Platform and Distribution (Linux Ubuntu 18.04):
  • Apollo installed from (source):
  • Apollo version (7.0):
  • Output of apollo.sh config if on master branch:
    想请教一下,在drivers/gnss模块下面,发布odometry话题到localization的时候,计算pose的四元数使用的代码:
    // 2. orientation
    Eigen::Quaterniond q =
    Eigen::AngleAxisd(ins->euler_angles().z() - 90 * DEG_TO_RAD_LOCAL,
    Eigen::Vector3d::UnitZ()) *
    Eigen::AngleAxisd(-ins->euler_angles().y(), Eigen::Vector3d::UnitX()) *
    Eigen::AngleAxisd(ins->euler_angles().x(), Eigen::Vector3d::UnitY());

这里yaw角减去90度的弧度,是将东北天坐标系下的0°heading指向东方向吗?绕X轴的旋转又取负是为什么呢?将四元数数据传递到localization模块之后,计算heading的代码中 double heading = common::math::QuaternionToHeading(qw, qx, qy, qz); 又将减去的90°弧度又补偿回来了是吗? 那这样做的意义是什么呢? 默认的组合导航安装位置,换句话说组合导航的坐标系在系统中应该是什么方向呢?

@hearto1314
Copy link
Contributor

对,apollo localization是东北天。pitch取负值是因为parser的实现里面取了负值,相当于转回来了,这么做可能和之前实现的novatel协议的一些定义有关,比如rawimu https://docs.novatel.com/OEM7/Content/SPAN_Logs/RAWIMU.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants