MoI discussion forum
MoI discussion forum

Full Version: A Script to export to URDF

Show messages: All  1-2  3-10

From: jeff (JSPRENGER)
2 Apr 2018   [#3] In reply to [#2]
hmm....

I think I can solve the position by:

creating a tiny "node" object like a small cube as a subobject for each part
then can I get the position of the bounding box of the node.

but for orientation, I'd need to know the rotation of the node.

I thought maybe a cube (as a primitive) would have orientation.
But playing with "Separate" on a cube, I see that it's composed as 6 planes to enclose a solid.

So when we rotate, moi just transforms the vertices?

Jeff.
From: Michael Gibson
2 Apr 2018   [#4] In reply to [#3]
Hi Jeff,

> So when we rotate, moi just transforms the vertices?

Yes, that's correct.

- Michael
From: Michael Gibson
2 Apr 2018   [#5] In reply to [#3]
But if you are able to attach some additional node objects to each main object instead of doing a cube if you did a 3 orthogonal lines one for x, one for y, one for z, that might be workable.

- Michael
From: jeff (JSPRENGER)
2 Apr 2018   [#6] In reply to [#5]
For importing into Unity, I think it ignores points and lines.
Only meshes are imported. So maybe three triangles in the form of a corner to represent the axes.




Jeff.

Image Attachments:
TriCorner.png 


From: bemfarmer
2 Apr 2018   [#7]
There is a solidworks to urdf exporter:

http://wiki.ros.org/Industrial/Tutorials/Create%20a%20URDF%20for%20an%20Industrial%20Robot

- B
From: Michael Gibson
2 Apr 2018   [#8] In reply to [#6]
Hi Jeff, sorry I'm not understanding the part about importing into Unity - I thought you needed to write the rotation information into an XML file.

- Michael
From: jeff (JSPRENGER)
2 Apr 2018   [#9] In reply to [#8]
sorry for the confusion - I have URDF which I use for the physics engine import, but
I also to import robot models into Unity using URDF for easy visualization and PBR rendering.
(you can see some examples at my website www.spryrobotics.com).

Jeff.
From: Frenchy Pilou (PILOU)
3 Apr 2018   [#10]
Cool!
https://vimeo.com/245327854

Show messages: All  1-2  3-10