# Optimal control - minimum time manouvering

Hey everyone,

I’m trying to use Julia to solve a non-linear optimal control problem, the “minimum time manouvering” problem for (simulated) race cars (Casanova 2000, Van Koutrik 2015).

Briefly, you have a set of differential equations that describe the dynamics and kinematics of the car under the effects of control inputs (acceleration, steering). The goal is to find the controls history yielding the fastest trajectory around the track, under the constraint imposed by the track boundary (the car can’t get out of the track). There’s many papers (and this) proposing solutions to this kind of problem, but I haven’t seen a code implementation yet.

I thought I’d try to solve a simplified version of this in Julia, but I haven’t been able to find a package that could help me in that. I know there’s NLOptControl, JuMP, Optim… but I’m not sure how I would use them for this kind of trajectory optimization problem. I’ve seen some people using DiffEqFlux’s Neural ODEs to solve optimal control problems, but again I’m not sure how I’d use it here.
I’ve tried to use the set of packages from RoboticExplorationLab which include trajectory optimization and non-linear solvers and seemed ideal for my needs, but I got stuck with some issues and haven’t (yet ) heard back from the developers

Is there any well documented, full of examples, trajectory optimization optimal control library out there that you’d recommend?

Thank you

1 Like

has quite a few examples https://github.com/RoboticExplorationLab/ALTRO.jl/tree/master/problems

Thank you. It is indeed great and I thought It’d be ideal for my problem, but as discussed in this issue I got stuck getting it to work. Perhaps there’s someone with more experience with this package that can point out what I’m doing wrong?

You can also do this with collocation, see here for an example using InfiniteOpt.jl, which does it under the hood for you and then uses JuMP to handle the constrained optimization problem.

I have used JuMP for time optimal control of Dubins vehicle. These examples show how to solve optimal control problems:

Do you need something like this:

2 Likes