icub-tech-iit / creo2urdf

Generate URDF models from CREO mechanisms
https://icub-tech-iit.github.io/creo2urdf/
BSD 3-Clause "New" or "Revised" License
28 stars 3 forks source link

CREO2URDF – Validation of MVP-1 – Followup #18

Closed pattacini closed 1 year ago

pattacini commented 1 year ago

This follows up on #16 and aims to complete the optional points below:

mfussi66 commented 1 year ago

In https://github.com/icub-tech-iit/creo2urdf/issues/1 we also mentioned:

In this context, we will consider both the options, with and without the intermediate shrinkwraps.

At the moment we are gathering the datums without the copy geometry data structure, typical of shrinkwraps. Shall we add the processing of copy geometries to the checklist?

Nicogene commented 1 year ago

This point has been moved in #23.

Align stl path as we manage in other urdf with relative/package path

This is something that we want in the urdf of MVP2/3 but right now could obstacle the development/testing. I would do it later when creo2urdf will be more mature.

Add a gazebo control board in the resulting urdf

Same as before, at this stage it was needed only to validate the joint we created, but this has been already done in #16. See #24.

Get the joints limits from Creo and set it in the iDynTree::RevoluteJoint

This point instead seems impossible to do it right now with the license we have. I found that basically we need to access to this information: immagine

For doing it, we need to handle the ModelItem as MechItem and get all Mech constraint:

immagine

Unfortunately, we does not have the TOOLKIT for Mechanica license, I had the proof by adding this simple snippet:

            ProMechDisplacementData foo;
            ProMechDisplacementRegularConstr* bar;
            ProMechdisplacementdataTranslationconstrsGet(foo, &bar);

And when trying to load the plugin we get this error

immagine

Actually, also the SimScape Multibody Link seemed to ignore the limits set in the cad, probably Mathworks also miss the license for handling mechanisms from C/C++ API.

Speaking with @fiorisi, it came out that it makes sense to investigate if we can buy this license because in this way we could get directly from the cad all the information of the joints needed for creating the urdf without using csv/yml.

cc @pattacini @mfussi66 @traversaro @salvi-mattia @maggia80 @Mick3Lozzo

octo-reminder[bot] commented 1 year ago

invalid json response body at https://api.github.com/repos/icub-tech-iit/creo2urdf/contents/.github%2Focto-reminder.yml reason: Unexpected end of JSON input

Nicogene commented 1 year ago

Get the rest position from Creo and set it in the iDynTree::RevoluteJoint

About this point probably we did a mistake in defining the joint. We should set the rotation around the rotation axis to 0 and then set that rotation we read from the cad as rest position.

@traversaro sounds good to you?

traversaro commented 1 year ago

Get the rest position from Creo and set it in the iDynTree::RevoluteJoint

About this point probably we did a mistake in defining the joint. We should set the rotation around the rotation axis to 0 and then set that rotation we read from the cad as rest position.

@traversaro sounds good to you?

Yes, that is the definition of rest position.

Nicogene commented 1 year ago

Get the rest position from Creo and set it in the iDynTree::RevoluteJoint

About this point probably we did a mistake in defining the joint. We should set the rotation around the rotation axis to 0 and then set that rotation we read from the cad as rest position. @traversaro sounds good to you?

Yes, that is the definition of rest position.

If not specified the rest position taken is the transform passed to the Joint object?

In particular, I am not sure that this (https://github.com/icub-tech-iit/creo2urdf/pull/25/commits/5bfe68045b659a1b655f84380587f1ad2f26fb54) makes sense and it is actually needed.

traversaro commented 1 year ago

If not specified the rest position taken is the transform passed to the Joint object?

Yes, that is indeed the preferred way to set the rest transform so you are sure to set coeherntly the axis and the transform.

In particular, I am not sure that this (https://github.com/icub-tech-iit/creo2urdf/commit/5bfe68045b659a1b655f84380587f1ad2f26fb54) makes sense and it is actually needed.

What is the rationale for that?

Nicogene commented 1 year ago

Today I had a T2T alignment with @traversaro and it came out that:

For this last point, we need to disjoint the generation and validation in two different buttons. This activity has been added to #23.

The points of this issue have been done, and the rest position has not to be changed, but indeed we need to fix the validation of the urdf.

cc @pattacini @mfussi66 @fiorisi