Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new robots via URDF #19

Open
nwaggu opened this issue Sep 27, 2023 · 1 comment
Open

Adding new robots via URDF #19

nwaggu opened this issue Sep 27, 2023 · 1 comment

Comments

@nwaggu
Copy link

nwaggu commented Sep 27, 2023

Is it possible to visualize different robots outside of the default in Lively Studio? I had tried using a new URDF that was referencing STLs to no success. Would it require converting the files to DAE format? Since Lively uses RelaxedIK would I also need to do any additional configuration on that end to get another robot to work with it? Thanks.

@AndrewJSchoen
Copy link
Contributor

Hi @nwaggu,

Sorry for the delay. Yeah, the software currently doesn't allow us to import arbitrary STL or DAE files for visualization purposes from the front-end. Adding new meshes requires updating the source code of LivelyStudio itself. In short, you can find a file here:

https://github.com/Wisc-HCI/LivelyStudio/blob/main/src/Meshes/index.js

This imports all the meshes we have on file, and makes them available in the MeshLookupTable. That lookup would use whatever mesh path is specified in the URDF (e.g. "package://nao_meshes/meshes/V40/RFinger11.dae"), and return up the corresponding parsed mesh file. The caveat here is that we actually have to write loaders for each of them, which you can find in that folder. So you should find both a .glb file and a .js file, e.g.

https://github.com/Wisc-HCI/LivelyStudio/blob/main/src/Meshes/Ur10/base.js
https://github.com/Wisc-HCI/LivelyStudio/blob/main/src/Meshes/Ur10/base.glb

Right now we parse those files, and return a specific data structure so we know how to render those in the scene, but it is heavily based on the code generated here. Right now we have converted all the files to .glb format for consistency, but presumably as long as you got the data format correct, it should be able to read it. Happy to discuss with you if you have any specifics. Also, let me know of you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants