def check_collisions(veh_dict,
                     t,
                     collision_tolerance_x,
                     collision_tolerance_y):
    """
    Simply check the vehicle positions after t time assuming constant
    velocity and given the initial veh_dict for any collisions
        (respecting the given collision tolerances).

    Arguments
      veh_dict:
        A dictionary of all of the vehicles in the scene, with their information.
      t:
        Float, the time at which we want to check for collisions, forward in
        time from where the veh_dict says every car is, in seconds.
      collision_tolerance_x:
        Float, the collision tolerance, laterally, in meters.
        A distance less than this to another object will be considered a collision.
      collision_tolerance_y:
        Float, the collision tolerance, longitudinally (forward and back), in meters.

    Returns
      (collision, msg):
         collision: Boolean, whether or not a collision occurred.
         msg: String, the vehicle id or a message that no collision occurred.
    """
    ego_pos_x = 0 # for now, assume no lateral motion.
    ego_pos_y = veh_dict["ego"].rel_vy * t
    for veh_id in veh_dict.keys():
        if veh_id == "ego": continue
        new_pos_x = veh_dict[veh_id].rel_x + veh_dict[veh_id].rel_vx*t
        new_pos_y = veh_dict[veh_id].rel_y + veh_dict[veh_id].rel_vy*t
        if abs(new_pos_x - ego_pos_x) <= collision_tolerance_x \
                and abs(new_pos_y - ego_pos_y) <= collision_tolerance_y:
            return True, veh_id
    return False, "No collisions detected."