From c6b7563910d212c05efb51b96f02c3afef35d20b Mon Sep 17 00:00:00 2001 From: Kristijan Bartol Date: Wed, 9 Oct 2024 13:57:30 +0200 Subject: [PATCH] Remove redundant if block in the XPBD simulator. --- warp/sim/integrator_xpbd.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/warp/sim/integrator_xpbd.py b/warp/sim/integrator_xpbd.py index ef585c29..d8d1d854 100644 --- a/warp/sim/integrator_xpbd.py +++ b/warp/sim/integrator_xpbd.py @@ -2808,12 +2808,8 @@ def simulate(self, model: Model, state_in: State, state_out: State, dt: float, c with wp.ScopedTimer("simulate", False): if model.particle_count: - if requires_grad: - particle_q = state_out.particle_q - particle_qd = state_out.particle_qd - else: - particle_q = state_out.particle_q - particle_qd = state_out.particle_qd + particle_q = state_out.particle_q + particle_qd = state_out.particle_qd self.particle_q_init = wp.clone(state_in.particle_q) if self.enable_restitution: