openrr / urdf-viz

visualize URDF/XACRO file, URDF Viewer works on Windows/MacOS/Linux
Apache License 2.0
413 stars 56 forks source link

Support loading online mesh with assimp #220

Closed taiki-e closed 11 months ago

taiki-e commented 11 months ago

Currently, meshes starting with http:/https: are not supported with assimp.

https://github.com/openrr/urdf-viz/blob/9cf51a756a748a78644f3923756970e2bf2ac7af/src/mesh.rs#L104-L107

This is because the assimp-sys API requires the path to the local mesh file.

https://github.com/openrr/urdf-viz/blob/9cf51a756a748a78644f3923756970e2bf2ac7af/src/mesh.rs#L26

By downloading the file, saving it as a temporary file, and passing the path to it to assimp-sys, it should be possible to support meshes starting with http:/https: with assimp.