Skip to content
Snippets Groups Projects
Commit 72355f70 authored by Philipp Schmidt's avatar Philipp Schmidt
Browse files

Gui now displays calculation error of IKSolver

parent a6d5b4e6
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,9 @@ void armarx::RobotIKWidgetController::onDisconnectComponent()
this->ui.reachableLabel->setEnabled(false);
this->ui.reachableLabel->setText(QString::fromStdString("No kinematic chain selected"));
this->ui.reachableLabel->setStyleSheet("QLabel { color : red; }");
this->ui.errorValue->setEnabled(false);
this->ui.errorValue->setText(QString::fromStdString("Calculated error: 0"));
this->ui.errorValue->setEnabled(false);
this->ui.pushButton->setEnabled(false);
this->ui.currentPose->setEnabled(false);
this->ui.currentPoseMatrix->setEnabled(false);
......@@ -238,6 +241,8 @@ void armarx::RobotIKWidgetController::kinematicChainChanged(const QString &arg1)
this->ui.reachableLabel->setEnabled(true);
this->ui.reachableLabel->setText(QString::fromStdString("Pose reachable!"));
this->ui.reachableLabel->setStyleSheet("QLabel { color : green; }");
this->ui.errorValue->setText(QString::fromStdString("Calculated error: 0"));
this->ui.errorValue->setEnabled(true);
this->ui.pushButton->setEnabled(true);
this->ui.currentPose->setEnabled(true);
this->ui.currentPoseMatrix->setEnabled(true);
......@@ -389,6 +394,9 @@ void armarx::RobotIKWidgetController::manipFinishCallback(void* data, SoDragger*
controller->ui.reachableLabel->setStyleSheet("QLabel { color : red; }");
controller->ui.pushButton->setEnabled(false);
}
//Display calculated error
controller->ui.errorValue->setText(QString::fromStdString("Calculated error: " + boost::lexical_cast<std::string>(targetJointAngles.error)));
}
void armarx::RobotIKWidgetController::robotUpdateTimerCB(void *data, SoSensor *sensor)
......
......@@ -117,6 +117,33 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="errorValue">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>Calculated error: 0</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="enabled">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment