Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotComponents
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
RobotComponents
Commits
c257b72b
Commit
c257b72b
authored
9 years ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Now visualizes node sets which have no end effector set
parent
791bd1e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
RobotIK merge into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotComponents/gui-plugins/RobotIKPlugin/ManipulatorVisualization.cpp
+30
-11
30 additions, 11 deletions
...ts/gui-plugins/RobotIKPlugin/ManipulatorVisualization.cpp
with
30 additions
and
11 deletions
source/RobotComponents/gui-plugins/RobotIKPlugin/ManipulatorVisualization.cpp
+
30
−
11
View file @
c257b72b
...
...
@@ -10,6 +10,8 @@
#include
<Inventor/actions/SoSearchAction.h>
#include
<Inventor/SbViewportRegion.h>
#include
<iostream>
ManipulatorVisualization
::
ManipulatorVisualization
()
:
isVisualizing
(
false
)
{
//Im gonna live forever :)
...
...
@@ -29,10 +31,24 @@ void ManipulatorVisualization::setVisualization(VirtualRobot::RobotPtr robot, Vi
this
->
removeVisualization
();
//First of all add the end effector
VirtualRobot
::
RobotPtr
endEffector
=
robot
->
getEndEffector
(
nodeSet
->
getTCP
()
->
getName
())
->
createEefRobot
(
""
,
""
);
CoinVisualizationPtr
endEffectorVisualization
=
endEffector
->
getVisualization
<
VirtualRobot
::
CoinVisualization
>
();
this
->
addChild
(
endEffectorVisualization
->
getCoinVisualization
());
VirtualRobot
::
EndEffectorPtr
endEffector
=
robot
->
getEndEffector
(
nodeSet
->
getTCP
()
->
getName
());
if
(
endEffector
)
{
VirtualRobot
::
RobotPtr
endEffectorRobot
=
endEffector
->
createEefRobot
(
""
,
""
);
CoinVisualizationPtr
endEffectorVisualization
=
endEffectorRobot
->
getVisualization
<
VirtualRobot
::
CoinVisualization
>
();
this
->
addChild
(
endEffectorVisualization
->
getCoinVisualization
());
}
else
{
for
(
VirtualRobot
::
RobotNodePtr
node
:
nodeSet
->
getAllRobotNodes
())
{
CoinVisualizationPtr
endEffectorVisualization
=
node
->
getVisualization
<
VirtualRobot
::
CoinVisualization
>
();
this
->
addChild
(
endEffectorVisualization
->
getCoinVisualization
());
std
::
cout
<<
"Adding: "
<<
node
->
getName
()
<<
std
::
endl
;
}
}
//And now wrap this bad boy with our manipulator
this
->
manip
.
reset
(
new
SoTransformerManip
());
...
...
@@ -52,14 +68,17 @@ void ManipulatorVisualization::setVisualization(VirtualRobot::RobotPtr robot, Vi
manip
->
getDragger
()
->
setPart
(
"scale7"
,
nullSep
);
manip
->
getDragger
()
->
setPart
(
"scale8"
,
nullSep
);
//Move it to the tcp
Eigen
::
Matrix4f
mat
=
nodeSet
->
getTCP
()
->
getGlobalPose
();
mat
(
0
,
3
)
/=
1000
;
mat
(
1
,
3
)
/=
1000
;
mat
(
2
,
3
)
/=
1000
;
//Apply to current and desired visualizer
manip
->
setMatrix
(
VirtualRobot
::
CoinVisualizationFactory
::
getSbMatrix
(
mat
));
if
(
endEffector
)
{
//Move it to the tcp
Eigen
::
Matrix4f
mat
=
nodeSet
->
getTCP
()
->
getGlobalPose
();
mat
(
0
,
3
)
/=
1000
;
mat
(
1
,
3
)
/=
1000
;
mat
(
2
,
3
)
/=
1000
;
//Apply to current and desired visualizer
manip
->
setMatrix
(
VirtualRobot
::
CoinVisualizationFactory
::
getSbMatrix
(
mat
));
}
this
->
insertChild
(
manip
.
get
(),
0
);
...
...
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