33 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on init";
40 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on connect";
46 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on disconnect";
52 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on exit";
56 guiTCPInformation(guiTCPInformation)
65 return this->guiTCPInformation;
71 if (guiTCPInformation != NULL)
73 this->guiTCPInformation = guiTCPInformation;
80 setLineEditText(guiTCPInformation->getTCPInformationTab()->currentPoseLayout, pose);
86 setLineEditText(guiTCPInformation->getTCPInformationTab()->desiredPoseLayout, pose);
92 std::string reachableString =
"";
95 reachableString =
"Pose reachable!";
99 reachableString =
"Pose NOT reachable!";
101 guiTCPInformation->getTCPInformationTab()->reachableLabel->setText(
102 QString::fromStdString(reachableString));
109 setLineEditText(guiTCPInformation->getTCPInformationTab()->currentPoseLayout, zero);
110 setLineEditText(guiTCPInformation->getTCPInformationTab()->desiredPoseLayout, zero);
116 throw(
"not yet implemented");
120 TCPInformationController::setLineEditText(QGridLayout* gridLayout,
Eigen::Matrix4f pose)
122 int columns = gridLayout->columnCount();
123 int rows = gridLayout->rowCount();
129 for (
int i = 0; i < columns; i++)
131 for (
int j = 0; j < rows; j++)
134 QLayoutItem* item = gridLayout->itemAtPosition(j, i);
138 QWidget* widget = item->widget();
139 QLabel* lineEdit =
dynamic_cast<QLabel*
>(widget);
144 std::stringstream stream;
145 stream << std::fixed << std::setprecision(2) << pose(j, i);
146 std::string
s = stream.str();
147 lineEdit->setText(QString::fromStdString(
s));