Refactor camera orthographic attribute to projection enum.
PiperOrigin-RevId: 847069028 Change-Id: I7f686fe654e9b56519cab8bd2f37c9cc40091d3f
This commit is contained in:
committed by
Copybara-Service
parent
44c8ef890d
commit
b8a4ac5d48
@@ -295,8 +295,10 @@ class SpecsTest(absltest.TestCase):
|
||||
self.assertEqual(site.info, 'info')
|
||||
|
||||
# Add camera.
|
||||
cam = body.add_camera(orthographic=1, resolution=[10, 20])
|
||||
self.assertEqual(cam.orthographic, 1)
|
||||
cam = body.add_camera(
|
||||
proj=mujoco.mjtProjection.mjPROJ_ORTHOGRAPHIC, resolution=[10, 20]
|
||||
)
|
||||
self.assertEqual(cam.proj, 1)
|
||||
np.testing.assert_array_equal(cam.resolution, [10, 20])
|
||||
|
||||
# Add frame.
|
||||
|
||||
Reference in New Issue
Block a user