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
443373d9
Commit
443373d9
authored
May 18, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
May 18, 2017
Browse files
Fix JointTreeItem when representing SE3 or SO3 joints
parent
9d1986fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/hppwidgetsplugin/joint-tree-item.cc
View file @
443373d9
...
...
@@ -106,13 +106,18 @@ namespace hpp {
void
JointTreeItem
::
updateTypeRole
()
{
bool
integrate
=
(
data
(
NumberDofRole
).
toInt
()
!=
value_
.
size
());
// SO3 and Freeflyer
int
threshold
=
value_
.
size
();
if
(
data
(
NumberDofRole
).
toInt
()
==
3
&&
value_
.
size
()
==
4
)
threshold
=
0
;
else
if
(
data
(
NumberDofRole
).
toInt
()
==
6
&&
value_
.
size
()
==
7
)
threshold
=
3
;
for
(
int
i
=
0
;
i
<
value_
.
size
();
++
i
)
{
float
lo
=
value_
[
i
][
1
]
->
data
(
Qt
::
EditRole
).
toFloat
();
float
up
=
value_
[
i
][
2
]
->
data
(
Qt
::
EditRole
).
toFloat
();
if
(
i
ntegrate
)
value_
[
i
][
0
]
->
setData
(
IntegratorType
,
TypeRole
);
else
if
(
lo
<
up
)
value_
[
i
][
0
]
->
setData
(
BoundedValueType
,
TypeRole
);
else
value_
[
i
][
0
]
->
setData
(
UnboundedValueType
,
TypeRole
);
if
(
i
>=
threshold
)
value_
[
i
][
0
]
->
setData
(
IntegratorType
,
TypeRole
);
else
if
(
lo
<
up
)
value_
[
i
][
0
]
->
setData
(
BoundedValueType
,
TypeRole
);
else
value_
[
i
][
0
]
->
setData
(
UnboundedValueType
,
TypeRole
);
}
}
...
...
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