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
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
dd2e6946
Commit
dd2e6946
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Set complete joint angles
parent
1efa62ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!241
Resolve "Fix bug in KinematicUnitGui controlling Torso Joint of ARMAR-DE to 0 when reconnecting"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
+8
-17
8 additions, 17 deletions
...ui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
with
8 additions
and
17 deletions
source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp
+
8
−
17
View file @
dd2e6946
...
...
@@ -638,21 +638,15 @@ void KinematicUnitWidgetController::setControlModePosition()
return
;
}
// currentNode->getJointValue() can we wrong after we re-connected to the robot unit.
// E.g., it can be 0 although the torso joint was at -365 before the unit disconnected.
// Therefore, we first have to fetch the actual joint values and use that one.
const
NameValueMap
currentJointAngles
=
kinematicUnitInterfacePrx
->
getJointAngles
();
if
(
auto
it
=
currentJointAngles
.
find
(
currentNode
->
getName
());
it
!=
currentJointAngles
.
end
())
{
currentNode
->
setJointValue
(
it
->
second
);
}
else
{
// Put this into else clause so the message is only constructed when necessary.
ARMARX_CHECK
(
false
)
<<
"Expected joint angles to contain '"
<<
currentNode
->
getName
()
<<
", "
<<
"but contained: "
<<
simox
::
alg
::
get_keys
(
currentJointAngles
);
return
;
// currentNode->getJointValue() can we wrong after we re-connected to the robot unit.
// E.g., it can be 0 although the torso joint was at -365 before the unit disconnected.
// Therefore, we first have to fetch the actual joint values and use that one.
// However, this should actually not be necessary, as the robot model should be updated
// via the topics.
const
NameValueMap
currentJointAngles
=
kinematicUnitInterfacePrx
->
getJointAngles
();
robot
->
setJointValues
(
currentJointAngles
);
}
float
pos
=
currentNode
->
getJointValue
()
*
conversionFactor
;
...
...
@@ -713,10 +707,7 @@ void KinematicUnitWidgetController::setControlModeVelocity()
ui
.
horizontalSliderKinematicUnitPos
->
setMinimum
(
lo
);
ui
.
horizontalSliderKinematicUnitPos
->
blockSignals
(
false
);
resetSlider
();
}
}
void
KinematicUnitWidgetController
::
setControlModeTorque
()
...
...
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