Verified Commit b7628d41 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add friction and damping fields to Model

parent 460162f6
......@@ -191,6 +191,10 @@ namespace pinocchio
"Vector of rotor inertia parameters.")
.def_readwrite("rotorGearRatio",&Model::rotorGearRatio,
"Vector of rotor gear ratio parameters.")
.def_readwrite("friction",&Model::friction,
"Vector of joint friction parameters.")
.def_readwrite("damping",&Model::damping,
"Vector of joint damping parameters.")
.def_readwrite("effortLimit",&Model::effortLimit,
"Joint max effort.")
.def_readwrite("velocityLimit",&Model::velocityLimit,
......
......@@ -122,6 +122,12 @@ namespace pinocchio
/// \brief Vector of rotor gear ratio parameters
VectorXs rotorGearRatio;
/// \brief Vector of joint friction parameters
TangentVectorType friction;
/// \brief Vector of joint damping parameters
TangentVectorType damping;
/// \brief Vector of maximal joint torques
TangentVectorType effortLimit;
......@@ -208,6 +214,8 @@ namespace pinocchio
// Eigen Vectors
res.rotorInertia = rotorInertia.template cast<NewScalar>();
res.rotorGearRatio = rotorGearRatio.template cast<NewScalar>();
res.friction = friction.template cast<NewScalar>();
res.damping = damping.template cast<NewScalar>();
res.effortLimit = effortLimit.template cast<NewScalar>();
res.velocityLimit = velocityLimit.template cast<NewScalar>();
res.lowerPositionLimit = lowerPositionLimit.template cast<NewScalar>();
......@@ -287,6 +295,16 @@ namespace pinocchio
res &= other.rotorInertia == rotorInertia;
if(!res) return res;
if(other.friction.size() != friction.size())
return false;
res &= other.friction == friction;
if(!res) return res;
if(other.damping.size() != damping.size())
return false;
res &= other.damping == damping;
if(!res) return res;
if(other.rotorGearRatio.size() != rotorGearRatio.size())
return false;
res &= other.rotorGearRatio == rotorGearRatio;
......
......@@ -44,6 +44,8 @@ namespace boost
ar & make_nvp("referenceConfigurations",model.referenceConfigurations);
ar & make_nvp("rotorInertia",model.rotorInertia);
ar & make_nvp("rotorGearRatio",model.rotorGearRatio);
ar & make_nvp("friction",model.friction);
ar & make_nvp("damping",model.damping);
ar & make_nvp("effortLimit",model.effortLimit);
ar & make_nvp("velocityLimit",model.velocityLimit);
ar & make_nvp("lowerPositionLimit",model.lowerPositionLimit);
......
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