creo2urdf icon indicating copy to clipboard operation
creo2urdf copied to clipboard

Unable to get the transform from to the root for AA

Open JunzheJosephZhu opened this issue 1 year ago • 5 comments

image I'm using Creo 9.0.2, and this is the setup. I'm using a very simple dummy ASM with only two links and one joint. Could anyone identify the issue for me please? Thanks in advance!

JunzheJosephZhu avatar Mar 29 '24 10:03 JunzheJosephZhu

Hi @JunzheJosephZhu , thanks for using the extension and providing feedback! Is the warning you posted the only one? Can you expand the message window to check for other warnings?

Also, it's a good chance for us to improve the warning message you posted.

mfussi66 avatar Mar 29 '24 10:03 mfussi66

Hi, image Below is the screenshot of the full error message This is cc.yaml:

robotName: CC
scale: [1, 1, 1]
root: AA

The is cc.csv:

joint_name,lower_limit,upper_limit,damping,friction,velocity_limit,effort_limit

JunzheJosephZhu avatar Mar 29 '24 14:03 JunzheJosephZhu

@JunzheJosephZhu can you share with us the dummy asm you are testing? Thanks!

traversaro avatar Mar 29 '24 14:03 traversaro

A.zip Hi, This zip file contains the asm file as well as the prt files and the configuration files

JunzheJosephZhu avatar Mar 29 '24 14:03 JunzheJosephZhu

Hi @JunzheJosephZhu, I looked into the assembly, and I found two things:

  • The coordinate systems that belong to the parts have different names from the default CSYS:
    • if you'd like to use those names, you need to specify the names in the linkFrames section of the .yaml file
    • Or you can rename them to CSYS, BUT, and here goes the second thing:
  • Creo crashes if I set them to CSYS. This is because the plugin tries to build a joint between CC and BB, and not AA and BB. I think it is because, to define the joint, you are using for AA a protrusion axis and not a dedicated axis datum, unlike BB which uses the axis A_1. Therefore, my suggestion is to create a datum axis for AA and try again. This is the way we build urdf-iable assemblies internally.

These are the suggestion until we fix the issue (it might take a while (but also contributions are welcome!)).

In detail: The problem lies here(https://github.com/icub-tech-iit/creo2urdf/blob/master/src/creo2urdf/src/ElementTreeManager.cpp#L189C1-L196C14). Due to the obtusity of the Creo Toolkit, this was the only way I found to get the name of two parts that create the coincident axes constraint. For some reason, on the last iteration we get CC and BB, and not AA and BB.

Therefore, when link_info_map.at(parent) is called, it looks for the key "CC", which does not exist, and it crashes after throwing an unhandled exception.

mfussi66 avatar Mar 30 '24 10:03 mfussi66