Open atticusrussell opened 1 year ago
Unsure if I need to do anything with "add configuration input" that gives the options "list" or "configuration variable" - neither of which I currently have.
I got it working by going to https://cad.onshape.com/glassworks/explorer/#/Element, putting my key etc into the login for Element -> get configuration.
Then put the url in, let it auto fill, and got out this response:
Response body
{
"btType": "BTConfigurationResponse-2019",
"configurationParameters": [
{
"btType": "BTMConfigurationParameterEnum-105",
"defaultValue": "Default",
"enumName": "List_NVSqBGez7ItiwQ_conf",
"namespace": "",
"options": [
{
"btType": "BTMEnumOption-592",
"optionName": "Default",
"option": "Default",
"nodeId": "MyQLYabUvZznRto6Y"
},
{
"btType": "BTMEnumOption-592",
"optionName": "true",
"option": "collision",
"nodeId": "Mscp+BBjaf2yLED2t"
}
],
"parameterName": "simplify",
"parameterId": "List_NVSqBGez7ItiwQ",
"nodeId": "MchUrfLAws0/MWR77"
}
],
"currentConfiguration": [],
"libraryVersion": 2075,
"serializationVersion": "1.2.2",
"rejectMicroversionSkew": false,
"microversionSkew": false,
"sourceMicroversion": "d9a8cbebd67ae540953585d9"
}
I changed up a few things about the configuration in Onshape - reflected in the response.
and this was my config.json
{
"documentId": "833f9762904995f22ff7dd9f",
"outputFormat": "urdf",
"mergeSTLs": "all",
"addDummyBaseLink": "true",
"assemblyName": "robot_assm",
"robotName": "catbot",
"configuration": "List_NVSqBGez7ItiwQ=collision"
}
this is the response I got
$ onshape-to-robot catbot/
pybullet build time: Jun 28 2023 20:16:25
* Checking OpenSCAD presence...
* Checking MeshLab presence...
* Retrieving workspace ID ...
+ Using workspace id: 38852c293063cfa13b203677
* Retrieving elements in the document, searching for the assembly...
+ Found assembly, id: 83ac8f3e1b8a64890594cf88, name: "robot_assm"
* Retrieving assembly "robot_assm" with id 83ac8f3e1b8a64890594cf88
* Getting assembly features, scanning for DOFs...
WARNING: joint dof_front_left_wheel_joint of type revolute has no limits
+ Found DOF: front_left_wheel_joint (revolute)
WARNING: joint dof_front_right_wheel_joint of type revolute has no limits
+ Found DOF: front_right_wheel_joint (revolute)
WARNING: joint dof_rear_left_wheel_joint of type revolute has no limits
+ Found DOF: rear_left_wheel_joint (revolute)
WARNING: joint dof_rear_right_wheel_joint of type revolute has no limits
+ Found DOF: rear_right_wheel_joint (revolute)
* Found total 4 DOFs
* Building robot tree
* Trunk is wheel_assm <1>
* Adding top-level instance [wheel_assm <1>]
+ Adding part 65mm wheel with high friction rubber tire <4> (configuration: List_cOWKJ6AUvxgRs2=collisions)
* Adding top-level instance [still_chassis_assm <1>]
+ Adding part aluminum chassis plate <1> (configuration: List_F8qh5rve3N73aw=collisions)
+ Adding part MD520z30_12v motor <4> (configuration: List_szyqBDS7R4nJ48=collisions)
+ Adding part MD520 motor bracket <1> (configuration: List_E8lNvDhhLuVtnq=collisions)
+ Adding part MD520 motor bracket <1> (configuration: List_E8lNvDhhLuVtnq=collisions)
+ Adding part MD520z30_12v motor <4> (configuration: List_szyqBDS7R4nJ48=collisions)
+ Adding part MD520z30_12v motor <4> (configuration: List_szyqBDS7R4nJ48=collisions)
+ Adding part MD520 motor bracket <1> (configuration: List_E8lNvDhhLuVtnq=collisions)
+ Adding part MD520z30_12v motor <4> (configuration: List_szyqBDS7R4nJ48=collisions)
+ Adding part MD520 motor bracket <1> (configuration: List_E8lNvDhhLuVtnq=collisions)
* Adding top-level instance [wheel_assm <2>]
+ Adding part 65mm wheel with high friction rubber tire <4> (configuration: List_cOWKJ6AUvxgRs2=collisions)
* Adding top-level instance [wheel_assm <3>]
+ Adding part 65mm wheel with high friction rubber tire <4> (configuration: List_cOWKJ6AUvxgRs2=collisions)
* Adding top-level instance [wheel_assm <4>]
+ Adding part 65mm wheel with high friction rubber tire <4> (configuration: List_cOWKJ6AUvxgRs2=collisions)
* Writing URDF file
I'm still trying to figure out how to use certain configurations for the collision and visual meshes, but hopefully this info can be helpful if someone else has the same problem.
Unsure whether or not to close the issue - maybe documentation should be updated to reflect the necessary steps to select a configuration - or the code should be able to scrape it and fill it in - before I mark the issue as closed.
I am trying to export a simplified configuration ("collisions") in my onshape assembly, however when I go to export the robot, the default configuration seems to always be chosen. I found this old issue #59 that seems extremely similar, but following the advice about replacing
documents
in the url withapi/assemblies/d
leads me to an error 404.My document is https://cad.onshape.com/documents/833f9762904995f22ff7dd9f/v/33f32ba5220d29406b8e50b0/e/83ac8f3e1b8a64890594cf88
the configuration I want is "collisions", instead of "default".
The following is my
config.json
and this is the output of running the program. Any help on what I could change would be much appreciated.