Comments (20)
Hello,
The problem was that onshape internal partids can contain slash (here JF/
)
I fixed the code to escape those strange slashes, if you update to 0.3.6 it should work
from onshape-to-robot.
Hello,
I believe this issue happens because your assembly is referencing parts and you don't have edition access to it
In this case, the following URL is invoked:
https://cad.onshape.com/api/parts/d/c7f4343ab134d605156724b1/m/333ac268f2d757288de7bccb/e/b47021706b0771d8cc85e3a7/partid/JF//metadata?configuration=default
Which triggers an access denied.
I am not sure why there are privileges required since this should be a read-only API request, I will open an issue in OnShape tickets system itself to investigate. In the meantime, a solution for you would be to make a copy of this document and use it instead.
from onshape-to-robot.
I opened issue on OnShape bug tracking system and I will give updates here
It is weird that this works:
https://cad.onshape.com/api/parts/d/c7f4343ab134d605156724b1/m/333ac268f2d757288de7bccb/e/b47021706b0771d8cc85e3a7/
And this doesn't:
https://cad.onshape.com/api/parts/d/c7f4343ab134d605156724b1/m/333ac268f2d757288de7bccb/e/b47021706b0771d8cc85e3a7/partid/JF//metadata?configuration=default
Since they are both GET requests doing only read operations
from onshape-to-robot.
Thank you very much! the fix solved the problem! :D
from onshape-to-robot.
I am now seeing a similar issue with v 0.3.13:
https://cad.onshape.com/api/parts/d/......../partid/JF%2f/massproperties?configuration=default ! ERROR (404) while using OnShape API ! { "moreInfoUrl" : "", "message" : "Not found.", "status" : 404, "code" : 0 }
When I check the partid directly via the api, it appears as "JF/"
Could this bug be lingering somewhere still?
from onshape-to-robot.
Hello,
Maybe, that would be simplier if I had an example that I could reproduce myself, is it a project you can share with me?
from onshape-to-robot.
Unfortunately, I can't share my project, but I wanted to mention I also had a 404 error show up - when clicking through the URL generated by the error message, the partid portion of the url was malformed via the text implemented in this hotfix. i.e. "/" replaced by "%252f". To test, I manually replacing the malformed text in the partid with "/", and the link went through just fine. My workaround for the time being was to run from source on the commit just prior to the change.
from onshape-to-robot.
ive experienced the same problem
from onshape-to-robot.
Unfortunately, I can't share my project, but I wanted to mention I also had a 404 error show up - when clicking through the URL generated by the error message, the partid portion of the url was malformed via the text implemented in this hotfix. i.e. "/" replaced by "%252f". To test, I manually replacing the malformed text in the partid with "/", and the link went through just fine. My workaround for the time being was to run from source on the commit just prior to the change.
As @noelhwang informed, /
is being exchanged to %252f
.
You can try to reproduce the problem with my project. Here is the link to the project.
from onshape-to-robot.
Hello, indeed slash might be wrongly escaped
I am not sure why we currently double-escape them when getting parts metadata
from onshape-to-robot.
@MrKeith99 I can see your design but I can't import it because I am not allowed to copy it for instance
Maybe you can isolate the part that causes the problem and share that one specifically ?
I will try to create a document with a lot of parts to see if I can get one generated with a slash to add it to the tests/examples
from onshape-to-robot.
I could reproduce by adding 64 parts to a document and running the import to have a lot of partids
Looks like escaping the / only once in the metadata request does the trick.
I re-packaged 0.3.17
, can you upgrade and tell me if it works now?
from onshape-to-robot.
pybullet build time: May 20 2022 19:44:17
* Checking OpenSCAD presence...
* Checking MeshLab presence...
* Retrieving workspace ID ...
+ Using workspace id: 88fc4f32ca2426ef06393394
* Retrieving elements in the document, searching for the assembly...
+ Found assembly, id: 294230932b42f016a12a1535, name: "SOBIT_PRO(MK-4)"
+ Found assembly, id: c6735a901ea2e1529c215af9, name: "arm_elbow_lower_pan"
+ Found assembly, id: 61c5dbf2e78867df6664c5de, name: "arm_elbow_lower_tilt"
+ Found assembly, id: 3a0f7d17aa2f274df5985e96, name: "platform_bottom"
+ Found assembly, id: bdb70e69e307e5054af63303, name: "platform_middle"
+ Found assembly, id: 3e15eb4f7e265186450c15c6, name: "platform_top"
+ Found assembly, id: c1ee2b20f8570e74b87b79f5, name: "urg"
+ Found assembly, id: a29412368500b01c0df2c4b3, name: "pole"
+ Found assembly, id: dbe54c2c550b203528d8f05e, name: "mic"
+ Found assembly, id: baecf1fcd422834977eda067, name: "emergency button"
+ Found assembly, id: 8809880f55ab8e040f597c43, name: "platform"
+ Found assembly, id: 8fa164ab5d61172304b415f1, name: "head_camera"
+ Found assembly, id: 431229acf4c8f72bf9609f27, name: "arm"
+ Found assembly, id: 1d05f411dc80d6cac0d8e13b, name: "wheel"
* Retrieving assembly "wheel" with id 1d05f411dc80d6cac0d8e13b
* Getting assembly features, scanning for DOFs...
* Found total 0 DOFs
* Building robot tree
* Trunk is SOBIT_wheel v1 <1>
* Adding top-level instance [SOBIT_wheel v1 <1>]
+ Adding part X-430_IDLE <1>
WARNING: part X-430_IDLE <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <7>
WARNING: part X-430_SPACER_RING <7> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <8>
WARNING: part SOBIT_wheel v1 <8> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_CVR_CABLE <1>
WARNING: part X-430_CVR_CABLE <1> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <1>
WARNING: part SOBIT_wheel v1 <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <6>
WARNING: part X-430_SPACER_RING <6> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <3>
WARNING: part SOBIT_wheel v1 <3> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <4>
WARNING: part SOBIT_wheel v1 <4> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <5>
WARNING: part SOBIT_wheel v1 <5> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <9>
WARNING: part SOBIT_wheel v1 <9> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <4>
WARNING: part X-430_SPACER_RING <4> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <4>
WARNING: part X-430_SPACER_RING <4> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <7>
WARNING: part SOBIT_wheel v1 <7> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <5>
WARNING: part X-430_SPACER_RING <5> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <6>
WARNING: part SOBIT_wheel v1 <6> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <3>
WARNING: part X-430_SPACER_RING <3> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <3>
WARNING: part X-430_SPACER_RING <3> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <7>
WARNING: part X-430_SPACER_RING <7> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_IDLE <1>
WARNING: part X-430_IDLE <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <5>
WARNING: part X-430_SPACER_RING <5> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <6>
WARNING: part X-430_SPACER_RING <6> has no mass, maybe you should assign a material to it ?
+ Adding part SOBIT_wheel v1 <2>
WARNING: part SOBIT_wheel v1 <2> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <2>
WARNING: part X-430_SPACER_RING <2> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <2>
WARNING: part X-430_SPACER_RING <2> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <8>
WARNING: part X-430_SPACER_RING <8> has no mass, maybe you should assign a material to it ?
+ Adding part fr12_h101 v1 <1>
WARNING: part fr12_h101 v1 <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <8>
WARNING: part X-430_SPACER_RING <8> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <1>
WARNING: part X-430_SPACER_RING <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_CVR_CABLE <1>
WARNING: part X-430_CVR_CABLE <1> has no mass, maybe you should assign a material to it ?
+ Adding part X-430_SPACER_RING <1>
WARNING: part X-430_SPACER_RING <1> has no mass, maybe you should assign a material to it ?
* Writing URDF file
I have been able to pass the path problem but unfortunately it seems to stop in the "wheel" assembly, so the other parts are not retrieved
from onshape-to-robot.
btw, this is the correct link to the project
from onshape-to-robot.
You can specify which assembly you want to export using assemblyName
in the config.json
file, see:
https://onshape-to-robot.readthedocs.io/en/latest/config.html#assemblyname
from onshape-to-robot.
Hello, I also encountered with same problem saying
! ERROR (404) while using OnShape API ! { "message" : "Not found.", "moreInfoUrl" : "", "status" : 404, "code" : 0 }
My cad link is :
link
And the version of onshape-to-robot 0.3.17.
I had not have a problem last week but now I got it.
from onshape-to-robot.
Looks like API for metadata changed.
I switched to using /metadata/...
instead, and released 0.3.18
, @RyotaYoneyama can you give it a try?
from onshape-to-robot.
Works for me
from onshape-to-robot.
Hi, thank you for your response @Gregwar .
It worked almost perfectly!
However, I got an error while using mergeSTLs and simplifySTLs simultaneously, which might be not important.
The error message was
+ joint_0_visual.stl is 6.56 M, running mesh simplification
Traceback (most recent call last):
File "/home/ryota/.local/bin/onshape-to-robot", line 8, in <module>
sys.exit(onshape_to_robot.main())
File "/home/ryota/.local/lib/python3.10/site-packages/onshape_to_robot/onshape_to_robot.py", line 242, in main
buildRobot(tree, np.matrix(np.identity(4)))
File "/home/ryota/.local/lib/python3.10/site-packages/onshape_to_robot/onshape_to_robot.py", line 207, in buildRobot
robot.endLink()
File "/home/ryota/.local/lib/python3.10/site-packages/onshape_to_robot/robot_description.py", line 221, in endLink
stl_combine.simplify_stl(self.meshDir+'/'+filename, self.maxSTLSize)
File "/home/ryota/.local/lib/python3.10/site-packages/onshape_to_robot/stl_combine.py", line 93, in simplify_stl
reduce_faces('/tmp/simplify.stl', stl_file, max_size / size_M)
File "/home/ryota/.local/lib/python3.10/site-packages/onshape_to_robot/stl_combine.py", line 80, in reduce_faces
output = subprocess.check_output(command, shell=True)
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'meshlabserver -i /tmp/simplify.stl -s /tmp/filter_file_tmp.mlx -o wormy_arm_description/urdf/raw/joint_0_visual.stl -om vn fn > /tmp/meshlab.log 2>&1' returned non-zero exit status 255.
onshape-to-robot wormy_arm_description/urdf/raw 7.55s user 5.75s system 302% cpu 4.401 total
from onshape-to-robot.
Hello all,
we experienced a similar problem, our URL ist the following:
Here, the partID is "R+FD", which make it neccessary to escape the "+" in our URL. What I did to solve this: we extended the escape_slash(s) in client.py by changing return s.replace('/', '%2f')
to return s.replace('/', '%2f').replace('+', '%2b')
What more characters can appear? Maybe its better to make this more generic? Hope this helps...
from onshape-to-robot.
Related Issues (20)
- KeyError: 'suppressed' HOT 2
- onshape-to-robot processes sub-assembly but not the rest!?
- Wrong mass computation of assemblies with standard components HOT 15
- help selecting configuration HOT 2
- configurations mess up filenames HOT 1
- Uniformity of joints specific properties
- create links made of multiple parts in longer open kinematic chains HOT 2
- Unable to convert all of parts HOT 5
- Retrieval of current joint states
- Only wireframe
- Suppressed parts in Onshape version are not ignored by onshape-to-robot command HOT 3
- ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997) HOT 4
- IndexError: list index out of range
- additionalXML entry in config.json not working
- Is there a way to override the joint limits computed by OnShape? HOT 1
- Is there a way to supress the collition tag for a particular part?
- Closed kinematics chain HOT 12
- Very big robot apear then vanish in pybullet HOT 1
- Imports the CAD part files to COLLADA files instead of STL files HOT 2
- How to generate more joint types? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onshape-to-robot.