Two identical carts constrained to move on a straight line