swift
swift copied to clipboard
Can't add Mesh to Swift in v1.1.0
Hello,
today updated Swift to v1.1.0. When trying to add a Mesh(filename=
Failed to load resource: the server responded with a status of 404 (File not found)
index-0723cc3b940b78c7.js:194 Error: Could not load retrieve/base_link.stl: fetch for "http://localhost:52000/retrieve/base_link.stl" responded with 404: File not found)
at Object.onError (index-0723cc3b940b78c7.js:194:104816)
at index-0723cc3b940b78c7.js:186:224752
rU @ index-0723cc3b940b78c7.js:194
framework-37f5df078e1d84d6.js:9 Error: Could not load retrieve/base_link.stl: fetch for "http://localhost:52000/retrieve/base_link.stl" responded with 404: File not found)
at Object.onError (index-0723cc3b940b78c7.js:194:104816)
at index-0723cc3b940b78c7.js:186:224752
a5 @ framework-37f5df078e1d84d6.js:9
main-b1241a9a70bb7dcd.js:1 Error: Could not load retrieve/base_link.stl: fetch for "http://localhost:52000/retrieve/base_link.stl" responded with 404: File not found)
at Object.onError (index-0723cc3b940b78c7.js:194:104816)
at index-0723cc3b940b78c7.js:186:224752
K @ main-b1241a9a70bb7dcd.js:1
main-b1241a9a70bb7dcd.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
I've already tried to set
I have the same issue when trying to load URDF files to add a robot to the environment. I also get 404 errors for every .stl and .dae file the robot uses. The GET requests seem to fail, even if i use the shipped Franka model. I can supply furhter information if needed. The error already arises when i try:
import roboticstoolbox as rp panda = rp.models.Panda() panda.plot(q=panda.qr)
I am not sure if this is the same issue but I am experiencing something similar, whenever I add the Mesh
file to my environment everything blocks. And the application dies:
This is the code that does that:
from spatialgeometry import Mesh
poly_mesh = Mesh('demofile.stl')
poly_mesh.color = (0.9,0.6,0.0,0.5)
env.add(poly_mesh)
However, in my case the absolute path resolved the issue:
# robot visualisation
from spatialgeometry import Mesh
poly_mesh = Mesh(os.path.join(os.getcwd(),'demofile.stl'))
poly_mesh.color = (0.9,0.6,0.0,0.5)
env.add(poly_mesh)
P.S. this does not happen with the earlier versions of Swig and spsatialgeometry package
Possibly related to this comment here? https://github.com/jhavl/swift/commit/f6c8cdea481b713540b5889c0c8c125ca0cc3ac0#r116060265
I believe I get a similar issue in the tutorial notebook: part 1 topic 3. Seems like there's a forward slash on some of the paths before the drive. I'm on Windows 11 using jupyter notebooks through anaconda.