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
b19845fe
Verified
Commit
b19845fe
authored
Mar 30, 2021
by
Justin Carpentier
Browse files
core: comment code which will be reintroduced later
parent
b0c18326
Pipeline
#13781
passed with stage
in 129 minutes and 1 second
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/multibody/model.hxx
View file @
b19845fe
...
...
@@ -281,8 +281,9 @@ namespace pinocchio
PINOCCHIO_CHECK_INPUT_ARGUMENT
(
frame
.
parent
<
(
JointIndex
)
njoints
,
"The index of the parent frame is not valid."
);
PINOCCHIO_CHECK_INPUT_ARGUMENT
(
frame
.
inertia
.
isValid
(),
"The input inertia is not valid."
)
// TODO: fix it
// PINOCCHIO_CHECK_INPUT_ARGUMENT(frame.inertia.isValid(),
// "The input inertia is not valid.")
// Check if the frame.name exists with the same type
if
(
existFrame
(
frame
.
name
,
frame
.
type
))
...
...
src/spatial/inertia.hpp
View file @
b19845fe
...
...
@@ -556,13 +556,14 @@ namespace pinocchio
inertia
().
template
cast
<
NewScalar
>());
}
/// \brief Check whether *this is a valid inertia, resulting from a positive mass distribution
bool
isValid
()
const
{
return
(
m_mass
>
Scalar
(
0
)
&&
m_inertia
.
isValid
())
||
(
m_mass
==
Scalar
(
0
)
&&
(
m_inertia
.
data
().
array
()
==
Scalar
(
0
)).
all
());
}
// TODO: adjust code
// /// \brief Check whether *this is a valid inertia, resulting from a positive mass distribution
// bool isValid() const
// {
// return
// (m_mass > Scalar(0) && m_inertia.isValid())
// || (m_mass == Scalar(0) && (m_inertia.data().array() == Scalar(0)).all());
// }
protected:
Scalar
m_mass
;
...
...
src/spatial/symmetric3.hpp
View file @
b19845fe
...
...
@@ -455,13 +455,14 @@ namespace pinocchio
return
Symmetric3Tpl
<
NewScalar
,
Options
>
(
m_data
.
template
cast
<
NewScalar
>());
}
bool
isValid
()
const
{
return
m_data
(
0
)
>=
Scalar
(
0
)
&&
m_data
(
2
)
>=
Scalar
(
0
)
&&
m_data
(
5
)
>=
Scalar
(
0
);
}
// TODO: adjust code
// bool isValid() const
// {
// return
// m_data(0) >= Scalar(0)
// && m_data(2) >= Scalar(0)
// && m_data(5) >= Scalar(0);
// }
protected:
Vector6
m_data
;
...
...
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