Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
51216226
Commit
51216226
authored
Apr 21, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
Apr 21, 2017
Browse files
Some bugfix
parent
97a7f173
Changes
4
Hide whitespace changes
Inline
Side-by-side
plugins/hppmanipulationwidgetsplugin/hppmanipulationwidgetsplugin.cc
View file @
51216226
...
...
@@ -232,7 +232,7 @@ namespace hpp {
std
::
string
groupName
=
createJointGroup
(
jn
);
std
::
string
hn
=
"handle_"
+
escapeJointName
(
std
::
string
(
rcs
[
i
]));
fromHPP
(
t
,
config
);
main
->
osg
()
->
addXYZaxis
(
hn
,
color
,
0.005
f
,
1.
f
);
main
->
osg
()
->
addXYZaxis
(
hn
,
color
,
0.005
f
,
0.015
f
);
main
->
osg
()
->
applyConfiguration
(
hn
,
config
);
main
->
osg
()
->
addToGroup
(
hn
,
groupName
);
}
...
...
@@ -253,7 +253,7 @@ namespace hpp {
std
::
string
groupName
=
createJointGroup
(
jn
);
std
::
string
hn
=
"gripper_"
+
escapeJointName
(
std
::
string
(
rcs
[
i
]));
fromHPP
(
t
,
config
);
main
->
osg
()
->
addXYZaxis
(
hn
,
color
,
0.005
f
,
1.
f
);
main
->
osg
()
->
addXYZaxis
(
hn
,
color
,
0.005
f
,
0.015
f
);
main
->
osg
()
->
applyConfiguration
(
hn
,
config
);
main
->
osg
()
->
addToGroup
(
hn
,
groupName
);
}
...
...
plugins/hppwidgetsplugin/hppwidgetsplugin.cc
View file @
51216226
...
...
@@ -124,7 +124,7 @@ namespace hpp {
connect
(
main
,
SIGNAL
(
applyCurrentConfiguration
()),
SLOT
(
applyCurrentConfiguration
()));
connect
(
main
,
SIGNAL
(
selectJointFromBodyName
(
QString
)),
SLOT
(
selectJointFromBodyName
(
QString
)));
SLOT
(
selectJointFromBodyName
(
QString
))
,
Qt
::
QueuedConnection
);
main
->
connect
(
this
,
SIGNAL
(
logJobFailed
(
int
,
QString
)),
SLOT
(
logJobFailed
(
int
,
QString
)));
main
->
connect
(
this
,
SIGNAL
(
logSuccess
(
QString
)),
SLOT
(
log
(
QString
)));
...
...
@@ -443,7 +443,7 @@ namespace hpp {
const
OsgColor_t
color
(
1
,
0
,
0
,
1
);
/// This returns false if the frame already exists
if
(
main
->
osg
()
->
addXYZaxis
(
n
,
color
,
0.005
f
,
1.
f
))
{
if
(
main
->
osg
()
->
addXYZaxis
(
n
,
color
,
0.005
f
,
0.015
f
))
{
main
->
osg
()
->
setVisibility
(
n
,
"ALWAYS_ON_TOP"
);
return
;
}
else
{
...
...
@@ -494,8 +494,9 @@ namespace hpp {
std
::
string
target
=
escapeJointName
(
jn
);
graphics
::
GroupNodePtr_t
group
=
main
->
osg
()
->
getGroup
(
target
.
c_str
(),
false
);
if
(
group
)
return
target
;
if
(
main
->
osg
()
->
createGroup
(
target
.
c_str
()))
{
main
->
osg
()
->
addToGroup
(
target
.
c_str
(),
"joints"
);
if
(
!
main
->
osg
()
->
getGroup
(
target
))
{
main
->
osg
()
->
createGroup
(
target
);
main
->
osg
()
->
addToGroup
(
target
,
"joints"
);
hpp
::
Transform__var
t
=
client
()
->
robot
()
->
getJointPosition
(
jn
.
c_str
());
OsgConfiguration_t
p
;
...
...
plugins/hppwidgetsplugin/pathplayer.cc
View file @
51216226
...
...
@@ -84,7 +84,10 @@ namespace hpp {
gepetto
::
gui
::
WindowsManagerPtr_t
wsm
=
main
->
osg
();
HppWidgetsPlugin
::
HppClient
*
hpp
=
plugin_
->
client
();
hpp
::
floatSeqSeq_var
waypoints
=
hpp
->
problem
()
->
getWaypoints
((
CORBA
::
UShort
)
pid
);
wsm
->
createScene
(
pn
);
if
(
!
wsm
->
getGroup
(
pn
,
false
))
{
wsm
->
createGroup
(
pn
);
wsm
->
addToGroup
(
pn
,
"hpp-gui"
);
}
hpp
::
floatSeq_var
curCfg
=
hpp
->
robot
()
->
getCurrentConfig
();
graphics
::
Configuration
pos
;
osgVector3
pos1
,
pos2
;
...
...
@@ -94,20 +97,21 @@ namespace hpp {
std
::
string
xyzName
=
ss
.
str
();
// Get positions
hpp
->
robot
()
->
setCurrentConfig
(
waypoints
[
i
]);
hpp
::
Transform__var
t
=
hpp
->
robot
()
->
get
L
in
k
Position
(
jointName
.
c_str
());
hpp
::
Transform__var
t
=
hpp
->
robot
()
->
get
Jo
in
t
Position
(
jointName
.
c_str
());
fromHPP
(
t
,
pos
);
pos1
=
pos2
;
pos2
=
pos
.
position
;
// Create the nodes
wsm
->
addXYZaxis
(
xyzName
,
colorN
,
0.01
f
,
1.
f
);
if
(
wsm
->
nodeExists
(
xyzName
))
wsm
->
deleteNode
(
xyzName
,
false
);
wsm
->
addXYZaxis
(
xyzName
,
colorN
,
0.01
f
,
0.05
f
);
wsm
->
applyConfiguration
(
xyzName
,
pos
);
if
(
i
>
0
)
{
xyzName
.
replace
(
pn
.
length
()
+
1
,
4
,
"edge"
);
qDebug
()
<<
xyzName
.
c_str
();
if
(
wsm
->
nodeExists
(
xyzName
))
wsm
->
deleteNode
(
xyzName
,
false
);
wsm
->
addLine
(
xyzName
,
pos1
,
pos2
,
colorE
);
}
}
hpp
->
robot
()
->
setCurrentConfig
(
curCfg
.
in
());
wsm
->
addToGroup
(
pn
,
"hpp-gui"
);
wsm
->
refresh
();
}
...
...
plugins/hppwidgetsplugin/roadmap.cc
View file @
51216226
...
...
@@ -15,7 +15,7 @@
namespace
hpp
{
namespace
gui
{
Roadmap
::
Roadmap
(
HppWidgetsPlugin
*
plugin
)
:
radius
(
0.01
f
),
axisSize
(
1.
f
),
radius
(
0.01
f
),
axisSize
(
0.05
f
),
currentNodeId_
(
0
),
currentEdgeId_
(
0
),
nodeColorMap_
(
0
),
edgeColorMap_
(
0
),
plugin_
(
plugin
),
link_
(
false
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment