23 struct PINOCCHIO_PARSERS_DLLAPI JointLimits
26 Eigen::VectorXd maxEffort;
28 Eigen::VectorXd maxVel;
30 Eigen::VectorXd maxConfig;
32 Eigen::VectorXd minConfig;
35 Eigen::VectorXd friction;
37 Eigen::VectorXd damping;
40 Eigen::VectorXd armature;
42 double frictionLoss = 0.;
44 JointLimits() =
default;
46 template<
int Nq,
int Nv>
49 void append(
const JointLimits & jlimit,
const int nq,
const int nv);
279 std::string primary_name;
281 JointVariant secondary_joint;
285 static constexpr int nq = 0;
286 static constexpr int nv = 0;
288 JointMimic() =
default;
291 const JointVariant & jmodel_secondary,
292 const std::string & name_primary,
293 const double scaling_,
294 const double offset_)
295 : primary_name(name_primary)
296 , secondary_joint(jmodel_secondary)
302 bool operator==(
const JointMimic & other)
const 304 return primary_name == other.primary_name && scaling == other.scaling
305 && offset == other.offset && secondary_joint == other.secondary_joint;
309 struct JointComposite
311 std::vector<JointVariant> joints;
312 std::vector<SE3> jointsPlacements;
317 JointComposite() =
default;
319 JointComposite(
const JointVariant & j,
const SE3 & jPose)
322 jointsPlacements.push_back(jPose);
323 nq += boost::apply_visitor([](
const auto & j_) {
return j_.nq; }, j);
324 nv += boost::apply_visitor([](
const auto & j_) {
return j_.nv; }, j);
327 JointComposite(
const std::vector<JointVariant> & js,
const std::vector<SE3> & jPoses)
329 , jointsPlacements(jPoses)
331 for (
const auto & j : js)
333 nq += boost::apply_visitor([](
const auto & j_) {
return j_.nq; }, j);
334 nv += boost::apply_visitor([](
const auto & j_) {
return j_.nv; }, j);
338 void addJoint(
const JointVariant & jm,
const SE3 & pose = SE3::Identity())
340 joints.push_back(jm);
341 jointsPlacements.push_back(pose);
342 nq += boost::apply_visitor([](
const auto & j) {
return j.nq; }, jm);
343 nv += boost::apply_visitor([](
const auto & j) {
return j.nv; }, jm);
346 bool operator==(
const JointComposite & other)
const 348 return joints == other.joints && jointsPlacements == other.jointsPlacements
349 && nq == other.nq && nv == other.nv;
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space.