def _convert_to_world_coordinates(self, waypoint_positions):
        """
        This function is used to convert the waypoint positions from the local frame to the world frame
        """
        obj_heading = np.array(self.control_object.heading_theta).reshape(1, ).repeat(waypoint_positions.shape[0])
        obj_position = np.array(self.control_object.position).reshape(1, 2)
        rotated = waypoint_utils.rotate(
            waypoint_positions[:, 0],
            waypoint_positions[:, 1],
            obj_heading,
        )
        translated = rotated + obj_position
        return translated

        This function is used to convert the waypoint positions from the local frame to the world frame
        
metadrive/policy/waypoint_policy.py