Verified Commit b19845fe authored by Justin Carpentier's avatar 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
......@@ -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))
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment