Converting Dirichlet boundary conditions for E-L equations on a Lie group into an equivilent condition for EP equaiton

I need to find a specific geodesic of a right invariant Finsler geodesic on a Lie group ($SU(n)$) that connects $I$ to some desired $O$. These are Dirichlet boundary conditions for the E-L equations (which are second order).

I know how to derive the Euler Poincare equations (which are first order) for the geodesics. However, I can't find anywhere or work out how to convert the boundary conditions into boundary conditions for the corresponding EP equation. I am expecting to obtain one condition on the derivative of the generator at $t=0$ to the geodesic. Any advice or references would be great!

There is no easy way to do this, since you have to solve an ODE between the E-L equations and the E-P equations. For numerical solutions you can minimize the functional $$F(X,g_0,g_1) = \int_0^1 \|X(t)\| dt + \epsilon d(g(1).g_0 - g_1)$$ with respect to $X:[0,1]\to \mathfrak g$, where $$\partial_t g(t) = X(t).g(t),\quad g(0)=1$$ and where $d$ is an arbitrary (easy) metric on $G$ which measures how well you hit when you shoot with right invariant geodesics from $g_0$ to $g_1$. This method is used for image registration (for the diffeomorphism group instead of $G$) and is called LDDMM (see references given in 8.1 of here).