(self, physics)
Gets the linear and angular velocity of this free entity.

    Args:
      physics: An instance of `mjcf.Physics`.

    Returns:
      A 2-tuple where the first entry is a (3,) numpy array representing the
      linear velocity and the second is a (3,) numpy array representing the
      angular velocity.
Gets the linear and angular velocity of this free entity.
Gets the linear and angular velocity of this free entity .
def get_velocity(self, physics):
    """Gets the linear and angular velocity of this free entity.

    Args:
      physics: An instance of `mjcf.Physics`.

    Returns:
      A 2-tuple where the first entry is a (3,) numpy array representing the
      linear velocity and the second is a (3,) numpy array representing the
      angular velocity.

    """
    root_joint = mjcf.get_frame_freejoint(self.mjcf_model)
    if root_joint:
      velocity = physics.bind(root_joint).qvel[:3]
      angular_velocity = physics.bind(root_joint).qvel[3:]
      return velocity, angular_velocity
    else:
      raise ValueError('get_velocity cannot be used on a non-free entity')
def get_velocity ( self , physics ) : root_joint = mjcf . get_frame_freejoint ( self . mjcf_model ) if root_joint : velocity = physics . bind ( root_joint ) . qvel [ : 3 ] angular_velocity = physics . bind ( root_joint ) . qvel [ 3 : ] return velocity , angular_velocity else : raise ValueError ( 'get_velocity cannot be used on a non-free entity' )