Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
66c8370d
Verified
Commit
66c8370d
authored
Dec 17, 2019
by
Justin Carpentier
Browse files
joints: add operator== to JointConstraint
parent
c0969180
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/multibody/constraint-base.hpp
View file @
66c8370d
...
...
@@ -98,6 +98,11 @@ namespace pinocchio
{
return
derived
().
motionAction
(
v
);
}
bool
operator
==
(
const
ConstraintBase
<
Derived
>
&
other
)
const
{
return
derived
().
isEqual
(
other
.
derived
());
}
};
// class ConstraintBase
...
...
src/multibody/joint/joint-free-flyer.hpp
View file @
66c8370d
...
...
@@ -94,6 +94,8 @@ namespace pinocchio
motionAction
(
const
MotionBase
<
MotionDerived
>
&
v
)
const
{
return
v
.
toActionMatrix
();
}
bool
isEqual
(
const
ConstraintIdentityTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintIdentityTpl
template
<
typename
Scalar
,
int
Options
,
typename
Vector6Like
>
...
...
src/multibody/joint/joint-mimic.hpp
View file @
66c8370d
...
...
@@ -155,6 +155,12 @@ namespace pinocchio
inline
const
Scalar
&
scaling
()
const
{
return
m_scaling_factor
;
}
inline
const
Constraint
&
constraint
()
const
{
return
m_constraint
;
}
bool
isEqual
(
const
ScaledConstraint
&
other
)
const
{
return
m_constraint
==
other
.
m_constraint
&&
m_scaling_factor
==
other
.
m_scaling_factor
;
}
protected:
Constraint
m_constraint
;
...
...
src/multibody/joint/joint-planar.hpp
View file @
66c8370d
...
...
@@ -327,6 +327,9 @@ namespace pinocchio
return
res
;
}
bool
isEqual
(
const
ConstraintPlanarTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintPlanarTpl
template
<
typename
MotionDerived
,
typename
S2
,
int
O2
>
...
...
src/multibody/joint/joint-prismatic-unaligned.hpp
View file @
66c8370d
...
...
@@ -328,6 +328,11 @@ namespace pinocchio
const
Vector3
&
axis
()
const
{
return
m_axis
;
}
Vector3
&
axis
()
{
return
m_axis
;
}
bool
isEqual
(
const
ConstraintPrismaticUnalignedTpl
&
other
)
const
{
return
m_axis
==
other
.
m_axis
;
}
protected:
Vector3
m_axis
;
...
...
src/multibody/joint/joint-prismatic.hpp
View file @
66c8370d
...
...
@@ -378,6 +378,8 @@ namespace pinocchio
v
=
m
.
cross
(
Axis
());
return
res
;
}
bool
isEqual
(
const
ConstraintPrismaticTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintPrismaticTpl
...
...
src/multibody/joint/joint-revolute-unaligned.hpp
View file @
66c8370d
...
...
@@ -346,6 +346,11 @@ namespace pinocchio
const
Vector3
&
axis
()
const
{
return
m_axis
;
}
Vector3
&
axis
()
{
return
m_axis
;
}
bool
isEqual
(
const
ConstraintRevoluteUnalignedTpl
&
other
)
const
{
return
m_axis
==
other
.
m_axis
;
}
protected:
Vector3
m_axis
;
...
...
src/multibody/joint/joint-revolute.hpp
View file @
66c8370d
...
...
@@ -450,6 +450,9 @@ namespace pinocchio
v
=
m
.
cross
(
Axis
());
return
res
;
}
bool
isEqual
(
const
ConstraintRevoluteTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintRevoluteTpl
template
<
typename
_Scalar
,
int
_Options
,
int
_axis
>
...
...
src/multibody/joint/joint-spherical-ZYX.hpp
View file @
66c8370d
...
...
@@ -166,6 +166,10 @@ namespace pinocchio
// data
Matrix3
S_minimal
;
bool
isEqual
(
const
ConstraintSphericalZYXTpl
&
other
)
const
{
return
m_S
==
other
.
m_S
;
}
};
// struct ConstraintSphericalZYXTpl
...
...
src/multibody/joint/joint-spherical.hpp
View file @
66c8370d
...
...
@@ -281,6 +281,8 @@ namespace pinocchio
return
res
;
}
bool
isEqual
(
const
ConstraintSphericalTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintSphericalTpl
...
...
src/multibody/joint/joint-translation.hpp
View file @
66c8370d
...
...
@@ -360,6 +360,8 @@ namespace pinocchio
return
res
;
}
bool
isEqual
(
const
ConstraintTranslationTpl
&
)
const
{
return
true
;
}
};
// struct ConstraintTranslationTpl
template
<
typename
MotionDerived
,
typename
S2
,
int
O2
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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