Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 603479877
Change-Id: I1782a8de6c8ca35e9b0182708ea5bfe8acae38ef
  • Loading branch information
Brax Team authored and btaba committed Feb 1, 2024
1 parent ec075da commit dd37045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 2 additions & 1 deletion brax/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def get(sys: System, x: Transform) -> Optional[Contact]:
Returns:
Contact pytree
"""
ncon = mjx.ncon(sys)
# TODO: use mjx.ncon.
ncon = mjx._src.collision_driver.ncon(sys)
if not ncon:
return None

Expand Down
10 changes: 0 additions & 10 deletions brax/envs/env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ def testSpeed(self, backend, env_name, expected_sps):
)
self.assertGreater(mean_sps, expected_sps * 0.99)

@parameterized.parameters(['mjx', 'generalized', 'spring', 'positional'])
def test_render(self, backend):
env = envs.create(
'ant',
backend=backend,
)
state = jax.jit(env.reset)(jax.random.PRNGKey(0))
images = env.render([state.pipeline_state])
self.assertLen(images, 1)
self.assertEqual(images[0].shape, (240, 320, 3))


if __name__ == '__main__':
Expand Down

0 comments on commit dd37045

Please sign in to comment.