(self, physics, velocity=None, angular_velocity=None)
Sets the linear velocity and/or angular velocity of this free entity.

    If the entity is attached with a free joint, this method will set the
    respective DoFs of the joint. Otherwise a warning is logged.

    Args:
      physics: An instance of `mjcf.Physics`.
      velocity: (optional) A NumPy array of size 3 specifying the
        linear velocity.
      angular_velocity: (optional) A NumPy array of size 3 specifying the
        angular velocity
Sets the linear velocity and/or angular velocity of this free entity.
Sets the linear velocity and / or angular velocity of this free entity .
def set_velocity(self, physics, velocity=None, angular_velocity=None):
    """Sets the linear velocity and/or angular velocity of this free entity.

    If the entity is attached with a free joint, this method will set the
    respective DoFs of the joint. Otherwise a warning is logged.

    Args:
      physics: An instance of `mjcf.Physics`.
      velocity: (optional) A NumPy array of size 3 specifying the
        linear velocity.
      angular_velocity: (optional) A NumPy array of size 3 specifying the
        angular velocity
    """
    root_joint = mjcf.get_frame_freejoint(self.mjcf_model)
    if root_joint:
      if velocity is not None:
        physics.bind(root_joint).qvel[:3] = velocity
      if angular_velocity is not None:
        physics.bind(root_joint).qvel[3:] = angular_velocity
    else:
      logging.warning('Cannot set velocity on Entity with no free joint.')
def set_velocity ( self , physics , velocity = None , angular_velocity = None ) : root_joint = mjcf . get_frame_freejoint ( self . mjcf_model ) if root_joint : if velocity is not None : physics . bind ( root_joint ) . qvel [ : 3 ] = velocity if angular_velocity is not None : physics . bind ( root_joint ) . qvel [ 3 : ] = angular_velocity else : logging . warning ( 'Cannot set velocity on Entity with no free joint.' )