using applied_forces to check boundaries for extra paranoia
enable task_gradients by default when debugGradients is on