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
2a515373
Commit
2a515373
authored
Oct 09, 2015
by
Joseph Mirabel
Committed by
Joseph Mirabel
Oct 23, 2015
Browse files
Add static function interpolate.
parent
329c1b96
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/hpp/model/configuration.hh
View file @
2a515373
...
...
@@ -55,6 +55,27 @@ namespace hpp {
}
}
/// Interpolate between two configurations of the robot
/// \param robot robot that describes the kinematic chain
/// \param q0, q1, two configurations to interpolate
/// \param u in [0,1] position along the interpolation: q0 for u=0,
/// q1 for u=1
/// \retval result interpolated configuration
inline
void
interpolate
(
const
DevicePtr_t
&
robot
,
ConfigurationIn_t
q0
,
ConfigurationIn_t
q1
,
const
value_type
&
u
,
ConfigurationOut_t
result
)
{
const
JointVector_t
&
jv
(
robot
->
getJointVector
());
for
(
model
::
JointVector_t
::
const_iterator
itJoint
=
jv
.
begin
();
itJoint
!=
jv
.
end
();
itJoint
++
)
{
size_type
indexConfig
=
(
*
itJoint
)
->
rankInConfiguration
();
(
*
itJoint
)
->
configuration
()
->
interpolate
(
q0
,
q1
,
u
,
indexConfig
,
result
);
}
}
/// Difference between two configurations as a vector
///
/// \param robot robot that describes the kinematic chain
...
...
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