Skip to content
Snippets Groups Projects
Commit 00cc17f4 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

kinematic unit gui: added units and more senseful toqrue values

parent aa502008
No related branches found
No related tags found
No related merge requests found
......@@ -433,6 +433,8 @@ void KinematicUnitWidgetController::setControlModePosition()
if (currentNode)
{
ui.labelUnit->setText("deg");
jointModes[currentNode->getName()] = ePositionControl;
if (kinematicUnitInterfacePrx)
......@@ -470,7 +472,7 @@ void KinematicUnitWidgetController::setControlModeVelocity()
if (currentNode)
{
jointModes[currentNode->getName()] = eVelocityControl;
ui.labelUnit->setText("deg/s");
ARMARX_INFO << "setting velocity control for current Node Name: " << currentNode->getName() << flush;
ui.horizontalSliderKinematicUnitPos->setMaximum(90);
ui.horizontalSliderKinematicUnitPos->setMinimum(-90);
......@@ -500,8 +502,9 @@ void KinematicUnitWidgetController::setControlModeTorque()
if (currentNode)
{
jointModes[currentNode->getName()] = eTorqueControl;
ui.horizontalSliderKinematicUnitPos->setMaximum(20.0); // TODO: set useful values!
ui.horizontalSliderKinematicUnitPos->setMinimum(-20.0);
ui.labelUnit->setText("Ncm");
ui.horizontalSliderKinematicUnitPos->setMaximum(200.0); // TODO: set useful values!
ui.horizontalSliderKinematicUnitPos->setMinimum(-200.0);
ARMARX_INFO << "setting torque control for current Node Name: " << currentNode->getName() << flush;
if (kinematicUnitInterfacePrx)
......@@ -790,7 +793,8 @@ void KinematicUnitWidgetController::sliderValueChanged(int pos)
else if (currentControlMode == eTorqueControl)
{
NameValueMap jointTorques;
jointTorques[currentNode->getName()] = value / 10.0f;
float torqueTargetValue = value / 100.0f;
jointTorques[currentNode->getName()] = torqueTargetValue;
if (kinematicUnitInterfacePrx)
{
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>900</width>
<width>1045</width>
<height>547</height>
</rect>
</property>
......@@ -46,21 +46,7 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Select Joint</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Control Mode</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<item row="2" column="2" colspan="2">
<widget class="QComboBox" name="nodeListComboBox">
<property name="enabled">
<bool>true</bool>
......@@ -73,7 +59,7 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<item row="3" column="2" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButtonPositionControl">
......@@ -171,10 +157,10 @@
</item>
</layout>
</item>
<item row="4" column="1">
<item row="4" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_4"/>
</item>
<item row="5" column="2">
<item row="5" column="3">
<widget class="QCheckBox" name="showDebugLayer">
<property name="text">
<string>debug layer</string>
......@@ -184,7 +170,7 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="5" column="2">
<widget class="QSlider" name="horizontalSliderKinematicUnitPos">
<property name="enabled">
<bool>true</bool>
......@@ -218,13 +204,34 @@
</size>
</property>
<property name="toolTip">
<string>Value in percent between low and high limit of joint</string>
<string/>
</property>
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="labelUnit">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Control Mode</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Select Joint</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......
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