google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.47k stars 734 forks source link

Getting contact information and z-position from external rendering software #1715

Closed karthyyy closed 3 weeks ago

karthyyy commented 3 weeks ago

Hi,

For my project, I am planning to use MuJoCo as the physics engine and Blender as visualization tool. My doubt is how to get the contact details from the Blender. For eg, I am creating a vehicle and road in Blender, how the contact between vehicle tyre and road (with undulations) and z-position of the vehicle (only x-position and y-position are controlled from MuJoCo) is retrieved in MuJoCo.

Is there any example or tutorial of interfacing MuJoCo and Blender ?

Thanks in advance.

Regards Karthik

yuvaltassa commented 3 weeks ago

Everything you want is in mjData. There is no such tutorial but our introductory tutorial should cover much of what you'll need.

karthyyy commented 3 weeks ago

Hi @yuvaltassa ,

Thanks. I shall go through the same and get back. Meanwhile can you please clarify that, in my case, I need to import the road hfield details into MuJoCo and do 'step' and send back the vehicle pose (including z-position) to blender to visualize the same ?

Regards Karthik