How to import URDF file with correct position of joints and parts

Typically: "How do I... ", "How can I... " questions
Post Reply
Hacher
Posts: 40
Joined: 28 Nov 2024, 02:00

How to import URDF file with correct position of joints and parts

Post by Hacher »

The URDF file import into the scene shows confusing relative positions, the reletive position changed totally. How to fix this problem?
And if I don't want to use URDF, do we have any other way to export the sw file into coppeliasim with joint data?
coppelia
Site Admin
Posts: 10808
Joined: 14 Dec 2012, 00:25

Re: How to import URDF file with correct position of joints and parts

Post by coppelia »

Hello,

can you show me such a URDF file that causes these problems?

You can also use the SDF format, or more basic CAD data formats to import data into CoppeliaSim - or use your own format: have a look at the minimalistic exporter at [Menu bar > Modules > Exporters > Minimalistic exporter...] and the minimalistic importer at [Menu bar > Modules > Importers > Minimalistic importer...]

Cheers
Hacher
Posts: 40
Joined: 28 Nov 2024, 02:00

Re: How to import URDF file with correct position of joints and parts

Post by Hacher »

Sorry, can you tell how to upload attachment and image in the forum?
And there was no entity in scene after I import. Can only see the joints.
coppelia
Site Admin
Posts: 10808
Joined: 14 Dec 2012, 00:25

Re: How to import URDF file with correct position of joints and parts

Post by coppelia »

You will have to host the file yourself, and post a link to the file. Have also a look at this post related to possible problems with the URDF importer.

Cheers
Hacher
Posts: 40
Joined: 28 Nov 2024, 02:00

Re: How to import URDF file with correct position of joints and parts

Post by Hacher »

Thanks for your reply, the urdf file can be import correctly now, but strange behaviour appears after I start the simulation, and have a warning:
[CoppeliaSim:warning] Detected dynamically enabled, non-convex shapes. Those might drastically slow down simulation, and introduce unstable behaviour.
And this is the file of scene and urdf:
https://www.filemail.com/d/pprafzlgzjkehpk
coppelia
Site Admin
Posts: 10808
Joined: 14 Dec 2012, 00:25

Re: How to import URDF file with correct position of joints and parts

Post by coppelia »

The reason that your URDF import behaves in an unstable manner is because URDF is an exchange fileformat mainly, that can be used to serve several purposes, and that can be badly created/generated. In your case, the file appears to contain only heavy, non-dynamics optimized meshes (e.g. the wheels are very complex, and their dynamic counterpart are not simplified nor convex, etc.).
From here, it is your task to build a functional lightweight dynamic model.

Cheers
Hacher
Posts: 40
Joined: 28 Nov 2024, 02:00

Re: How to import URDF file with correct position of joints and parts

Post by Hacher »

Thank you very much, do you have any suggestion of building such dynamic model? I have no idea about this.
coppelia
Site Admin
Posts: 10808
Joined: 14 Dec 2012, 00:25

Re: How to import URDF file with correct position of joints and parts

Post by coppelia »

I recommend you read the user manual section on Creating dynamic simulations

Cheers
Hacher
Posts: 40
Joined: 28 Nov 2024, 02:00

Re: How to import URDF file with correct position of joints and parts

Post by Hacher »

Thank you for your reply, and I would like to ask, as a developer, when the model is very complex, what format of model files do you usually export from 3D modeling software (such as SolidWorks) to ensure that there is still a good dynamic simulation effect after importing into vrep?
coppelia
Site Admin
Posts: 10808
Joined: 14 Dec 2012, 00:25

Re: How to import URDF file with correct position of joints and parts

Post by coppelia »

The best is to rebuild the dynamic part of the scene from scratch: you never know for what purpose the URDF was created and oftentimes they are not directly intended for simulation (or stable simulation).

You can still import via URDF, but then remove and rebuild everything related to dynamics.

Cheers
Post Reply