Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iDynTree::removeAdditionalFramesFromModel function to create a new model by removing additional frames from a given model #1219

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Dec 5, 2024

Fix #1218 .

This PR adds a iDynTree::removeAdditionalFramesFromModel function that can create a new model from a given one, by removing all the additional frames, or only keeping a subset.

Example use in C++:

iDynTree::Model fullModel;

// Create model without any additional frame
iDynTree::Model fullModelWithoutAdditionalFrames;
bool ok = iDynTree::removeAdditionalFramesFromModel(fullModel, fullModelWithoutAdditionalFrames):

// Create model with only the additional frame named "example_additional_frame_name"
iDynTree::Model fullModelWithOnlyOneAdditionalFrame;
std::vector<std::string> allowedAdditionalFramesNames;
allowedAdditionalFramesNames.push_back("example_additional_frame_name");
ok = iDynTree::removeAdditionalFramesFromModel(fullModel, fullModelWithOnlyOneAdditionalFrame, allowedAdditionalFramesNames):

@traversaro traversaro changed the title Fix1218 Add iDynTree::removeAdditionalFramesFromModel function to create a new model by removing additional frames from a given model Dec 5, 2024
@traversaro
Copy link
Member Author

Please ignore the gh-pages CI failure, it will be fixed by #1220 .

Copy link
Contributor

@Giulero Giulero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me!
Thanks a lot @traversaro!

src/model/tests/ModelTransformersUnitTest.cpp Outdated Show resolved Hide resolved
@traversaro traversaro merged commit b780df1 into master Dec 5, 2024
24 of 34 checks passed
@traversaro traversaro deleted the fix1218 branch December 5, 2024 16:39
flferretti pushed a commit to flferretti/idyntree that referenced this pull request Dec 23, 2024
…w model by removing additional frames from a given model (robotology#1219)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functionality to remove additional frames from model
2 participants