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
Humanoid Path Planner
hpp-model
Commits
ec1d99d5
Commit
ec1d99d5
authored
Aug 03, 2015
by
Florent Lamiraux
Browse files
Test that root joint exists when necessary.
parent
7b3ba683
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/device.cc
View file @
ec1d99d5
...
...
@@ -500,25 +500,35 @@ namespace hpp {
void
Device
::
computeJointPositions
()
{
rootJoint_
->
recursiveComputePosition
(
currentConfiguration_
,
I4
);
if
(
rootJoint_
)
{
rootJoint_
->
recursiveComputePosition
(
currentConfiguration_
,
I4
);
}
}
void
Device
::
computeJointJacobians
()
{
rootJoint_
->
computeJacobian
();
for
(
JointVector_t
::
const_iterator
it
=
jointVector_
.
begin
();
it
!=
jointVector_
.
end
();
++
it
)
{
if
(
rootJoint_
)
{
rootJoint_
->
computeJacobian
();
for
(
JointVector_t
::
const_iterator
it
=
jointVector_
.
begin
();
it
!=
jointVector_
.
end
();
++
it
)
{
}
}
}
void
Device
::
computeMass
()
{
mass_
=
rootJoint_
->
computeMass
();
mass_
=
0
;
if
(
rootJoint_
)
{
mass_
=
rootJoint_
->
computeMass
();
}
}
void
Device
::
computePositionCenterOfMass
()
{
rootJoint_
->
computeMassTimesCenterOfMass
();
com_
=
(
1
/
mass_
)
*
rootJoint_
->
massCom_
;
com_
.
setZero
();
if
(
rootJoint_
)
{
rootJoint_
->
computeMassTimesCenterOfMass
();
com_
=
(
1
/
mass_
)
*
rootJoint_
->
massCom_
;
}
}
void
Device
::
computeJacobianCenterOfMass
()
...
...
Write
Preview
Markdown
is supported
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