code: def testVeloctyObservations(self, width=80, height=80):
      noop_action = np.zeros((7,), dtype=np.intc)
      forward_action = np.array([0, 0, 0, 1, 0, 0, 0], dtype=np.intc)
      backward_action = -forward_action
      look_sideways_action = np.array(
          [512, 0, 0, 0, 0, 0, 0], dtype=np.intc
      )
  
      env = deepmind_lab.Lab(
          "seekavoid_arena_01",
          ["VEL.TRANS", "VEL.ROT", "RGBD_INTERLEAVED"],
          config={
              "height": str(height),
              "width": str(width),
              "fps": "60",
          },
      )
  
      env.reset(seed=1)
  
      # Initial landing on the ground.
      env.step(noop_action, num_steps=180)
  
      for _ in six.moves.range(3):
          # Doing nothing should result in velocity observations of zero.
          env.step(noop_action, num_steps=100)
          obs = env.observations()
          np.testing.assert_array_equal(
              obs["VEL.TRANS"], np.zeros((3,))
          )
          np.testing.assert_array_equal(obs["VEL.ROT"], np.zeros((3,)))
  
          env.step(forward_action, num_steps=100)
          obs = env.observations()
  
          forward_vel = obs["VEL.TRANS"]
          self.assertEqual(
              forward_vel[2], 0.0
          )  # zero velocity in z direction
          self.assertTrue(np.any(forward_vel))
          np.testing.assert_array_equal(obs["VEL.ROT"], np.zeros((3,)))
  
          env.step(noop_action, num_steps=4)
  
          # Going backward should result in negative velocity of going forward
          env.step(backward_action, num_steps=100)
          obs = env.observations()
          self.assertAlmostEqual(
              np.linalg.norm(obs["VEL.TRANS"] + forward_vel),
              0.0,
              delta=3,
          )
          np.testing.assert_array_equal(obs["VEL.ROT"], np.zeros((3,)))
  
      env.reset(seed=1)
  
      for _ in six.moves.range(3):
          env.step(noop_action, num_steps=100)
          obs = env.observations()
          np.testing.assert_array_equal(
              obs["VEL.TRANS"], np.zeros((3,))
          )
          np.testing.assert_array_equal(obs["VEL.ROT"], np.zeros((3,)))
  
          env.step(look_sideways_action, num_steps=100)
          obs = env.observations()
  
          sideways_vel = obs["VEL.ROT"]
          self.assertEqual(sideways_vel[2], 0.0)
          self.assertTrue(np.any(forward_vel))
          np.testing.assert_array_equal(
              obs["VEL.TRANS"], np.zeros((3,))
          )
  
          env.step(noop_action, num_steps=4)
  
          env.step(-look_sideways_action, num_steps=100)
          obs = env.observations()
          self.assertAlmostEqual(
              np.linalg.norm(obs["VEL.ROT"] + sideways_vel),
              0.0,
              delta=3,
          )
          np.testing.assert_array_equal(
              obs["VEL.TRANS"], np.zeros((3,))
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import absltest
  import numpy
  import six
  import deepmind_lab
label_desc: Use image node_id 12 for calling the DeepMindLabTest obj's underlying member method code with example usage: obj.testVeloctyObservations(width, height) without return types