for $k = 0, \dots, N-1$.
C. Algorithm Construction
In order to construct an optimization algorithm we have to define the discrete cost function $C_d$, the discrete Lagrangian $L_d$, the constraints $\omega_d$ and the discrete force $f_d$ consistently. We choose the midpoint rule according to which
using the notation $q_{k+\frac{1}{2}} := \frac{q_k+q_{k+1}}{2}$ and $\Delta q_k := \frac{q_{k+1}-q_k}{h}$. The left and right forces then become $f_k^- = f_k^+ = \frac{h}{4}(f_k + f_{k+1})$. The midpoint rule is second order accurate. Higher order integrators using composition methods or symplectic partitioned Runge-Kutta methods can also be constructed [24].
III. REDUCED DISCRETIZATION
The discrete equations derived in the previous section might become singular or the choice of coordinates might not be globally valid. When symmetries are present such problems can be avoided by applying reduction. In this section we use the reduced integrators derived in [25] to formulate a reduced optimization framework for Chaplygin systems that are relevant to car-like vehicles.
A. Reduced Lagrange-d'Alembert Equations
Assume that we are given a Lie group $G$ acting to $Q$. We can pick local coordinates $q = (r,g)$, $q \in Q$, $r \in M$, $g \in G$, where $M = Q/G$ is the shape space. Assume that the Lagrangian $L$ and constraint distribution $\mathcal{D}$ are invariant under the induced action of $G$ on $TQ$. Then we can define the reduced Lagrangian $\ell: TQ/G \to \mathbb{R}$ satisfying $L(r,\dot{r},\dot{g},g) = \ell(r,\dot{r},g^{-1}\dot{g})$, and the constrained reduced Lagrangian $\ell_c: \mathcal{D}/G \to \mathbb{R}$, such that $\ell(r,\dot{r},g^{-1}\dot{g}) = \ell_c(r,\dot{r})$. The main point is that the Lagrange-D'Alembert equations on $TQ$ induce well-defined reduced Lagrange-D'Alembert equations on $\mathcal{D}/G$, vector fields in $\mathcal{D}$ are also $G$-invariant and define reduced vector fields on $\mathcal{D}/G$ [28].
Whenever the group directions (the set of vector fields obtained by differentiating the group flow) complement the constraints we have the principle kinematic case or the Chaplygin case. In this case there is a principal connection one-form
where $A_{loc}$ is the local form of the connection. This connection defines the evolution of the group variables in terms of the shape variables. It can be derived directly from the
constraints. Since $A(q) \cdot \dot{q} = 0$ the constrained Lagrangian is given by
Assuming that the control forces are restricted to the shape, i.e. $f: TM \to T^*M$ the continuous equations of motion are
where the forces $\hat{f}: TM \to T^*M$ arise from the curvature of $A_{loc}$ and are defined by
with $\xi = -A_{loc}(r) \cdot \dot{r}$, $A_\alpha^b$ the components of $A_{loc}$, and $C_{ac}^b$ are the structure constants of the Lie algebra defined by $[e_a, e_c] = C_{ac}^b e_b$ (see [1] for details and an example). Equations (11) are independent of $g \in G$ and determine the unconstrained evolution of the system in the shape space $M$. Curves in $M$ can be lifted to $Q$ using (12) to produce a unique curve in $Q$ [29]. This fact allows us to reduce the optimal control problem from $Q$ to $M$ and after finding optimal trajectories in $M$ to lift them back to $Q$.
Next we apply the discrete Lagrange-d'Alembert principle in the reduced space $M$. The integral of $l_c$ is approximated by the discrete constrained reduced Lagrangian $L_d^*: M \times M \to \mathbb{R}$ [25]. Then we obtain the discrete reduced equations of motion and discretized constraints:
and velocity boundary conditions (corresponding to (9)):
which determine the complete evolution of the system.
When constructing a reduced algorithm with the midpoint rule we set
The equation for $\hat{f}_k^\pm$ was derived assuming linear dependence of the connection on the base point [25]. While a more general formulation exists, for the purpose of this paper we assume that it is a valid approximation. For the car-like examples that we consider the connection is linear in the base point and the linearity assumption is satisfied.
Using the exponential map to define the midpoint (along the flow) between two configurations in $G$, the constraint equation in (14) becomes