Skip to content
Snippets Groups Projects
Commit bac9a337 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Improve CartesianWaypointControlGui

parent e2cfe8c1
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,135 @@
<item row="0" column="0">
<widget class="QWidget" name="widgetSettings" native="true">
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="4">
<widget class="QDoubleSpinBox" name="doubleSpinBoxPosReached">
<property name="maximum">
<double>500.000000000000000</double>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QDoubleSpinBox" name="doubleSpinBoxPosMaxVel">
<property name="maximum">
<double>500.000000000000000</double>
</property>
<property name="value">
<double>80.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Position</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Orientation</string>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Max vel</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxOriNear">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Near</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Reached</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Joint limit avoidance</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="doubleSpinBoxOriReached">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.050000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Near</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxPosNear">
<property name="maximum">
<double>500.000000000000000</double>
</property>
<property name="value">
<double>50.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QDoubleSpinBox" name="doubleSpinBoxMaxAccOri">
<property name="maximum">
<double>4.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Pos</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
......@@ -176,7 +304,131 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="0" column="6">
<widget class="QDoubleSpinBox" name="doubleSpinBoxMaxAccNull">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="value">
<double>2.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="6">
<widget class="QDoubleSpinBox" name="doubleSpinBoxOriMaxVel">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Max acc</string>
</property>
</widget>
</item>
<item row="2" column="8">
<widget class="QDoubleSpinBox" name="doubleSpinBoxPosKP">
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QDoubleSpinBox" name="doubleSpinBoxLimitAvoidScale">
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="value">
<double>2.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_12">
<property name="text">
<string>KP</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QLabel" name="label_11">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Nullspace</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Scale</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Ori</string>
</property>
</widget>
</item>
<item row="3" column="8">
<widget class="QDoubleSpinBox" name="doubleSpinBoxOriKP">
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Max vel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxMaxAccPos">
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="value">
<double>500.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxLimitAvoidKP">
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="5" column="0" colspan="9">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="pushButtonZeroFT">
......@@ -194,7 +446,34 @@
</item>
</layout>
</item>
<item row="1" column="1">
<item row="3" column="3">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Reached</string>
</property>
</widget>
</item>
<item row="2" column="7">
<widget class="QLabel" name="label_21">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Kp</string>
</property>
</widget>
</item>
<item row="3" column="7">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Kp</string>
</property>
</widget>
</item>
<item row="4" column="2" colspan="7">
<widget class="QDoubleSpinBox" name="doubleSpinBoxFTLimit">
<property name="minimum">
<double>-1.000000000000000</double>
......
......@@ -188,7 +188,6 @@ namespace armarx
{
_lastParsedWPs.clear();
_ui.labelParsingSuccess->setText("<pre parsing>");
///TODO _lastParsedWPs labelParsingSuccess
if (_ui.radioButtonWPJson->isChecked())
{
//parse json
......@@ -220,8 +219,25 @@ namespace armarx
CartesianWaypointControllerConfigWithForceLimit CartesianWaypointControlGuiWidgetController::readRunCfg() const
{
CartesianWaypointControllerConfigWithForceLimit cfg;
cfg.forceThreshold = static_cast<float>(_ui.doubleSpinBoxFTLimit->value());
///TODO add more gui elemetns to change the execution parameters
cfg.wpCfg.maxPositionAcceleration = static_cast<float>(_ui.doubleSpinBoxMaxAccPos->value());
cfg.wpCfg.maxOrientationAcceleration = static_cast<float>(_ui.doubleSpinBoxMaxAccOri->value());
cfg.wpCfg.maxNullspaceAcceleration = static_cast<float>(_ui.doubleSpinBoxMaxAccNull->value());
cfg.wpCfg.kpJointLimitAvoidance = static_cast<float>(_ui.doubleSpinBoxLimitAvoidKP->value());
cfg.wpCfg.jointLimitAvoidanceScale = static_cast<float>(_ui.doubleSpinBoxLimitAvoidScale->value());
cfg.wpCfg.thresholdOrientationNear = static_cast<float>(_ui.doubleSpinBoxOriNear->value());
cfg.wpCfg.thresholdOrientationReached = static_cast<float>(_ui.doubleSpinBoxOriReached->value());
cfg.wpCfg.thresholdPositionNear = static_cast<float>(_ui.doubleSpinBoxPosNear->value());
cfg.wpCfg.thresholdPositionReached = static_cast<float>(_ui.doubleSpinBoxPosReached->value());
cfg.wpCfg.maxOriVel = static_cast<float>(_ui.doubleSpinBoxOriMaxVel->value());
cfg.wpCfg.maxPosVel = static_cast<float>(_ui.doubleSpinBoxPosMaxVel->value());
cfg.wpCfg.kpOri = static_cast<float>(_ui.doubleSpinBoxOriKP->value());
cfg.wpCfg.kpPos = static_cast<float>(_ui.doubleSpinBoxPosKP->value());
cfg.forceThreshold = static_cast<float>(_ui.doubleSpinBoxFTLimit->value());
return cfg;
}
......
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