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

I'm learning STL file / objects in XML models are convex hulls. Does this mean it's not possible to model real robots? #61

Closed
MotorCityCobra opened this issue Nov 17, 2021 · 7 comments

Comments

@MotorCityCobra
Copy link

Because if you can't get the proper volume and density into your physics simulator how can you simulate it?

I was hoping to source the CAD files of parts I was going to use, assemble them all in Solidworks and simulate the model in MuJoCo? Would I have to give the make the mesh (STL) imports zero mass to bring them into MuJoCo? Real CAD Joints and motors won't fit together if they are convex hulls. RIght?

@yuvaltassa
Copy link
Collaborator

MuJoCo will estimate masses and inertias of your STL given a density, or you can use the possibly more precise values given by your CAD software using the inertial clause.

Convex hulls are used for collision detection. Note that (by default) parent and child bodies don't collide, so there is usually no problem of "not fitting together".

@MotorCityCobra
Copy link
Author

MotorCityCobra commented Nov 17, 2021

there is usually no problem of "not fitting together".

I'm a little new to this, so maybe I misunderstand. If you have STL meshes of a nut and bolt imported to MuJoCo will the bolt be able to be in a position where it has been screwed into the nut? As I understand it a convex hull wraps the nut and makes it impenetrable. As I understood it the way of dealing with this was to give the mesh objects no mass, like Patrick Swayze in most of 'Ghost', and put other shapes in and around, the nut and bolt in this case. Maybe I'm a little slow, but I haven't figured out what's going on here from the docs and the forum on Roboti.
Thank you for the response!

@Hobbit-wgh
Copy link

I meet the same problem. I want to simulate the bolt screwed into the nut, but I can not get correct result.

I would like to consult with the senior.

@yuvaltassa
Copy link
Collaborator

yuvaltassa commented Jul 23, 2023

Search the issues for Convex Decomposition.

@sunnymints
Copy link

I meet the same problem. I want to simulate the bolt screwed into the nut, but I can not get correct result.

I would like to consult with the senior.

Hello, my senior, I also want to simulate the bolt preload in mujoco , but I'm not sure how to correct it.

@yuvaltassa
Copy link
Collaborator

MuJoCo latest now supports Signed Distance Functions for collisions. See e.g. this video

@sunnymints
Copy link

Signed Distance Functions for collisions

Thank you very much!
Did the official provide demos' tutorials from the video?

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

4 participants