Rhoban / onshape-to-robot

Converting OnShape assembly to robot definition (SDF or URDF) through OnShape API
MIT License
231 stars 49 forks source link

Managing DoF in subassembly #76

Open thomasfla opened 2 years ago

thomasfla commented 2 years ago

Hi, thanks for this super tool!

I'm wondering it is possible to have some DoF defined inside an assembly which is itself included inside a global assembly multiple time. I guess this will lead to naming issues, but maybe could be fixed by adding a suffix? At the moment, onshape-to-robot detects 0 dof.

It this is not doable, I can of course simply make a big assembly.

Gregwar commented 2 years ago

Hello, I agree that it might be easier, but it would require deeper rework of the logic Actually, some current constraints can be lightened by refactoring/rewriting onshape-to-robot, hopefuly I will have some time to do that someday

Gregwar commented 2 years ago

Just for the detail; currently the problem is also that non-dof relation (like two parts being fastened together) don't work on top-level assembly (that could also be improved)

thomasfla commented 2 years ago

Thanks for the fast response, I'll then do a separate flat "link level" assembly for the URDF export.

Achllle commented 9 months ago

This is a pretty important feature to have. Most complex assemblies will have DOFs defined in a subassembly.

@Gregwar, you wrote

it would require deeper rework of the logic Actually, some current constraints can be lightened by refactoring/rewriting onshape-to-robot, hopefuly I will have some time to do that someday

Curious if that day will come soon? Alternatively I can try to tackle this one issue if you could share high level steps on how this is easiest accomplished - preferably without requiring a big refactor.