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-rbprm-corba
Commits
5ff515a8
Commit
5ff515a8
authored
Sep 29, 2016
by
Steve Tonneau
Browse files
compute contact points in effector frame
parent
72e1ad70
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rbprmbuilder.impl.cc
View file @
5ff515a8
...
...
@@ -329,24 +329,22 @@ namespace hpp {
cFrame
.
block
<
3
,
1
>
(
0
,
1
)
=
y
;
cFrame
.
block
<
3
,
1
>
(
0
,
2
)
=
z
;
}
{
const
fcl
::
Matrix3f
&
fclRotation
=
state
.
contactRotation_
.
at
(
name
);
for
(
int
i
=
0
;
i
<
3
;
++
i
)
for
(
int
j
=
0
;
j
<
3
;
++
j
)
R
(
i
,
j
)
=
fclRotation
(
i
,
j
);
}
fcl
::
Transform3f
roWorld
,
roEffector
;
roWorld
.
setRotation
(
state
.
contactRotation_
.
at
(
name
));
roWorld
.
setTranslation
(
position
);
roEffector
=
roWorld
;
roEffector
.
inverse
();
for
(
std
::
size_t
i
=
0
;
i
<
4
;
++
i
)
{
if
(
limb
->
contactType_
==
_3_DOF
)
{
fcl
::
Vec3f
pworld
=
position
+
(
cFrame
*
(
p
.
row
(
i
).
transpose
()
+
limb
->
offset_
));
res
.
push_back
(
R
.
transpose
()
*
(
pworld
-
limb
->
offset_
));
res
.
push_back
(
R
.
transpose
()
*
state
.
contactNormals_
.
at
(
name
));
res
.
push_back
(
(
roEffector
*
pworld
).
getTranslation
(
));
res
.
push_back
(
roEffector
.
getRotation
()
*
state
.
contactNormals_
.
at
(
name
));
}
else
{
res
.
push_back
(
p
.
row
(
i
).
transpose
()
+
limb
->
offset_
);
res
.
push_back
(
R
.
transpose
()
*
state
.
contactNormals_
.
at
(
name
));
res
.
push_back
(
roEffector
.
getRotation
()
*
state
.
contactNormals_
.
at
(
name
));
}
}
return
res
;
...
...
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