def generate_interpolation_trajectory(x_start, x_final, traj_to_match):
    """Generate a 1d interpolation profile, where the velocity is constant
    over the duration of the trajectory.
    Args:
        x_start: Start position of the trajectory.
        x_final: End position of the trajectory.
        traj_to_match: Motion profile to interpolate along the length of.
    Returns:
        A list of (pos, vel acc) tuples.
    """
    x = x_final - x_start

    vel = 50*x/len(traj_to_match)

    num_segments = len(traj_to_match)
    segments = [(x_start+x*i/num_segments, vel, 0) for i in range(0, num_segments)]
    return segments