Rhoban / onshape-to-robot

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

onshape-to-robot processes sub-assembly but not the rest!? #101

Open JHPHELAN opened 1 year ago

JHPHELAN commented 1 year ago

@RhobanRobot @Gregwar Having failed to convert a large OnShape file (The NASA/JPL Open Source Rover) apparently due to lack of access to external files, I tried to create my own simplified OSR on OnShape. Consists of a six-sided chassis box, mated together. Subassembly is an axle with 6 collars mated to it. The axle assembly is revolute mated to a chassis side panel. When I run os-to-r for either .urdf or .sdf it processes the axle assembly but ignores the main assembly! I removed any 'special characters' in part names w/o improvement. I added to the config.json file "ignore": axle assembly. No help. I "ignored" the axle and collars. No help - processed them anyway. The generated .urdf/.sdf consists of just the axle assembly description. The onshape-to-robot-bullet just shows the axle assembly. Before I created the axle assembly and just had separate parts, it processed ok. What's going on here? https://cad.onshape.com/documents/6528dbd7d69d45b325c93403/w/fe87d393405b72be9b4d792e/e/a34a57a973c809d82dab6886

ubuntu@LinuxBox:~$ onshape-to-robot OnShape-OSR
pybullet build time: Apr  9 2023 19:54:23
* Checking OpenSCAD presence...
* Checking MeshLab presence...

* Retrieving workspace ID ...
+ Using workspace id: fe87d393405b72be9b4d792e

* Retrieving elements in the document, searching for the assembly...
+ Found assembly, id: a34a57a973c809d82dab6886, name: "urdf assembly"
+ Found assembly, id: 36536d874ef50e845ac7a65e, name: "axle assembly"

* Retrieving assembly "axle assembly" with id 36536d874ef50e845ac7a65e

* Getting assembly features, scanning for DOFs...
* Found total 0 DOFs

* Building robot tree
* Trunk is JP axle <1>
* Adding top-level instance [JP axle <1>]
+ Adding part axle collar <1>
+ Adding part JP axle <1>
+ Adding part axle collar <3>
+ Adding part axle collar <5>
+ Adding part axle collar <2>
+ Adding part axle collar <4>
+ Adding part axle collar <6>

* Writing SDF file

RoverDoc