How to export URDF from the scene

Typically: "How do I... ", "How can I... " questions
Post Reply
yifanzhou
Posts: 13
Joined: 03 Jun 2020, 06:17

How to export URDF from the scene

Post by yifanzhou »

Dear all,
I wonder if it is possible to export URDF from the scene?

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: How to export URDF from the scene

Post by coppelia »

Hello,

see simURDF.export(modelHandle,filename)

Cheers

yifanzhou
Posts: 13
Joined: 03 Jun 2020, 06:17

Re: How to export URDF from the scene

Post by yifanzhou »

Sorry, I can't find any guide about simURDF.export(modelHandle,filename).

fferri
Posts: 1187
Joined: 09 Sep 2013, 19:28

Re: How to export URDF from the scene

Post by fferri »

The URDF exporter can be used from the main menu (Plugin or Modules menu, depending on your CoppeliaSim version), or you can use it in a Lua script, e.g.:

Code: Select all

modelHandle=sim.getObjectHandle('IRB140')
filenames=simUI.fileDialog(simUI.filedialog_type.save,'Save URDF...','','export.urdf','URDF Files','urdf')
if filenames then
    simURDF.export(modelHandle,filenames[1])
end

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: How to export URDF from the scene

Post by coppelia »

you can also download the beta version of CoppeliaSim's next release, which has an improved URDF importer/exporter.

Cheers

Juancho
Posts: 9
Joined: 11 Jun 2018, 03:14

Re: How to export URDF from the scene

Post by Juancho »

Dear Coppelia,

I would like to export my CoppeliaSim scene to URDF. I was wondering if it is possible. Furthermore, I would like to test the beta version of CoppeliaSim, the one that has an improved URDF exporter. However, the link (https://coppeliarobotics.com/files/beta/) does not show some available files.

Thank you for your help.

Best regards,

Juan

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: How to export URDF from the scene

Post by coppelia »

Hello Juan,

the URDF exporter is available in current CoppeliaSim version 4.3.rev10 that you can download from the download section. In there, simply select [Menu bar --> Modules --> Exporters --> URDF exporter] and follow the instructions: i.e. you'll have to select a model, and make sure the base of the model is a shape. If you do this, a UI button appears that you can click for the export. You cannot directly export the whole scene. But you can try to add a shape (e.g. sphere), mark it as model base, then attach all object from the scene on top of that sphere, and export that sphere model.

Cheers

TomDelaney
Posts: 22
Joined: 31 Jul 2022, 19:48

Re: How to export URDF from the scene

Post by TomDelaney »

Hello,

I was wondering when exporting a model into an urdf files is there a way to keep the dummies?

Thank you for your answer!

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: How to export URDF from the scene

Post by coppelia »

Hello,

URDF doesn't know what a dummy is. When exporting (with V4.5), a dialog will appear with an option Make red cubes from dummies: if checked, the URDF file will contain red cubed instead of dummies.

Cheers

Post Reply