robotology / idyntree

Multibody Dynamics Library designed for Free Floating Robots
BSD 3-Clause "New" or "Revised" License
155 stars 65 forks source link

Add addValidNamesToAllSolidShapes function to ModelTransformers #1173

Closed traversaro closed 3 months ago

traversaro commented 3 months ago

Add a function that should help in https://github.com/robotology/idyntree/issues/1172 . We can then add a call to this function in creo2urdf to help in consuming the model in mujoco.

Documentation of the function:

Add automatically generated names to all visual and collision solid shapes of the model.

This function creates a new iDynTree::Model that is identical to the input one, but that sets a valid name for all the visual and collision solid shapes of the model.

For links that already have at least either collision or visual with valid name, all the corresponding shapes (collision or visual) will not be modified.

For links in which all shapes of a given type that do not have a valid name, a name will be generated as the following:

traversaro commented 3 months ago

fyi @francesco-romano