9 rad2deg_(57.2957795131),
14 layout_ =
new QVBoxLayout(parent);
16 label_pose_ =
new QLabel(QString::fromStdString(
"Pose:"));
19 QLabel* label_pose_x =
new QLabel(
"X");
20 label_pose_x->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
21 QLabel* label_pose_y =
new QLabel(
"Y");
22 QLabel* label_pose_z =
new QLabel(
"Z");
23 QLabel* label_pose_w =
new QLabel(
"W");
24 label_pose_w->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
25 QLabel* label_pose_p =
new QLabel(
"P");
26 QLabel* label_pose_r =
new QLabel(
"R");
29 pose_x_->setRange(-20000, 20000);
33 pose_y_->setRange(-20000, 20000);
37 pose_z_->setRange(-20000, 20000);
51 QGridLayout* pose_layout =
new QGridLayout;
52 layout_->addLayout(pose_layout);
53 pose_layout->addWidget(label_pose_x, 0, 0);
54 pose_layout->addWidget(
pose_x_, 0, 1);
55 pose_layout->addWidget(label_pose_y, 1, 0);
56 pose_layout->addWidget(
pose_y_, 1, 1);
57 pose_layout->addWidget(label_pose_z, 2, 0);
58 pose_layout->addWidget(
pose_z_, 2, 1);
59 pose_layout->addWidget(label_pose_w, 0, 2);
60 pose_layout->addWidget(
pose_w_, 0, 3);
61 pose_layout->addWidget(label_pose_p, 1, 2);
62 pose_layout->addWidget(
pose_p_, 1, 3);
63 pose_layout->addWidget(label_pose_r, 2, 2);
64 pose_layout->addWidget(
pose_r_, 2, 3);
65 pose_x_->setLocale(QLocale(QLocale::English));
66 pose_y_->setLocale(QLocale(QLocale::English));
67 pose_z_->setLocale(QLocale(QLocale::English));
68 pose_w_->setLocale(QLocale(QLocale::English));
69 pose_p_->setLocale(QLocale(QLocale::English));
70 pose_r_->setLocale(QLocale(QLocale::English));
138 pose_ = Eigen::Affine3d::Identity();
176 using Eigen::Affine3d;
177 using Eigen::Matrix3d;
178 using Eigen::Vector3d;
179 using Eigen::AngleAxisd;
181 Affine3d pose(Affine3d::Identity());
182 pose.translation()[0] = x;
183 pose.translation()[1] = y;
184 pose.translation()[2] = z;
186 rot = AngleAxisd(w, Vector3d::UnitX())
187 * AngleAxisd(p, Vector3d::UnitY())
188 * AngleAxisd(r, Vector3d::UnitZ());
Eigen::Affine3d getPose()
bool mapGetFloat(const QString &key, float *value_out) const
Eigen::Affine3d convertXYZWPRtoMatrix(const double x, const double y, const double z, const double w, const double p, const double r)
void mapSetValue(const QString &key, QVariant value)
void setTranslationEnabled(const bool)
QVBoxLayout * getLayout()
Pose(const QString name, QWidget *parent=NULL)
void load(const rviz::Config &)
void setText(const QString name)