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-urdf
Commits
26a86e3b
Commit
26a86e3b
authored
Aug 20, 2015
by
Florent Lamiraux
Browse files
Fix bug when base link is not in neutral position.
parent
463a9d65
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/urdf/parser.cc
View file @
26a86e3b
...
...
@@ -573,8 +573,7 @@ namespace hpp
MatrixHomogeneousType
parentJointInWorld
;
if
(
link
==
model_
.
getRoot
())
{
MatrixHomogeneousType
result
;
result
.
setIdentity
();
return
result
;
parentJointInWorld
.
setIdentity
();
}
else
{
parentJointInWorld
=
...
...
@@ -582,16 +581,14 @@ namespace hpp
->
currentTransformation
();
}
// Denormalize orientation if this is an actuated joint.
if
(
link
==
model_
.
getRoot
())
{}
else
if
(
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
REVOLUTE
||
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
CONTINUOUS
||
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
PRISMATIC
)
{
MatrixHomogeneousType
inverse
=
normalizeFrameOrientation
(
link
->
parent_joint
).
inverse
();
parentJointInWorld
=
parentJointInWorld
*
inverse
;
}
if
(
link
->
parent_joint
&&
(
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
REVOLUTE
||
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
CONTINUOUS
||
link
->
parent_joint
->
type
==
::
urdf
::
Joint
::
PRISMATIC
))
{
MatrixHomogeneousType
inverse
=
normalizeFrameOrientation
(
link
->
parent_joint
).
inverse
();
parentJointInWorld
=
parentJointInWorld
*
inverse
;
}
MatrixHomogeneousType
position
=
parentJointInWorld
*
linkPositionInParentJoint
;
...
...
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