vincekurtz / drake_ddp

Differential Dynamic Programming and Iterative LQR in Drake
MIT License
63 stars 12 forks source link

Are arbitrary object meshes supported? #5

Open richardrl opened 5 months ago

richardrl commented 5 months ago

Hi, I am curious if trajectory optimization with a manipulator and arbitrary object meshes are supported - I noticed they are just spheres.

vincekurtz commented 5 months ago

Short answer: yes, with caveat below.

Long answer: we already are using meshes to represent the robot, e.g., in the kinova arm case. And to the solver there is no difference between robot and object. You can use arbitrary meshes as long as the contact model is hydroelastic, since autodiff through the forward dynamics is not currently supported for all geometries with point contact. That means that if two mesh objects are in contact, at least one of them needs to be defined as compliant hydroelastic. That can take some work to set up: see the hydroelastic user guide for more info.