-
Hi, In one of your papers on the MPC tracker (https://ieeexplore.ieee.org/document/8594266) the authors wrote: “the current implementation of the MPC tracker relies on the CVXGEN to solve the quadratic program. A single iteration of the MPC tracker takes between 2 to 10 ms using only a single core of the Core-i7 processor, with a maximum of 30 iterations of the CVXGEN solver. “ My questions below are for the purpose of comparing the compute time between algorithms:
Thanks a lot for the discussion! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello, I will try to address some of your questions, but most of this discussion is best answered by Tomáš (@klaxalk) himself, who is the main author of both the paper and the related implementation.
It's nice seeing that someone in the robotics community is taking the science seriously and is comparing his contribution to real SotA, good luck with the research and the paper! :) |
Beta Was this translation helpful? Give feedback.
-
Hello, I can elaborate on some of the points:
|
Beta Was this translation helpful? Give feedback.
-
Hey Bryan, good to hear from you! I think most of the questions were already answered. Nevertheless, I will try to answer as well.
I admit, the paper could be written better. Luckily, not that much has changed from the time of publication, so we relate to the current implementation.
The time that actually matters is the total computational time of a single iteration of the MPC tracker across all the axes, i.e., X, Y, Z, heading. If the total time is larger than 1 / execution rate, then the tracker does not run in real time. Currently, we execute the tracker at 100 Hz, so the complete iteration must take under 10 ms. And the complete iteration consists of calculation of the LCQP by CVXGen for each axis: X, Y, Z and heading. The solver itself uses an iterative algorithm, which can need tens of iterations to converge to the global optimum, we limit that to max 25 iterations, which we found both enough for finding a good solution and not too much for exceeding the desired computational time. In this, we sortoff rely on the solver to spit out solutions in a consistent way. If the solver were "inconsistent" in finding the solution, we would probably not use it, or we would add an explicit time limiter on it.
As @DanHert said, it varies according to the input and, by fact, on whether the solution is LCQP constrained or not. Solutions that are not constrained can be found quite easily (theoretically in closed form). Constrained solutions require an iterative approach.
check @matemat13 response. In that time, we measured using the WallTime.
The execution of the CVXGen is single core. There is no way around that, the code itself is C99, so no threading :-).
It depends. We always try to fly with the onboard computer having some spare power, i.e., having the CPU load < number of cores. However, for most people, it is difficult to run simulations like that, because a generic laptop struggles with the additional load caused by the simulation. In my case, I simulate on Core I9-9900k or i7, so when it matters, I don't push the PC to the limits.
Sincerely, Tomas |
Beta Was this translation helpful? Give feedback.
Hey Bryan, good to hear from you! I think most of the questions were already answered. Nevertheless, I will try to answer as well.
I admit, the paper could be written better. Luckily, not that much has changed from the time of publication, so we relate to the current implementation.