idyntree icon indicating copy to clipboard operation
idyntree copied to clipboard

Model: add getName() method

Open Nicogene opened this issue 4 years ago • 3 comments

It would be nice to have a getName() method for getting the name stored in the <robot name= "foo"> tag of the urdf

Nicogene avatar Jul 22 '21 15:07 Nicogene

Probably it is sufficient to add a name attribute with getName setName accessors in https://github.com/robotology/idyntree/blob/a52e9240df154bcc752f438b73a67baabbebaaf9/src/model/include/iDynTree/Model/Model.h#L151 , and then use the setName in https://github.com/robotology/idyntree/blob/db312bfe9f490f991250603f05cea84a8c156899/src/model_io/urdf/src/RobotElement.cpp, as done for example for the link tag in https://github.com/robotology/idyntree/blob/db312bfe9f490f991250603f05cea84a8c156899/src/model_io/urdf/src/LinkElement.cpp#L45 .

traversaro avatar Jul 22 '21 16:07 traversaro

I guess @Nicogene @mfussi66 you could be soon hitting this.

traversaro avatar Apr 08 '23 11:04 traversaro

Actually, at least for exporting URDF it is possible to use ModelExporterOptions::robotExportedName.

traversaro avatar Apr 13 '23 13:04 traversaro