Apollo 11.0
自动驾驶开放平台
quaternion_euler.cc 文件参考
#include "gflags/gflags.h"
#include "cyber/common/log.h"
#include "modules/common/math/euler_angles_zxy.h"
#include "modules/common/math/quaternion.h"
quaternion_euler.cc 的引用(Include)关系图:

浏览源代码.

函数

 DEFINE_double (qx, 0, "quaternion x")
 
 DEFINE_double (qy, 0, "quaternion y")
 
 DEFINE_double (qz, 0, "quaternion z")
 
 DEFINE_double (qw, 0, "quaternion w")
 
int main (int32_t argc, char **argv)
 

函数说明

◆ DEFINE_double() [1/4]

DEFINE_double ( qw  ,
0  ,
"quaternion w"   
)

◆ DEFINE_double() [2/4]

DEFINE_double ( qx  ,
0  ,
"quaternion x"   
)

◆ DEFINE_double() [3/4]

DEFINE_double ( qy  ,
0  ,
"quaternion y"   
)

◆ DEFINE_double() [4/4]

DEFINE_double ( qz  ,
0  ,
"quaternion z"   
)

◆ main()

int main ( int32_t  argc,
char **  argv 
)

在文件 quaternion_euler.cc 第 28 行定义.

28 {
29 google::InitGoogleLogging(argv[0]);
30 FLAGS_alsologtostderr = true;
31 FLAGS_v = 3;
32
33 google::ParseCommandLineFlags(&argc, &argv, true);
34
35 apollo::common::math::EulerAnglesZXY<double> euler(FLAGS_qw, FLAGS_qx,
36 FLAGS_qy, FLAGS_qz);
37 AINFO << "roll: " << euler.roll() << " pitch:" << euler.pitch()
38 << " yaw:" << euler.yaw();
39 AINFO << "heading: "
41 FLAGS_qy, FLAGS_qz)
42 << " heading degree: "
43 << 180.0 / M_PI *
45 FLAGS_qy, FLAGS_qz);
46}
Any orientation of a rigid body on a 3-D space can be achieved by composing three rotations about the...
#define AINFO
Definition log.h:42
double QuaternionToHeading(const double qw, const double qx, const double qy, const double qz)
Definition quaternion.h:56