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
a39a29f5
Verified
Commit
a39a29f5
authored
Dec 19, 2019
by
Justin Carpentier
Browse files
joints: add isEqual
parent
a9ea5fa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/multibody/joint/joint-generic.hpp
View file @
a39a29f5
...
...
@@ -85,6 +85,9 @@ namespace pinocchio
typedef
JointCollectionTpl
<
_Scalar
,
_Options
>
JointCollection
;
typedef
typename
JointCollection
::
JointDataVariant
JointDataVariant
;
using
Base
::
operator
==
;
using
Base
::
operator
!=
;
JointDataVariant
&
toVariant
()
{
return
*
static_cast
<
JointDataVariant
*>
(
this
);
}
const
JointDataVariant
&
toVariant
()
const
{
return
*
static_cast
<
const
JointDataVariant
*>
(
this
);
}
...
...
@@ -122,6 +125,12 @@ namespace pinocchio
static
std
::
string
classname
()
{
return
"JointData"
;
}
std
::
string
shortname
()
const
{
return
::
pinocchio
::
shortname
(
*
this
);
}
bool
isEqual
(
const
JointDataTpl
&
other
)
const
{
return
Base
::
isEqual
(
other
)
&&
toVariant
()
==
other
.
toVariant
();
}
};
...
...
src/multibody/joint/joint-mimic.hpp
View file @
a39a29f5
...
...
@@ -297,6 +297,15 @@ namespace pinocchio
return
*
this
;
}
bool
isEqual
(
const
JointDataMimic
&
other
)
const
{
return
Base
::
isEqual
(
other
)
&&
m_jdata_ref
==
other
.
m_jdata_ref
&&
m_scaling
==
other
.
m_scaling
&&
m_q_transform
==
other
.
m_q_transform
&&
m_v_transform
==
other
.
m_v_transform
;
}
static
std
::
string
classname
()
{
return
std
::
string
(
"JointDataMimic<"
)
+
JointData
::
classname
()
+
std
::
string
(
">"
);
...
...
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