The Frenet Transform is a tool used in motion planning to decouple lateral and longitudinal control as described in this paper. Open source C++ and Python implementations of the paper are available here and here. The approach samples multiple polynomial trajectories in Frenet coordinates i.e.
Instead of planning polynomial trajectories in the Frenet coordinate space, an alternative MPC based approach is tested.
A simple point mass model is used as the MPC model to generate trajectories in
The cost function used consists of three terms:
-
Deviation cost (penalizing
$d$ ): =$k_d * d^2$ -
Progress cost (incentivizing progress
$s$ along path):$-k_s * s^2$ -
Desired velocity cost:
$k_{v} * (\dot s - \dot s_{des}$ ) where$\dot s_{des}$ is the desired progress rate
Here, the scaling factors are tunable parameters which affect the planner performance.
Constraints are imposed on progress velocity, as well as input changes as in a standard MPC formulation.
Obstacle constraints are formulated as non linear distance constraints of the form.
In the interest of time, the approach is implemented in Python using the do_mpc toolbox for optimal control along with the ma97 IPOPT solver. The approach may also be transferred to C++ using a symbolic framework like casadi. Dependencies:
The method produces a sequence of optimal inputs and predicted trajectories in the Frenet coordinate space. The trajectories in Frenet Frame are converted to the Cartesian Frame, where acceleration and curvature filters can be applied on the resulting trajectory. The MPC approach is applied in a receding horizon fashion, where replanning is done after applying the first control input from the optimal sequence of control inputs. A simulated version of this is demonstrated, where it is assumed that the robot reaches the next state of the trajectory at every planning iteration. This can be achieved in the real world by using any standard trajectory tracker.
Performance of the planner can be seen in the GIFs below. The figire eight trajectory in Cartesian frame is parameterized as
$x = a * sin(t)$ $y = a * cos(t) sin(t)$
These expressions are used when computing the franet transforms.
The light green trajectory is the predicted optimal trajectory from the MPC, and the reference trajectory is shown in green. The states of the MPC over the horizon interval are also shown.
The GIF shows tracking performance without obstacles. The planenr converges to the reference path and maintains zero deviation.
The GIF shows obstacle avoidance behaviour after which the planner continues to track the figure eight trajectory.