Add mjs_makeMesh to create a builtin mesh.
PiperOrigin-RevId: 788538127 Change-Id: I999733399a1a0da07b0f915f34d31364ab8b3b52
This commit is contained in:
committed by
Copybara-Service
parent
46dc67b7eb
commit
89f4789085
@@ -484,6 +484,14 @@ class SpecsTest(absltest.TestCase):
|
||||
# Check that the state is the same.
|
||||
np.testing.assert_array_equal(state1, state2)
|
||||
|
||||
def test_make_mesh(self):
|
||||
spec = mujoco.MjSpec()
|
||||
mesh = spec.add_mesh(name='wedge')
|
||||
mesh.make_wedge(resolution=[25, 25], radius=1, fov=[90, 45], gamma=0)
|
||||
model = spec.compile()
|
||||
self.assertEqual(model.nmesh, 1)
|
||||
self.assertEqual(model.nmeshvert, 25 * 25)
|
||||
|
||||
def test_compile_errors_with_line_info(self):
|
||||
spec = mujoco.MjSpec()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user