Skip to content

Is there a way to selectively record bodies? #18

Answered by cadop
cadop asked this question in Q&A
Discussion options

You must be logged in to vote

The best way I could find is to render based on object types (although I think this can easily extend to body ids).

The render.py in sim is subclassing the main renderer, so I added a few extra parameters. The heart of the modifications is:


    def render(self, state: warp.sim.State, particle_size=0.1, particles=True, meshes=True, bodies=True):

        if (self.model.particle_count):

            particle_q = state.particle_q.numpy()

            # render particles
            if particles: self.render_points("particles", particle_q, radius=particle_size)

            # render tris
            if meshes:
                if (self.model.tri_count):
                    self.render_mesh("su…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@cadop
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by cadop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants