Skip to content
Discussion options

You must be logged in to vote

Hello @sea-bass,

ModelTpl::joints store a vector of generic JointModelTpl that inherit of boost::variant that can hold all joint types.
The python extract method allow to access the specific joint type inside the boost::variant.

To do the same in C++ you have to play with the boost::variant API by:

I will give you an untested snippet with boost::get:

auto* joint = boost::get<pinocchio::JointModelMimic>(&model.joints[model.joints().size() - 3]);
if (joint)
{
  joint->scaling;
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sea-bass
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants