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-pinocchio
Commits
0631df57
Commit
0631df57
authored
May 11, 2020
by
Joseph Mirabel
Browse files
Add equality operator in class Joint.
parent
f87ba669
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/hpp/pinocchio/joint.hh
View file @
0631df57
...
...
@@ -226,6 +226,16 @@ namespace hpp {
/// \}
bool
operator
==
(
const
Joint
&
other
)
const
{
return
index
()
==
other
.
index
()
&&
robot
()
==
other
.
robot
();
}
bool
operator
!=
(
const
Joint
&
other
)
const
{
return
!
operator
==
(
other
);
}
protected:
value_type
maximalDistanceToParent_
;
DeviceWkPtr_t
devicePtr
;
...
...
tests/joint-bounds.cc
View file @
0631df57
...
...
@@ -43,6 +43,11 @@ BOOST_AUTO_TEST_CASE(joint_bounds)
size_type
nJoints
(
robot
->
nbJoints
());
for
(
size_type
i
=
0
;
i
<
nJoints
;
++
i
)
{
JointPtr_t
joint
(
robot
->
jointAt
(
i
));
BOOST_CHECK
(
joint
==
joint
);
BOOST_CHECK
(
*
joint
==
*
robot
->
jointAt
(
i
));
if
(
i
>
0
)
BOOST_CHECK
(
*
joint
!=
*
robot
->
jointAt
(
i
-
1
));
// Set bounds
vector_t
l0
(
joint
->
configSize
());
vector_t
u0
(
joint
->
configSize
());
...
...
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