Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
6ff3d34d
Commit
6ff3d34d
authored
9 years ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Update ui, label now shows whether pose is reachable
parent
fda66b95
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp
+23
-0
23 additions, 0 deletions
...e/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp
source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.ui
+198
-2
198 additions, 2 deletions
...ce/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.ui
with
221 additions
and
2 deletions
source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp
+
23
−
0
View file @
6ff3d34d
...
...
@@ -48,6 +48,12 @@ armarx::RobotIKWidgetController::RobotIKWidgetController() : focusCameraOnRobot(
ui
.
setupUi
(
getWidget
());
getWidget
()
->
setEnabled
(
false
);
//Alignment for ui
this
->
ui
.
verticalLayout
->
setAlignment
(
Qt
::
AlignTop
);
//Label color
this
->
ui
.
reachableLabel
->
setStyleSheet
(
"QLabel { color : red; }"
);
//Component names
robotStateComponentName
=
""
;
...
...
@@ -247,6 +253,17 @@ void armarx::RobotIKWidgetController::timerCB(void *data, SoSensor *sensor)
void
armarx
::
RobotIKWidgetController
::
kinematicChainChanged
(
const
QString
&
arg1
)
{
this
->
ui
.
moveTCP
->
setEnabled
(
true
);
this
->
ui
.
reachableLabel
->
setEnabled
(
true
);
this
->
ui
.
reachableLabel
->
setText
(
QString
::
fromStdString
(
"Pose reachable!"
));
this
->
ui
.
reachableLabel
->
setStyleSheet
(
"QLabel { color : green; }"
);
this
->
ui
.
pushButton
->
setEnabled
(
true
);
this
->
ui
.
currentPose
->
setEnabled
(
true
);
this
->
ui
.
currentPoseMatrix
->
setEnabled
(
true
);
this
->
ui
.
desiredPose
->
setEnabled
(
true
);
this
->
ui
.
desiredPoseMatrix
->
setEnabled
(
true
);
Eigen
::
Matrix4f
mat
=
robot
->
getRobotNodeSet
(
arg1
.
toStdString
())
->
getTCP
()
->
getGlobalPose
();
mat
(
0
,
3
)
/=
1000
;
mat
(
1
,
3
)
/=
1000
;
...
...
@@ -308,10 +325,16 @@ void armarx::RobotIKWidgetController::manipFinishCallback(void* data, SoDragger*
if
(
targetJointAngles
.
isReachable
)
{
//Green
controller
->
tcpDesiredColor
->
ambientColor
.
setValue
(
0
,
1
,
0
);
controller
->
ui
.
reachableLabel
->
setText
(
QString
::
fromStdString
(
"Pose reachable!"
));
controller
->
ui
.
reachableLabel
->
setStyleSheet
(
"QLabel { color : green; }"
);
controller
->
ui
.
pushButton
->
setEnabled
(
true
);
}
else
{
//Red
controller
->
tcpDesiredColor
->
ambientColor
.
setValue
(
1
,
0
,
0
);
controller
->
ui
.
reachableLabel
->
setText
(
QString
::
fromStdString
(
"Pose unreachable!"
));
controller
->
ui
.
reachableLabel
->
setStyleSheet
(
"QLabel { color : red; }"
);
controller
->
ui
.
pushButton
->
setEnabled
(
false
);
}
}
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.ui
+
198
−
2
View file @
6ff3d34d
...
...
@@ -33,20 +33,216 @@
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetMinimumSize
</enum>
</property>
<item>
<widget
class=
"QLabel"
name=
"choseKinematic"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Maximum"
vsizetype=
"Maximum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Choose kinematic chain to use:
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"comboBox"
/>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"moveTCP"
>
<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=
"text"
>
<string>
Move TCP to pose of manipulator in the 3D Viewer:
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"reachableLabel"
>
<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>
No kinematic chain selected
</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"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Move TCP
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"currentPose"
>
<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=
"text"
>
<string>
PushButton
</string>
<string>
Current pose of TCP:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"currentPoseMatrix"
>
<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=
"text"
>
<string>
No kinematic chain selected
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"desiredPose"
>
<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=
"text"
>
<string>
Desired pose of TCP:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"desiredPoseMatrix"
>
<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=
"text"
>
<string>
No kinematic chain selected
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"checkBox"
>
<property
name=
"enabled"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
<property
name=
"text"
>
<string>
Focus camera on robot and TCP
</string>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment