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
Gabriele Buondonno
pinocchio
Commits
d3fbbd18
Commit
d3fbbd18
authored
Oct 05, 2017
by
jcarpent
Browse files
[Algo] Add distance algo and its default version
parent
b2458ebb
Changes
1
Show whitespace changes
Inline
Side-by-side
src/algorithm/joint-configuration.hpp
View file @
d3fbbd18
...
...
@@ -23,6 +23,8 @@
#include
"pinocchio/multibody/liegroup/liegroup.hpp"
#include
<cmath>
namespace
se3
{
...
...
@@ -411,6 +413,23 @@ namespace se3
return
squaredDistance
<
LieGroupTpl
>
(
model
,
q0
,
q1
);
}
template
<
typename
LieGroup_t
>
inline
double
distance
(
const
Model
&
model
,
const
Eigen
::
VectorXd
&
q0
,
const
Eigen
::
VectorXd
&
q1
)
{
return
std
::
sqrt
(
squaredDistance
<
LieGroup_t
>
(
model
,
q0
,
q1
).
sum
());
}
inline
double
distance
(
const
Model
&
model
,
const
Eigen
::
VectorXd
&
q0
,
const
Eigen
::
VectorXd
&
q1
)
{
return
std
::
sqrt
(
squaredDistance
<
LieGroupTpl
>
(
model
,
q0
,
q1
).
sum
());
}
template
<
typename
LieGroup_t
,
typename
JointModel
>
struct
RandomConfigurationStepAlgo
;
template
<
typename
LieGroup_t
>
...
...
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