RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.33k stars 1.26k forks source link

Deformable Visualization for Camera Sensors #18922

Open JShep-tri opened 1 year ago

JShep-tri commented 1 year ago

As it stands, there is no way to adequately visualize a deformable body in sim with a camera sensor.

There is currently an internal implementation of a DeformableCamera that I've written which visualizes (color and depth) deformable objects. The current constraints of this DeformableCamera is that each camera can only handle one deformable body. It also relies on some alterations to the render engine vtk API. Namely, the following functions (located within geometry/render_vtk/internal_render_engine_vtk.h) being moved from private to public, such that the DeformableCamera can call the DoRender... funcs and my custom RenderEngineVtkDeformable can call ImplementGeometry:

There are currently no alternatives to visualizing deformables - this is a pretty crucial feature for Drake to have given the increased support for deformables over the past year. Users will very likely wish to obtain sensor data from deformables.

There are certainly alternatives to the implementation I've described above that I feel need to be hashed out a bit more, but the DeformableCamera I've written is a good starting point.

SeanCurtis-TRI commented 1 year ago

All of this is a proxy to the true solution: teach RenderEngine about deformable geometry. Currently, it believes the world consists solely of rigid geometry.

Once that happens, "cameras" would take no particular role in considering deformable geometries (which is just and proper).

JShep-tri commented 1 year ago

All of this is a proxy to the true solution: teach RenderEngine about deformable geometry

Agreed, so I guess the question is, do we want to work in an intermittent solution (à la DeformableCamera, RenderEngineVtkDeformable) in the meantime, or focus on the "correct" solution which will take extra cycles?

jwnimmer-tri commented 1 year ago

Mostly this is a question for +@xuchenhan-tri on prioritization, I think?

SeanCurtis-TRI commented 3 months ago

Status update:

As of this posting we have partially achieved this feature. We can render deformable meshes. We can even use deformable meshes as a deformation basis for deforming embedded meshes (termed "driven meshes" in Drake). This functionality represents a big step from "not rendering at all" to "there's a narrow path".

We still need to broaden that path.