-
Notifications
You must be signed in to change notification settings - Fork 349
Description
The USD renderer in warp is quite useful for debugging and visualization of results.
Especially for debugging, rendering debug information such as contact points or joint axes can greatly improve the developing experience. However, I am currently unable to render attributes for certain frames. This would be useful to visualize things like temporary external forces, current contact points in contact-rich simulations and more.
My current approach implements these renderings in a simple render callback function that is executed if a certain criterion (e.g., the external force is applied in this frame) is satisfied. It looks roughly like this:
self.renderer.begin_frame(self.sim_time)
self.renderer.render(self.current_state)
if external_force_applied:
self.renderer.render_cylinder(...)
self.renderer.end_frame()
However, visualizing the USD shows primitives added via render_sphere
, render_cylinder
etc. in all frames and not only those where it was explicitly added (e.g., external_force_applies
was true).
Is there a way to use the warp USD renderer to render primitives only in certain frames?